lunasec
lunasec copied to clipboard
Refactor "X-Hasura-Real-User-Id" to "X-Hasura-User-Id"
Currently, the hasura permissions use "real-user-id" which is points to the user table, but the deprecated "user-id" points to the kratos table still. We should fully deprecate "user-id" pointing to kratos since we do not use it anymore.
Semantic nit here but I think we should transition everything to the new header so we don't make breaking changes here. I don't think hasura has any optimization/special cases for X-Hasura-User-Id
As it is, unless you know to use X-Hasura-Real-User-Id, your code will mysteriously not work if you use the value that hasura suggests for you to use "X-Hasura-User-Id". I have already made this mistake several times, and I know to use the "Real" value. I think biting the bullet and refactoring everything in one go to be consistent with what the documentation for hasura recommends using is warranted.
I agree. We could change everything to something like X-Lunasec-User-Id to make it more explicit but that may be more trouble than it's worth.