I am using a custom Rule to modify a SAML attributes mapping for SSO.
I am running Hasura with JWT authentication that depends on custom claims to determine data access privileges.
It is my understanding that I can add custom claims to the JWT in the Rule’s context, but this JWT is unfinished and invalid at the time the Rule is executing and so will be useless to me in the context of using it to authenticate with Hasura in that moment.
I believe I can make an external request to /oauth/token
using axios in the Rule, but I’m not sure if there is any way to get custom claims for my Rule with that route.
Ultimately I cannot determine if there is any way to generate a signed JWT from within a rule that has custom claims attached to it. Is anyone aware of any way to accomplish this?
To head off the suggestion: I am aware that I could pass an admin token to Hasura and that doing so would “solve” my problem, but I am hoping to avoid doing that.
Let me know if anything needs clarification and thanks!