現状:
認証成功したら、アドレスがhttps://sp.example.com/mellon/postResponse になり、「Bad Request」のエラーメッセージがブラウザに表示され、SP側のアクセス先に遷移できません。(URLにrelaystateが正しく設定されていることが確認できた)
各情報:
・IDPはsimpleSAMLphp を利用しています
・mod_auth_mellonバージョン:mod_auth_mellon-0.8.0-4.el6.x86_64
・SPのentityID:https://sp.example.com/samlsp
EndPoint:https://sp.example.com/mellon
・mellon_create_metadata.sh の結果は下記の通り:
Output files: Private key: https_sp.example.com_samlsp.key Certificate: https_sp.example.com_samlsp.cert Metadata: https_sp.example.com_samlsp.xml Host: sp.example.com Endpoints: SingleLogoutService: https://sp.example.com/mellon/logout AssertionConsumerService: https://sp.example.com/mellon/postResponse
・IDP metadeta:
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="https://192.168.100.217/simplesaml/saml2/idp/metadata.php"> <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> <md:KeyDescriptor use="signing"> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:X509Data> <ds:X509Certificate>MIIDZTCCAk2gAwIBAgIJAL5X8Ko+QgkQMA0GCSqGSIb3DQEBCwUAMEkxCzAJBgNVBAYTAkpQMQ4wDAYDVQQIDAVBSUNISTEPMA0GA1UEBwwGTkFHT1lBMQswCQYDVQQKDAJaRDEMMAoGA1UEAwwDaWRwMB4XDTIwMDUxMzA4MjQ1OVoXDTMwMDUxMzA4MjQ1OVowSTELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBUFJQ0hJMQ8wDQYDVQQHDAZOQUdPWUExCzAJBgNVBAoMAlpEMQwwCgYDVQQDDANpZHAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDYVa8wONtQ1/MdVKL4/zgGNzpr5AjQ3hxXYjrNeievDtPg0tLuBsVpOVQ3S2Hz8Kv+ipMqgKhHpue9AKkOhl4NPdpjgycFH2DWeF+MK3HRF1kUovmFFiP+8ZU+wq7f+lcjX5H2kKQr5x4DS0Y7NZU7eMS8LE/I1svBJfJnSa/OTzwgfPF1kKCn5xwyKTd5LlO19tnHFezccMB6+BFmu0qtPy38vAVO95ZRv6cDtluNxPpm21RrEhxPhe/Uwbog3jaj8eA1Aok9xCJZ2/3MExwZcFERDb3u21UN2iL+NPBpqqD2SeokstG8YnFBhe6EulgyR3k3oGET1GzS5ZWmuKZ5AgMBAAGjUDBOMB0GA1UdDgQWBBSQxjoS5fyCo2j/me7e2uPOZwq2WjAfBgNVHSMEGDAWgBSQxjoS5fyCo2j/me7e2uPOZwq2WjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQDVJ9lJ8lfb35JkWOdZn2zrWuNhBG2qljensPK0xIAtAdnVPRGi2tLTxotk3T8Hmswk/4ANqJeEGWkGrPa3t1VBsR9oIbqc/DWok75vgfrN6xxuX1Y8+1MMdNxmdFNE/ll/AMNIfw5GGQBZ8I0zC5snsOkClJz20cu8n3MIYTeujn0QzLlg6QZwbEfea6WExKDZeG8/yR89x2lTpN+y61F0/huKhHOOaH41Z6CkzKAXpqFuNh0F80VFzFtO8mA7pRYX6rB47ZyB7cKhYOcDE9hcPeaG4OfhaUKJBQydjU9lT+kolj1bitudKEQGlECwGrGqsUrYiTG8M8DFxc67sIxC</ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </md:KeyDescriptor> <md:KeyDescriptor use="encryption"> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:X509Data> <ds:X509Certificate>MIIDZTCCAk2gAwIBAgIJAL5X8Ko+QgkQMA0GCSqGSIb3DQEBCwUAMEkxCzAJBgNVBAYTAkpQMQ4wDAYDVQQIDAVBSUNISTEPMA0GA1UEBwwGTkFHT1lBMQswCQYDVQQKDAJaRDEMMAoGA1UEAwwDaWRwMB4XDTIwMDUxMzA4MjQ1OVoXDTMwMDUxMz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:HTTP-Redirect" Location="https://192.168.100.217/simplesaml/saml2/idp/SingleLogoutService.php"/> <md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</md:NameIDFormat> <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://192.168.100.217/simplesaml/saml2/idp/SSOService.php"/> </md:IDPSSODescriptor> </md:EntityDescriptor>
・SP Metadata:
<SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> <KeyDescriptor use="signing"> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:X509Data> <ds:X509Certificate>MIICrjCCAZYCCQCDvGPw2KvNgzANBgkqhkiG9w0BAQUFADAZMRcwFQYDVQQDEw5z cC5leGFtcGxlLmNvbTAeFw0yMDA1MjYwNzQ2MzFaFw0zMDA1MjYwNzQ2MzFaMBkx FzAVBgNVBAMTDnNwLmV4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAw/NECo448ATizzdjpZPMdNrBj0UhO3SVZCjCmUTHQc+wuLW9m/oV fsPbVkBqlJyMvXY99w2eMo9lJKjcYH0KwLyzFI4Dm/edIGs0406h9HUHmkJUUaLc q4z8Tu+CfKQ37x5u5TAogHwUmt38UrReUCN2AWW2K3953Mt3H0vq5c7Ig9aGrUl3 JqMa43vIk/YsWLk4QweSc2GxHGw/mbDiOt4WB6YZYqPI4Jbgh6gvBjEkolx+QgU7 uTIcUqDgJv7S/+b3kc2V/Tyc5fRubRo35k4QmLlOJISG5cLC1rDtsuz1eofy25sy fVxB6nY/6c4N6sgOV/U9f/fhir7s227zmwIDAQABMA0GCSqGSIb3DQEBBQUAA4IB AQBRB0vops2BXIDQpZIz/hqXidiQcmA68Fw3XCN/hzDS3oISwl72L2RlKO5+ddXs d0HXzyx+V245lTmXKCSlOTSy2jeXeL6RNjdfQtKMPGiDPuKFajDN4FvXJh1S+B0j EEca69ypXW0QziqoS9s8dx2f6UDAjpfggqPG4Bkj7WNZrLUJk6fvF90QoEfkQV+4 hTJYEKa9yiaTcPPseb0GQd2KpowZn56NCRYhYnYp69ebJaXqVdCzJvCrvNqXFeKR b4mEisOF+NDs/PoPkkkXlEVXiyNKbr1hDncOaEa3qeMFNRVuq4zlAzR/dzgvyCYc heHWlMB/S0Oo73qJ6iUF+brh</ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </KeyDescriptor> <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://sp.example.com/mellon/logout"/> <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://sp.example.com/mellon/postResponse" index="0"/> </SPSSODescriptor> </EntityDescriptor>
・auth_mellon.conf
MellonCacheSize
1MellonLockFile "/var/run/mod_auth_mellon/lock" 2 3 4<Location /> 5 MellonEndpointPath "/mellon" 6 MellonIdPMetadataFile /etc/httpd/metadata/idp_metadata.xml 7 MellonSPPrivateKeyFile /etc/httpd/metadata/https_sp.example.com_samlsp.key 8 MellonSPCertFile /etc/httpd/metadata/https_sp.example.com_samlsp.cert 9 MellonSPMetadataFile /etc/httpd/metadata/https_sp.example.com_samlsp.xml 10</Location> 11 12<Location /mellon> 13 Options Indexes MultiViews FollowSymLinks 14 AuthType "Mellon" 15 Require valid-user 16 MellonEnable "auth" 17</Location> 18 19Alias /samltest/ "/var/www/samltest/" 20<Location /samltest> 21 AuthType "Mellon" 22 Require valid-user 23 MellonEnable "auth" 24</Location>
・テスト時の操作:
1.ブラウザから「https://sp.example.com/samltest/hello.html」を入力したら、IDP側のログイン画面が表示されます。
2.テスト用のユーザでログインしたら、ブラウザのアドレスが「https://sp.example.com/mellon/postResponse」になり、「400 Bad Request」が表示されます。
設定が間違っているのかどなたが助けてください。
どうもありがとうございます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。