-
Notifications
You must be signed in to change notification settings - Fork 1.3k
JdbcOAuth2AuthorizationService supports clob and text datatype for token columns #491
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
Conversation
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.
Thanks for the PR @ovidiupopa91.
The changes do work for Postgres but doesn't work anymore for oauth2_authorization
tables that have already defined blob
. The changes will force applications to update the schema.
We'll need to come up with a backwards compatible strategy. For now, I'm going to push this to the 0.2.2
release to allow for more time.
...ces/org/springframework/security/oauth2/server/authorization/oauth2-authorization-schema.sql
Outdated
Show resolved
Hide resolved
Hi @ovidiupopa91 and Happy New year! I hope you had a relaxing break :) Just touching base to see how the updates are coming along? |
hi @jgrandja . Happy New Year to you too! Actually, this is my first day back. I will check today if anything else needs to be done (as far as I can remember the implementation is done, and all tests are passing except one or two). |
Welcome back @ovidiupopa91 ! Just a heads up that more changes will be required. My suggestion to change the column types to varchar will not work. Please see gh-550 and gh-557 for additional details. We'll need to ensure that data items that have variable length data (e.g. access_token_value, access_token_metadata, attributes, etc.) are defined with a standard sql type that will allow for variable length without restricting size, e.g Can you look into which standard sql type would work for at least mysql and postgres and we can decide from there. Thanks! |
hi @jgrandja . Based on postgresql datatypes and mysql datatypes I will change the schema to use text instead of clob for all columns that might have variable length data. |
Thanks for looking into this @ovidiupopa91. Although
Only change the columns that have |
hi @jgrandja . I've pushed the updated implementation. Do you think it's still necessary to have a different file where the |
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.
Thanks for the updates @ovidiupopa91. Please see review comments.
...org/springframework/security/oauth2/server/authorization/JdbcOAuth2AuthorizationService.java
Outdated
Show resolved
Hide resolved
...org/springframework/security/oauth2/server/authorization/JdbcOAuth2AuthorizationService.java
Outdated
Show resolved
Hide resolved
...org/springframework/security/oauth2/server/authorization/JdbcOAuth2AuthorizationService.java
Outdated
Show resolved
Hide resolved
...pringframework/security/oauth2/server/authorization/oauth2-authorization-schema-postgres.sql
Show resolved
Hide resolved
@ovidiupopa91 Will you be able to submit the updates by tomorrow? I'd like to get this into the release this Wed. If you don't have time, no worries, I can submit it. Please let me know. |
hi @jgrandja . I've just pushed the changes. Sorry for the delay but I was quite backlogged in the last couple of weeks. |
Thanks @ovidiupopa91 ! I'll look at this tomorrow and get it merged. |
Thanks for all the updates @ovidiupopa91. FYI, I added a polish commit and just merged this into main. |
Great @jgrandja . Let me know when you have anything else that I can take a look at. Thanks! |
For sure @ovidiupopa91. I'll get back to you soon. |
Sounds good @ovidiupopa91 ! Please respond on both issues and I'll assign to you. |
Use CLOB instead of BLOB. With CLOB type the underlying schema can store varchars and clobs as well (if this is supported by the database)
Closes gh-480