- Notifications
You must be signed in to change notification settings - Fork914
Commite744cde
authored
fix(coderd): ensure that clearing invalid oauth refresh tokens works with dbcrypt (#15721)
#15608 introduced a buggy behaviourwith dbcrypt enabled.When clearing an oauth refresh token, we had been setting the value tothe empty string.The database encryption package considers decrypting an empty string tobe an error, as an empty encrypted string value will still have a nonceassociated with it and thus not actually be empty when stored at rest.Instead of 'deleting' the refresh token, 'update' it to be the emptystring.This plays nicely with dbcrypt.It also adds a 'utility test' in the dbcrypt package to help encrypt avalue. This was useful when manually fixing users affected by this bugon our dogfood instance.1 parentebfc133 commite744cde
File tree
13 files changed
+184
-94
lines changed- coderd
- database
- dbauthz
- dbmem
- dbmetrics
- dbmock
- queries
- externalauth
- enterprise/dbcrypt
13 files changed
+184
-94
lines changedLines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3367 | 3367 |
| |
3368 | 3368 |
| |
3369 | 3369 |
| |
3370 |
| - | |
3371 |
| - | |
3372 |
| - | |
3373 |
| - | |
3374 |
| - | |
3375 |
| - | |
3376 |
| - | |
3377 | 3370 |
| |
3378 | 3371 |
| |
3379 | 3372 |
| |
| |||
3472 | 3465 |
| |
3473 | 3466 |
| |
3474 | 3467 |
| |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
3475 | 3475 |
| |
3476 | 3476 |
| |
3477 | 3477 |
| |
|
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1282 | 1282 |
| |
1283 | 1283 |
| |
1284 | 1284 |
| |
1285 |
| - | |
| 1285 | + | |
1286 | 1286 |
| |
1287 |
| - | |
1288 |
| - | |
1289 |
| - | |
1290 |
| - | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1291 | 1293 |
| |
1292 | 1294 |
| |
1293 | 1295 |
| |
|
Lines changed: 23 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8607 | 8607 |
| |
8608 | 8608 |
| |
8609 | 8609 |
| |
8610 |
| - | |
8611 |
| - | |
8612 |
| - | |
8613 |
| - | |
8614 |
| - | |
8615 |
| - | |
8616 |
| - | |
8617 |
| - | |
8618 |
| - | |
8619 |
| - | |
8620 |
| - | |
8621 |
| - | |
8622 |
| - | |
8623 |
| - | |
8624 |
| - | |
8625 |
| - | |
8626 |
| - | |
8627 |
| - | |
8628 |
| - | |
8629 |
| - | |
8630 |
| - | |
8631 |
| - | |
8632 |
| - | |
8633 | 8610 |
| |
8634 | 8611 |
| |
8635 | 8612 |
| |
| |||
8849 | 8826 |
| |
8850 | 8827 |
| |
8851 | 8828 |
| |
| 8829 | + | |
| 8830 | + | |
| 8831 | + | |
| 8832 | + | |
| 8833 | + | |
| 8834 | + | |
| 8835 | + | |
| 8836 | + | |
| 8837 | + | |
| 8838 | + | |
| 8839 | + | |
| 8840 | + | |
| 8841 | + | |
| 8842 | + | |
| 8843 | + | |
| 8844 | + | |
| 8845 | + | |
| 8846 | + | |
| 8847 | + | |
| 8848 | + | |
| 8849 | + | |
| 8850 | + | |
| 8851 | + | |
8852 | 8852 |
| |
8853 | 8853 |
| |
8854 | 8854 |
| |
|
Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 34 additions & 23 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 9 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
| 46 | + | |
50 | 47 |
| |
51 | 48 |
| |
52 | 49 |
| |
53 |
| - | |
| 50 | + | |
54 | 51 |
| |
55 |
| - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + |
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
147 |
| - | |
148 |
| - | |
149 |
| - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
150 | 152 |
| |
151 | 153 |
| |
152 | 154 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 |
| - | |
| 193 | + | |
194 | 194 |
| |
195 | 195 |
| |
196 | 196 |
| |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| 6 | + | |
| 7 | + | |
6 | 8 |
| |
7 | 9 |
| |
8 | 10 |
| |
| |||
89 | 91 |
| |
90 | 92 |
| |
91 | 93 |
| |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + |
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
264 | 279 |
| |
265 | 280 |
| |
266 | 281 |
| |
|
0 commit comments
Comments
(0)