Oauth_access_token.authentication column too small on mysql (jmix 1.4)

insert into oauth_access_token (token_id, token, authentication_id, user_name, client_id, authentication, refresh_token) values (?, ?, ?, ?, ?, ?, ?)

the column is a blob (max 64k on mysql) and my authentication is 68kb

I see in the code that the whole org.springframework.security.oauth2.provider.OAuth2Authentication object is being serialized including all granted authorities.

Before I used a separate user for UI and rest, I guess combining them results in a user with many source role permissions leading to the exception.

Hi,
Did you try explicitly changing the column type in your database to something bigger, e.g. MEDIUMBLOB?

I did, and of course, then it works.

But that is not the problem that I am reporting.

I can think of workarounds like this myself, I’m reporting issues so they can be fixed so other people don’t have to run into them.

1 Like

Starting with upcoming Jmix 2.1 we will store only role names in the Authentication object (see the issue), so this problem should not appear.

1 Like