Skip to content
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

mariadb authorization fails with BadSqlGrammarException #774

Closed
Yneth opened this issue Jun 9, 2022 · 1 comment
Closed

mariadb authorization fails with BadSqlGrammarException #774

Yneth opened this issue Jun 9, 2022 · 1 comment
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@Yneth
Copy link

Yneth commented Jun 9, 2022

Describe the bug
Cannot authorize on existing registered client

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO oauth2_authorization (id, registered_client_id, principal_name, authorization_grant_type, attributes, state, authorization_code_value, authorization_code_issued_at, authorization_code_expires_at,authorization_code_metadata,access_token_value,access_token_issued_at,access_token_expires_at,access_token_metadata,access_token_type,access_token_scopes,oidc_id_token_value,oidc_id_token_issued_at,oidc_id_token_expires_at,oidc_id_token_metadata,refresh_token_value,refresh_token_issued_at,refresh_token_expires_at,refresh_token_metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is java.sql.SQLSyntaxErrorException: (conn=4) Could not convert [{"@class":"java.util.Collections$UnmodifiableMap","java.security.Principal":

is thrown for attribute column on insertion.

To Reproduce
Attempt to authorize via existing registered client
example url
http://localhost:8080/oauth2/authorize?scope=client.read%20openid&response_type=code&client_id=client_id&redirect_uri=https://oauthdebugger.com/debug

Expected behavior
Should successfully authorize

Sample
I have the same issue as described in
#520

TO be exact BLOB int value for mariadb is equal to -4
which is set here

BUT it is later used

failing to convert string to byte array as 2004 != -4

@Yneth Yneth added the type: bug A general bug label Jun 9, 2022
@jgrandja
Copy link
Collaborator

@Yneth Closing this as a duplicate of gh-550.

For additional details, please see this comment.

@jgrandja jgrandja self-assigned this Jun 14, 2022
@jgrandja jgrandja added status: duplicate A duplicate of another issue and removed type: bug A general bug labels Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants