- Notifications
You must be signed in to change notification settings - Fork1k
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 changedOriginal 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 |
| |
|
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 |
| |
|
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 |
| |
|
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
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 | + |
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 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 |
| - | |
| 193 | + | |
194 | 194 |
| |
195 | 195 |
| |
196 | 196 |
| |
|
0 commit comments
Comments
(0)