Combine cookie authentication with openidc on the same location ? #1024
Unanswered
shrirangangmail
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I don't think if/then/else would work because authentication handlers (like mod_auth_openidc) are executed before any of that logic is applied; you should be able to use 2 virtual hosts , each with their own AuthType, and proxy between those |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, first time working with apache httpd and mod_auth_openidc so this may be a bad or trivial question, but could not find anything after searching - we have a site where we have to provide two ways of auth - one with openidc and for a select few users who are outside the provider scope, a cookie based authentication. Both should be able to access the same resources once authenticated.
Is it possible at all ? I tried
<If ><Else>
within the directory directive but does not seem to work.we are using apache 2.4.54.
<Directory "/home/ws/proj/cgi-bin">
<If "%{HTTP_COOKIE} =~ /SWMAUTH/">
SetEnv ALLOWACCESS 1
Require env ALLOWACCESS
</If>
<Else>
AuthType openid-connect
Require valid-user
</Else>
</Directory>
TIA !
Beta Was this translation helpful? Give feedback.
All reactions