Authenticator not switching role #1924
-
I have configured PostgREST with Keycloak for application users and Basic auth for service accounts. I have working Keycloak and working basic auth on /rpc/login. I have backend service written in Python using postgrest-py which is making a call to a rest endpoint using basic auth like so:
Permissions for role 'publisher' on table followers.
Roles
PostgREST is falling back to the anon user and not considering this an authenticated call. Unable to figure out whether it's an issue with PostgREST or the Python library. Help much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Seems there's no token passed so it makes sense that postgrest defaults to
Most likely the lib, switching roles is well tested as of now. You can try making plain http calls to confirm(send the |
Beta Was this translation helpful? Give feedback.
Seems there's no token passed so it makes sense that postgrest defaults to
anon
.Most likely the lib, switching roles is well tested as of now. You can try making plain http calls to confirm(send the
Authorization
header with curl).