How to pass all LDAP groups in request header? #803
-
We use mod_auth_openidc for authentication and an LDAP server for authorization, pretty much exactly as shown in https://github.com/zmartzone/mod_auth_openidc/wiki/Authorization#2-mod_authnz_ldap . We name a group in our httpd-ssl.conf that people must be in, and access is granted (or denied) based on the LDAP server's answer about an authenticated user. But today we only have one LDAP group; you're either in or out. Next step: define and use multiple groups. For example, a user should be allowed privileged admin functions within our app only if the user is in the appropriate LDAP group. But that's not a decision the Apache HTTPD server can make. Please tell me, is there a way to add all the user's LDAP group names in a request header going to our back-end server? That will let our server use the LDAP groups to make fine-grained decisions about data access based on user privileges. I hope this question makes sense. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
it is more of a question for/about mod_authz_ldap: it looks like environment variables are made available that can be used in mod_header's |
Beta Was this translation helpful? Give feedback.
it is more of a question for/about mod_authz_ldap: it looks like environment variables are made available that can be used in mod_header's
RequestHeader
primitive to pass them on in a header. See: https://httpd.apache.org/docs/2.4/mod/mod_authnz_ldap.html#exposed