v26.4.18
v26.4.18
Deleting a consent flow no longer deletes its tokens and codes
The foreign keys from the six token and code tables to hydra_oauth2_flow are dropped by six migrations. Consent revocation
deletes tokens and codes itself, so its behavior is unchanged. Deleting flow rows directly in the database no longer deletes the
tokens and codes issued under them; they expire on their own.
Upgrade to v26.4.16 before this release and do not skip it. Finish rolling it out on every Hydra instance before you apply this release's migrations. A process older than v26.4.16 that revokes consent against this release's schema leaves the flow's unredeemed authorization codes and device codes valid until they expire.
On PostgreSQL, apply the migrations in a quiet window. Each of the six migrations takes an ACCESS EXCLUSIVE lock on the table it
alters and on hydra_oauth2_flow. A long-running transaction delays that lock, and queries against both tables queue behind it
until the migration finishes.
Rolling back re-adds the foreign keys, which fails while any token or code references a consent flow that no longer exists. Before rolling back, clear those references with the statement in the revert guide, and run the down migrations before starting an older version.