HI I'm using ory hydra 1.11.7 (can't upgrade to la...
# general
a
HI I'm using ory hydra 1.11.7 (can't upgrade to latest version due to some compatibility issue with our application/infra) ory hydra clients supports scopes as patient/Observation.rs patient/Patient.rs as per smart on FHIR guidelines But due to recent guidelines i need to support scopes having pipe i.e '|' such as patient/Observation.rs?category=observation-category|laboratory patient/Condition.rs?category=condition-category|heart i'm able to • register client with these scopes • sending same scope back to hydra with accept consent • get token with these scope (via auth_code flow) but hydra token contains scopes splitted as patient/Observation.rs?category=observation-category laboratory how i can correct this?
m
Hey Ejaz, unfortunately it is really hard for us to debug old versions. Maybe this is already fixed in the current version, I am not sure. If at all possible I would recommend to revisit a potential upgrade to the latest version - can you share more details on what the compatibility issue is?
If Hydra is splitting your scope at the pipe, it may be due to how the client or consent app is handling or encoding the scope string, but there is no documented way to change this behavior in v1.11.7. The only related documentation discusses scope representation (as a list or string) in tokens, but not the parsing or delimiter behavior for special characters like
|
in scopes, nor any workaround for this scenario in your version Customize OpenID Connect scope and claims.
Given your upgrade constraint, you may want to review your client and consent app logic to ensure the scope string is being passed and accepted as intended.
a
Hi @magnificent-energy-493, i checked on consent accept hydra api scopes are sent properly to hydra. but token issued by hydra have spliited the scopes
HI @magnificent-energy-493 i checked in hydra database, hydra is storing scopes in hydra_oauth2_authentication_request delimited by pipe '|' which is indeed causing issue as your delimiter is indeed a pipe
Hi @magnificent-energy-493 its not even fixed in latest version of ory -hydra https://github.com/ory/hydra/releases/tag/v25.4.0 i further debugged and found out the root cause of the issue in function sqlSchemaFromRequest you are storing scopes saperated by pipe '|' refer screenshot. Anyone up for the fix
m
Hello @ancient-camera-36261 thanks for the report! I'm afraid this is above my knowledge of Hydra internals, so I can't really help with this. Can you please open a bug report in ory/hydra for this or contact your account representative if you are an Ory Customer