Can we issue a new token without adding a row to hydra_oauth2_access table? #3576
Replies: 1 comment 4 replies
-
Hello @AleksanderBrzozowski I have not done anything like this yet, but I think yes it should be possible to omit that table. It's worth noting that by default, Ory issues opaque access tokens, which are random strings with a cryptographic signature that have no meaning or structure. These tokens are stored in a database, and their validity is checked by performing a database lookup. JWTs, on the other hand, are self-contained and do not require a database lookup to validate. Instead, JWTs contain a signature that can be verified to ensure that the token has not been tampered with -> source. |
Beta Was this translation helpful? Give feedback.
-
Hi, we use ORY Hydra in our company to generate JWT tokens. We don't use revocation functionality of ORY Hydra, and we validate tokens outside ORY Hydra instance - we have our own service that uses ORY Hydra JWKS to validate the token.
We wonder if it is possible to generate a new JWT token with ORY Hydra without making changes in the database? I saw that whenever a new token is generated, a new row is added to hydra_oauth2_access table. I assume that it is later used to inspect the token, for example to check if it's active. Since we don't need this functionality, I thought that maybe it is possible to omit writing to this table. With such feature, we would be able to generate tokens using read only database access.
Beta Was this translation helpful? Give feedback.
All reactions