0

I have an Apache server where users authenticate to a website through Kerberos/GSSAPI (mod_auth_gssapi). In the event of a user attempting to visit the site externally (not available on the network ldap server), I would like to fallback to SAML authentication (mod_auth_mellon), but am having trouble figuring out if this is even possible. I am managing the config for this in httpd.conf. Both work independently of each other.

I have seen a number of suggestions and threads, but nothing seems to work for me. The Mellon module github page recommends using a config to preemptively check for credentials, but in my case, credentials do not exist yet, and any IF statements executed would happen before I can retrieve them.

Essentially, I would like to do this:

  1. User visits site
  2. Apache checks for LDAP username credentials through Kerberos/GSSAPI
  3. If Kerberos credentials do not exist, try to mauthenticate through SAML/Mellon

I do not know ahead of time which users' information will be available in my local AD server or attempting to access externally.

I would like to keep this on the Apache side if possible, though I may have to relent and run SimpleSAML or something after Apache authenticates.

I am expecting to have an authentication fallback of Kerberos to SAML in my Apache config. Currently, Apache defaults to the last authentication method listed in the config file. I would like an either/or scenario, depending on whether the first authentication method is able to obtain a valid user.

Any ideas, thoughts, solutions, criticisms appreciated.

0 Answers0