-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(oauth2) security fixes #1409
Conversation
ALTER TABLE oauth2_authorization_codes ADD COLUMN credential_id uuid REFERENCES oauth2_credentials (id) ON DELETE CASCADE; | ||
]], | ||
down = [[ | ||
ALTER TABLE jwt_secrets DROP COLUMN credential_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: wrong table name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
a3e6f67
to
31d0f2b
Compare
{ | ||
name = "2016-07-15-oauth2_code_credential_id", | ||
up = [[ | ||
TRUNCATE oauth2_authorization_codes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that not an issue for current production instances?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Authorization codes are different than access tokens. They are supposed to be consumed immediately and they expire after 5 minutes. Not a big deal.
Just making sure. Ok then |
This fix involves a migration of the database to support an additional
credential_id
column in theoauth2_authorization_codes
table.