- Notifications
You must be signed in to change notification settings - Fork5k
Commitd2e7d2a
committed
oauth: Disallow OAuth connections via postgres_fdw/dblink
A subsequent commit will reclassify oauth_client_secret from dispchar=""to dispchar="*", so that UIs will treat it like a secret. For our FDWs,this change will move that option from SERVER to USER MAPPING, which weneed to avoid.But upon further discussion, we don't really want our FDWs to use ourbuiltin Device Authorization flow at all, for several reasons:- the URL and code would be printed to the server logs, not sent over the client connection- tokens are not cached/refreshed, so every single connection has to be manually authorized by a user with a browser- oauth_client_secret needs to belong to the foreign server, but options on SERVER are publicly accessible- all non-superusers would need password_required=false, which is dangerousFuture OAuth work can use FDWs as a motivating use case. But for now,disallow all oauth_* connection options for these two extensions.Reviewed-by: Noah Misch <noah@leadboat.com>Discussion:https://postgr.es/m/20250415191435.55.nmisch%40google.com1 parent45363fc commitd2e7d2a
File tree
6 files changed
+52
-0
lines changed- contrib
- dblink
- expected
- sql
- postgres_fdw
- expected
- sql
6 files changed
+52
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3094 | 3094 |
| |
3095 | 3095 |
| |
3096 | 3096 |
| |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
3097 | 3104 |
| |
3098 | 3105 |
| |
3099 | 3106 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
898 | 898 |
| |
899 | 899 |
| |
900 | 900 |
| |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
901 | 912 |
| |
902 | 913 |
| |
903 | 914 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
469 | 469 |
| |
470 | 470 |
| |
471 | 471 |
| |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
472 | 480 |
| |
473 | 481 |
| |
474 | 482 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
199 | 210 |
| |
200 | 211 |
| |
201 | 212 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
351 | 358 |
| |
352 | 359 |
| |
353 | 360 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
213 | 213 |
| |
214 | 214 |
| |
215 | 215 |
| |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
216 | 224 |
| |
217 | 225 |
| |
218 | 226 |
| |
|
0 commit comments
Comments
(0)