I am trying to configure SSO from an IdP to Apache with mod_mellon and mod proxy to splunk.
Environment: Ubuntu 14.04; Apache 2.4.7; mod-auth-mellon 0.7.0.
Apache configured with the mellon-generated key / cert on default ssl site. mod proxy is being used to proxy to splunk locally on port 8000.
auth_mellon.conf
:
MellonCacheSize 100
MellonLockFile "/var/lock/mod_auth_mellon.lock"
MellonPostDirectory "/var/cache/apache2/mod_auth_mellon/"
ProxyRequests Off
ProxyPass /secret/ !
ProxyPassInterpolateEnv On
<Location />
MellonEnable "info"
Require valid-user
AuthType "Mellon"
MellonVariable "cookie"
MellonSamlResponseDump On
MellonSPPrivateKeyFile /etc/apache2/mellon/urn_splunk.key
MellonSPCertFile /etc/apache2/mellon/urn_splunk.cert
MellonSPMetadataFile /etc/apache2/mellon/urn_splunk.xml
MellonIdpMetadataFile /etc/apache2/mellon/idp-meta.xml
MellonEndpointPath /secret/endpoint
MellonUser "NAME_ID"
MellonDefaultLoginPath /en-US/
RequestHeader set SplunkWebUser %{MELLON_NAME_ID}e
MellonSamlResponseDump On
ProxyPass http://127.0.0.1:8000/
ProxyPassReverse http://127.0.0.1:8000/
ProxyPassInterpolateEnv On
</Location>
idp-meta.xml
contains the metadata from the IDP (including the IDP x509 cert and HTTP Post / HTTP Redirect parameters). the urn_service.*
files are generated from a mellon_create_metadata.sh
script that creates an x509 cert and key on the SP and xml config file.
When I try access the splunk from the IdP, I see errors in the apache log file, and get a 500 / internal server error response:
[authz_core:debug] mod_authz_core.c(802): AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[authz_core:debug] mod_authz_core.c(802): AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
[core:error] AH00027: No authentication done but request not allowed without authentication for /secret/endpoint/login. Authentication not configured?
It seems like the SAML authentication is failing. I am following this guide: http://blogs.splunk.com/2013/10/09/splunk-sso-using-saml-through-okta/
Splunk is configured to authenticate with LDAP, and is authenticating correctly. Does apache also need to be configured with ldap authentication to identify valid-users too? (not sure about how users are authenticated in apache/mellon, assumed that's all handled by the payload from IdP and mellon just knows about the identity
MellonPostDirectory "/var/cache/apache2/mod_auth_mellon/"
and bothMellonSamlResponseDump
andMellonPostReplay
set toOn
but not finding anything in that directory.