keycloak-aplcache
Changes
testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.cert 17(+17 -0)
testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.key 28(+28 -0)
testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.xml 77(+77 -0)
Details
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/auth_mellon.conf b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/auth_mellon.conf
new file mode 100644
index 0000000..4ab4785
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/auth_mellon.conf
@@ -0,0 +1,27 @@
+MellonCacheSize 100
+MellonLockFile "/run/mod_auth_mellon/lock"
+
+# This is a server-wide configuration that will add information from the Mellon session to all requests.
+<Location />
+ # Add information from the mod_auth_mellon session to the request.
+ MellonEnable "info"
+
+ # Configure the SP metadata
+ # This should be the files which were created when creating SP metadata.
+ MellonSPPrivateKeyFile /etc/apache2/mellon/http_localhost_auth.key
+
+ MellonSPCertFile /etc/apache2/mellon/http_localhost_auth.cert
+ MellonSPMetadataFile /etc/apache2/mellon/http_localhost_auth.xml
+
+ # IdP metadata. This should be the metadata file you got from the IdP.
+ MellonIdPMetadataFile /etc/apache2/mellon/idp-metadata.xml
+
+ # The location all endpoints should be located under.
+ # It is the URL to this location that is used as the second parameter to the metadata generation script.
+ # This path is relative to the root of the web server.
+ MellonEndpointPath /mellon
+</Location>
+
+<Location /auth>
+ MellonEnable "auth"
+</Location>
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/Dockerfile b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/Dockerfile
new file mode 100644
index 0000000..014e102
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/Dockerfile
@@ -0,0 +1,17 @@
+FROM ubuntu
+
+RUN apt-get update && apt-get install -y apache2 && apt-get install -y libapache2-mod-auth-mellon
+
+RUN mkdir /etc/apache2/mellon
+
+COPY mellon/* /etc/apache2/mellon/
+
+COPY auth_mellon.conf /etc/apache2/mods-enabled/
+
+COPY www/* /var/www/html/
+
+RUN mkdir /var/www/html/auth
+
+COPY www/auth/* /var/www/html/auth/
+
+CMD /usr/sbin/apache2ctl -D FOREGROUND
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.cert b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.cert
new file mode 100644
index 0000000..1cd6fb3
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.cert
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICrjCCAZYCCQDmdnUguf+VxTANBgkqhkiG9w0BAQsFADAZMRcwFQYDVQQDDA5s
+b2NhbGhvc3Q6ODM4MDAeFw0xNjAxMTkxMTUwMDdaFw0yNjAxMTgxMTUwMDdaMBkx
+FzAVBgNVBAMMDmxvY2FsaG9zdDo4MzgwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAuissRqhpCBR9nMuoRp+Varx151DKbmdL6NhNxWUOdaYF+fSpNmtG
+0NsaYV0Coz0Jak/6ap7EfhUeG83vh0G2xj6YTVYtXDVMnUPGmzHprvmFvTOfP4KI
+VM+1aHcPLfk8ED4ea6TOPDGBjmQw8Y9nZaMATDqEnO8IGaF/Jkl476O3Ek1Nd5yO
+Sday83Or1GkD+ZsZxvyc0CpGJYYaGPrsUFAXekebSlon5SIDerQB7WgABSoGOKDo
+I8Z+JU/KftwewrE0hr9GZ8HAYBJVt0XfuNSWL7ulmF2HC3RZ877FYk3Vg3KVQs7d
+yJfK3+V3pGyzOBp/xU61nVZrb0fvua1hWQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
+AQCPR4RhXan28Eq/A6pGfJ29USKLqqDZChYy9q71Zi8hTs4+YYD6wMU8kz+MnTHC
+/Gf+6XFix7W07XxpFirZ5dkENn7lQUBklBmbxRdB9aW9WfJjx148a/I4+pXZalEI
+fqpnmWBYt4+/L9exu8tIwj/bshBmuO8Nn4ronTBDgrTCu5feyYO5l12hEdT2d+5r
+wc/Be66ftl8eOhsr9XJNidjoTVGB3SlHC6v0J7izgS+wT0UxIi3a3gwzW5ZsF4y8
+8iEicAVGmkjgmyJ5GoInQhVhLU2vlxgoULAEWKhF79JYChkGSg8dXAvqBfLm3OCg
+hxj9HldPc8mCn3gMt8F+POZL
+-----END CERTIFICATE-----
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.key b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.key
new file mode 100644
index 0000000..e3fe5ac
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC6KyxGqGkIFH2c
+y6hGn5VqvHXnUMpuZ0vo2E3FZQ51pgX59Kk2a0bQ2xphXQKjPQlqT/pqnsR+FR4b
+ze+HQbbGPphNVi1cNUydQ8abMemu+YW9M58/gohUz7Vodw8t+TwQPh5rpM48MYGO
+ZDDxj2dlowBMOoSc7wgZoX8mSXjvo7cSTU13nI5J1rLzc6vUaQP5mxnG/JzQKkYl
+hhoY+uxQUBd6R5tKWiflIgN6tAHtaAAFKgY4oOgjxn4lT8p+3B7CsTSGv0ZnwcBg
+ElW3Rd+41JYvu6WYXYcLdFnzvsViTdWDcpVCzt3Il8rf5XekbLM4Gn/FTrWdVmtv
+R++5rWFZAgMBAAECggEAMqBW9AgMN/RKjH8djccL/PCvJ25i/k78558a1xk6K2gw
+q96KvY/CvD05GU0P0JBipRSGxsPSL29StsDz6FZIe/S9uho7T5327bVmpwGVyM12
+PxNwtPasWFP7wyLNb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zOXFW1+YrLO4YCX822LEXcFpTQHeYs95zAG
+HP19NdUCeAl8/YFqifhpHvo=
+-----END PRIVATE KEY-----
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.xml b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.xml
new file mode 100644
index 0000000..3e77cc8
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/http_localhost_auth.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<EntityDescriptor
+ entityID="http://localhost:8380/auth"
+ xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
+ <SPSSODescriptor
+ AuthnRequestsSigned="true"
+ WantAssertionsSigned="true"
+ 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>MIICrjCCAZYCCQDmdnUguf+VxTANBgkqhkiG9w0BAQsFADAZMRcwFQYDVQQDDA5s
+ b2NhbGhvc3Q6ODM4MDAeFw0xNjAxMTkxMTUwMDdaFw0yNjAxMTgxMTUwMDdaMBkx
+ FzAVBgNVBAMMDmxvY2FsaG9zdDo4MzgwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+ MIIBCgKCAQEAuissRqhpCBR9nMuoRp+Varx151DKbmdL6NhNxWUOdaYF+fSpNmtG
+ 0NsaYV0Coz0Jak/6ap7EfhUeG83vh0G2xj6YTVYtXDVMnUPGmzHprvmFvTOfP4KI
+ VM+1aHcPLfk8ED4ea6TOPDGBjmQw8Y9nZaMATDqEnO8IGaF/Jkl476O3Ek1Nd5yO
+ Sday83Or1GkD+ZsZxvyc0CpGJYYaGPrsUFAXekebSlon5SIDerQB7WgABSoGOKDo
+ I8Z+JU/KftwewrE0hr9GZ8HAYBJVt0XfuNSWL7ulmF2HC3RZ877FYk3Vg3KVQs7d
+ yJfK3+V3pGyzOBp/xU61nVZrb0fvua1hWQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
+ AQCPR4RhXan28Eq/A6pGfJ29USKLqqDZChYy9q71Zi8hTs4+YYD6wMU8kz+MnTHC
+ /Gf+6XFix7W07XxpFirZ5dkENn7lQUBklBmbxRdB9aW9WfJjx148a/I4+pXZalEI
+ fqpnmWBYt4+/L9exu8tIwj/bshBmuO8Nn4ronTBDgrTCu5feyYO5l12hEdT2d+5r
+ wc/Be66ftl8eOhsr9XJNidjoTVGB3SlHC6v0J7izgS+wT0UxIi3a3gwzW5ZsF4y8
+ 8iEicAVGmkjgmyJ5GoInQhVhLU2vlxgoULAEWKhF79JYChkGSg8dXAvqBfLm3OCg
+ hxj9HldPc8mCn3gMt8F+POZL
+ </ds:X509Certificate>
+ </ds:X509Data>
+ </ds:KeyInfo>
+ </KeyDescriptor>
+ <KeyDescriptor use="encryption">
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+ <ds:X509Data>
+ <ds:X509Certificate>MIICrjCCAZYCCQDmdnUguf+VxTANBgkqhkiG9w0BAQsFADAZMRcwFQYDVQQDDA5s
+ b2NhbGhvc3Q6ODM4MDAeFw0xNjAxMTkxMTUwMDdaFw0yNjAxMTgxMTUwMDdaMBkx
+ FzAVBgNVBAMMDmxvY2FsaG9zdDo4MzgwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+ MIIBCgKCAQEAuissRqhpCBR9nMuoRp+Varx151DKbmdL6NhNxWUOdaYF+fSpNmtG
+ 0NsaYV0Coz0Jak/6ap7EfhUeG83vh0G2xj6YTVYtXDVMnUPGmzHprvmFvTOfP4KI
+ VM+1aHcPLfk8ED4ea6TOPDGBjmQw8Y9nZaMATDqEnO8IGaF/Jkl476O3Ek1Nd5yO
+ Sday83Or1GkD+ZsZxvyc0CpGJYYaGPrsUFAXekebSlon5SIDerQB7WgABSoGOKDo
+ I8Z+JU/KftwewrE0hr9GZ8HAYBJVt0XfuNSWL7ulmF2HC3RZ877FYk3Vg3KVQs7d
+ yJfK3+V3pGyzOBp/xU61nVZrb0fvua1hWQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
+ AQCPR4RhXan28Eq/A6pGfJ29USKLqqDZChYy9q71Zi8hTs4+YYD6wMU8kz+MnTHC
+ /Gf+6XFix7W07XxpFirZ5dkENn7lQUBklBmbxRdB9aW9WfJjx148a/I4+pXZalEI
+ fqpnmWBYt4+/L9exu8tIwj/bshBmuO8Nn4ronTBDgrTCu5feyYO5l12hEdT2d+5r
+ wc/Be66ftl8eOhsr9XJNidjoTVGB3SlHC6v0J7izgS+wT0UxIi3a3gwzW5ZsF4y8
+ 8iEicAVGmkjgmyJ5GoInQhVhLU2vlxgoULAEWKhF79JYChkGSg8dXAvqBfLm3OCg
+ hxj9HldPc8mCn3gMt8F+POZL
+ </ds:X509Certificate>
+ </ds:X509Data>
+ </ds:KeyInfo>
+ </KeyDescriptor>
+ <SingleLogoutService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="http://localhost:8380/mellon/logout"/>
+ <SingleLogoutService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="http://localhost:8380/mellon/logout"/>
+ <SingleLogoutService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="http://localhost:8380/mellon/logout"/>
+ <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
+ <AssertionConsumerService
+ index="0"
+ isDefault="true"
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="http://localhost:8380/mellon/postResponse"/>
+ <AssertionConsumerService
+ index="1"
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
+ Location="http://localhost:8380/mellon/artifactResponse"/>
+ <AssertionConsumerService
+ index="2"
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
+ Location="http://localhost:8380/mellon/paosResponse"/>
+ </SPSSODescriptor>
+</EntityDescriptor>
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/idp-metadata.xml b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/idp-metadata.xml
new file mode 100755
index 0000000..fd88682
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/mellon/idp-metadata.xml
@@ -0,0 +1,34 @@
+<EntitiesDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" Name="urn:keycloak">
+ <EntityDescriptor entityID="http://localhost:8180/auth/realms/mellon-test">
+ <IDPSSODescriptor WantAuthnRequestsSigned="true"
+ protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <NameIDFormat>
+ urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
+ </NameIDFormat>
+ <NameIDFormat>
+ urn:oasis:names:tc:SAML:2.0:nameid-format:transient
+ </NameIDFormat>
+ <NameIDFormat>
+ urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
+ </NameIDFormat>
+ <NameIDFormat>
+ urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
+ </NameIDFormat>
+ <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="http://localhost:8180/auth/realms/mellon-test/protocol/saml"/>
+ <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="http://localhost:8180/auth/realms/mellon-test/protocol/saml"/>
+ <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="http://localhost:8180/auth/realms/mellon-test/protocol/saml"/>
+ <KeyDescriptor use="signing">
+ <dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <dsig:X509Data>
+ <dsig:X509Certificate>
+ MIICpTCCAY0CBgFSP3CJrTANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAttZWxsb24tdGVzdDAeFw0xNjAxMTQwOTE5NDVaFw0yNjAxMTQwOTIxMjVaMBYxFDASBgNVBAMMC21lbGxvbi10ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApaZ6nndLegc+aKXNog08KdWOIZfr393e0nlqZ3SzNCYJ+IrSAWepCNvUW4W0samrtC47XBYNJwBSw9KCLNcpOeR7IC+gtmm8t9VH0QRxDEOvoLoj0zMkuaBhF+1NZdt6kc5gYVSeymkFSG/Eyz06Zo9zfhb52tUK83hYPcRE2azBDAuffnnHGg+fiCMZtMz7qCYXSoGy15odM1AypILDGxCtDpk0nPmwp6AlA7LpWLKYFEXrXhPmZGw2eDA6FqLFYgBovffJzFy1WzqpAzpKbYqVbb/yKUbv5NI4ELlOdjvXfoB7wOp3cHwnuq1G8YjR7OKLeVtszKXUPCjwFSZnFwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBwRkPh3pSAG1UWr1rJW9LMVdfu6KFsVTCMqExuJKUrH4hAPKXXi9iEAyiB/+NdnG8bgvU0xhdH9lW51J1JpH3xRtOMV+1CAZB41RFx1r/zJg0Zrdbfodv1UFJtLhSIKhKnfoSdlml2O9SHwd4VQmwz/QQqzBIS+yJDv7cOxMRszryWq5aWCPMosxwuAJzjwlF6jBHqidkd4EGTNMDK1pDZN1voiYS0ry7h7Lcq2ZbrBFzBqzHvXieym68ACDHr5hkKe065ne1hCgO/+POsAi6VU+qlSbzsD9NenHP60c9+Dt/IY9DeX6IubXChcW5A+qnb5qRWBtwXshfcsDFHYkBJ
+ </dsig:X509Certificate>
+ </dsig:X509Data>
+ </dsig:KeyInfo>
+ </KeyDescriptor>
+ </IDPSSODescriptor>
+ </EntityDescriptor>
+</EntitiesDescriptor>
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/www/auth/index.html b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/www/auth/index.html
new file mode 100644
index 0000000..eca13d5
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/www/auth/index.html
@@ -0,0 +1,3 @@
+<a href="/">Go to unprotected resource</a>
+<a href="/mellon/logout?ReturnTo=/">logout</a>
+Protected resource
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/www/index.html b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/www/index.html
new file mode 100755
index 0000000..37a8fcb
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/docker/www/index.html
@@ -0,0 +1,2 @@
+<a href="/auth">Go to protected resource</a>
+Unprotected resource
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/README.md b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/README.md
new file mode 100644
index 0000000..b6fa06b
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/README.md
@@ -0,0 +1,17 @@
+# Mod_auth_mellon test
+
+## Docker image
+
+Docker image contains apache + mod_auth_mellon and two html files unprotected (/) and protected (/auth).
+
+## Build docker image
+
+docker build -t apache-mellon docker/
+
+## Run docker image
+
+docker run -d -p 8380:80 apache-mellon
+
+## Run tests
+
+mvn clean install [-Dapache.mod_auth_mellon.url=http://localhost:8380]
\ No newline at end of file