我希望能够在apache服务器(ub16上的2.4.18+)上使用主要通过使用SAML(使用mod_auth_mellon插件)进行身份validation的path进行交互式使用,同时也支持主叫方先发送基本身份validation证书。 (认为通常会触发交互式表单login的REST API端点,但是如果您预先发送基本authentication凭据,则允许绕过。
基本上我正在寻找这种行为:
这样的事情可能吗? 我宁愿不把它推回到应用程序本身。
我不希望发生的事情是,Apache服务器发回响应,触发基本身份validation对话框。
回答我自己的问题….挖掘这个更多,并提出以下这似乎工作:
<Location /> <If "-n req('Authorization')"> AuthName "Active Directory" AuthBasicProvider ldap AuthType basic AuthLDAPMaxSubGroupDepth 0 AuthLDAPBindAuthoritative off AuthLDAPRemoteUserAttribute sAMAccountName AuthLDAPInitialBindPattern (.+) $1@yyyyy AuthLDAPInitialBindAsUser on AuthLDAPSearchAsUser on AuthLDAPCompareAsUser on AuthLDAPUrl "ldaps://xxx,dc=com?sAMAccountName,memberOf?sub" LDAPReferrals Off require valid-user </If> <Else> Require valid-user AuthType "Mellon" MellonEnable "auth" MellonVariable "cookie" MellonEndpointPath "/sso" MellonDefaultLoginPath "/" MellonSubjectConfirmationDataAddressCheck Off MellonSessionLength 86400 MellonSPPrivateKeyFile /...../sp-private-key.pem MellonIdPMetadataFile /...../idp-metadata.xml MellonDoNotVerifyLogoutSignature https://........ </Else> </Location>
有人看到这个方法有什么问题吗?