diff --git a/adapters/saml/core/src/main/resources/schema/keycloak_saml_adapter_1_7.xsd b/adapters/saml/core/src/main/resources/schema/keycloak_saml_adapter_1_7.xsd
index 174ea17f93..fc9cb5ec7e 100644
--- a/adapters/saml/core/src/main/resources/schema/keycloak_saml_adapter_1_7.xsd
+++ b/adapters/saml/core/src/main/resources/schema/keycloak_saml_adapter_1_7.xsd
@@ -27,118 +27,425 @@
-
-
-
+ Keycloak SAML Adapter configuration file.
-
+
+
+ Describes SAML service provider configuration.
+
+
-
-
-
-
+
+
+
+ List of service provider encryption and validation keys.
+
+ If the IDP requires that the client application (SP) sign all of its requests and/or if the IDP will encrypt assertions, you must define the keys used to do this. For client signed documents you must define both the private and public key or certificate that will be used to sign documents. For encryption, you only have to define the private key that will be used to decrypt.
+
+
+
+
+ When creating a Java Principal object that you obtain from methods like HttpServletRequest.getUserPrincipal(), you can define what name that is returned by the Principal.getName() method.
+
+
+
+
+ Defines what SAML attributes within the assertion received from the user should be used as role identifiers within the Java EE Security Context for the user.
+ By default Role attribute values are converted to Java EE roles. Some IDPs send roles via a member or memberOf attribute assertion. You can define one or more Attribute elements to specify which SAML attributes must be converted into roles.
+
+
+
+
+ Describes configuration of SAML identity provider for this service provider.
+
+
-
-
-
-
-
-
-
+
+
+ This is the identifier for this client. The IDP needs this value to determine who the client is that is communicating with it.
+
+
+
+
+ SSL policy the adapter will enforce.
+
+
+
+
+ SAML clients can request a specific NameID Subject format. Fill in this value if you want a specific format. It must be a standard SAML format identifier, i.e. urn:oasis:names:tc:SAML:2.0:nameid-format:transient. By default, no special format is requested.
+
+
+
+
+ URL of the logout page.
+
+
+
+
+ SAML clients can request that a user is re-authenticated even if they are already logged in at the IDP. Default value is false.
+
+
+
+
+ SAML clients can request that a user is never asked to authenticate even if they are not logged in at the IDP. Set this to true if you want this. Do not use together with forceAuthentication as they are opposite. Default value is false.
+
+
+
+
+ The session id is changed by default on a successful login on some platforms to plug a security attack vector. Change this to true to disable this. It is recommended you do not turn it off. Default value is false.
+
+
-
+
+
+ Describes a single key used for signing or encryption.
+
+
-
-
-
-
+
+
+ Java keystore to load keys and certificates from.
+
+
+
+
+ Private key (PEM format)
+
+
+
+
+ Public key (PEM format)
+
+
+
+
+ Certificate key (PEM format)
+
+
-
-
+
+
+ Flag defining whether the key should be used for signing.
+
+
+
+
+ Flag defining whether the key should be used for encryption
+
+
-
-
+
+
+ Private key declaration
+
+
+
+
+ Certificate declaration
+
+
-
-
-
+
+
+ File path to the key store.
+
+
+
+
+ WAR resource path to the key store. This is a path used in method call to ServletContext.getResourceAsStream().
+
+
+
+
+ The password of the key store.
+
+
-
-
+
+
+ Alias that points to the key or cert within the keystore.
+
+
+
+
+ Keystores require an additional password to access private keys. In the PrivateKey element you must define this password within a password attribute.
+
+
-
+
+
+ Alias that points to the key or cert within the keystore.
+
+
-
-
+
+
+ Policy used to populate value of Java Principal object obtained from methods like HttpServletRequest.getUserPrincipal().
+
+
+
+
+ Name of the SAML assertion attribute to use within.
+
+
+
+
+
+
+ This policy just uses whatever the SAML subject value is. This is the default setting
+
+
+
+
+ This will pull the value from one of the attributes declared in the SAML assertion received from the server. You'll need to specify the name of the SAML assertion attribute to use within the attribute XML attribute.
+
+
+
+
+
+
+
+
+ All requests must come in via HTTPS.
+
+
+
+
+ Only non-private IP addresses must come over the wire via HTTPS.
+
+
+
+
+ no requests are required to come over via HTTPS.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+ Specifies SAML attribute to be converted into roles.
+
+
-
+
+
+ Specifies name of the SAML attribute to be converted into roles.
+
+
-
-
-
-
+
+
+ Configuration of the login SAML endpoint of the IDP.
+
+
+
+
+ Configuration of the logout SAML endpoint of the IDP
+
+
+
+
+ The Keys sub element of IDP is only used to define the certificate or public key to use to verify documents signed by the IDP.
+
+
+
+
+ Configuration of HTTP client used for automatic obtaining of certificates containing public keys for IDP signature verification via SAML descriptor of the IDP.
+
+
-
-
-
-
-
+
+
+ issuer ID of the IDP.
+
+
+
+
+ If set to true, the client adapter will sign every document it sends to the IDP. Also, the client will expect that the IDP will be signing any documents sent to it. This switch sets the default for all request and response types.
+
+
+
+
+ Signature algorithm that the IDP expects signed documents to use. Defaults to RSA_SHA256
+
+
+
+
+ This is the signature canonicalization method that the IDP expects signed documents to use. The default value is http://www.w3.org/2001/10/xml-exc-c14n# and should be good for most IDPs.
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+ Should the client sign authn requests? Defaults to whatever the IDP signaturesRequired element value is.
+
+
+
+
+ Should the client expect the IDP to sign the assertion response document sent back from an auhtn request? Defaults to whatever the IDP signaturesRequired element value is.
+
+
+
+
+ Should the client expect the IDP to sign the individual assertions sent back from an auhtn request? Defaults to whatever the IDP signaturesRequired element value is.
+
+
+
+
+ SAML binding type used for communicating with the IDP. The default value is POST, but you can set it to REDIRECT as well.
+
+
+
+
+ SAML allows the client to request what binding type it wants authn responses to use. The default is that the client will not request a specific binding type for responses.
+
+
+
+
+ This is the URL for the IDP login service that the client will send requests to.
+
+
-
-
-
-
-
-
-
-
+
+
+ Should the client sign authn requests? Defaults to whatever the IDP signaturesRequired element value is.
+
+
+
+
+ Should the client sign logout responses it sends to the IDP requests? Defaults to whatever the IDP signaturesRequired element value is.
+
+
+
+
+ Should the client expect signed logout request documents from the IDP? Defaults to whatever the IDP signaturesRequired element value is.
+
+
+
+
+ Should the client expect signed logout response documents from the IDP? Defaults to whatever the IDP signaturesRequired element value is.
+
+
+
+
+ This is the SAML binding type used for communicating SAML requests to the IDP. The default value is POST.
+
+
+
+
+ This is the SAML binding type used for communicating SAML responses to the IDP. The default value is POST.
+
+
+
+
+ This is the URL for the IDP's logout service when using the POST binding. This setting is REQUIRED if using the POST binding.
+
+
+
+
+ This is the URL for the IDP's logout service when using the REDIRECT binding. This setting is REQUIRED if using the REDIRECT binding.
+
+
-
-
-
-
-
-
-
-
+
+
+ If the the IDP server requires HTTPS and this config option is set to true the IDP's certificate
+ is validated via the truststore, but host name validation is not done. This setting should only be used during
+ development and never in production as it will partly disable verification of SSL certificates.
+ This seting may be useful in test environments. The default value is false.
+
+
+
+
+ This is the file path to a keystore file. This keystore contains client certificate
+ for two-way SSL when the adapter makes HTTPS requests to the IDP server.
+
+
+
+
+ Password for the client keystore and for the client's key.
+
+
+
+
+ Defines number of pooled connections.
+
+
+
+
+ If the the IDP server requires HTTPS and this config option is set to true you do not have to specify a truststore.
+ This setting should only be used during development and never in production as it will disable verification of SSL certificates.
+ The default value is false.
+
+
+
+
+ URL to HTTP proxy to use for HTTP connections.
+
+
+
+
+ The value is the file path to a keystore file. If you prefix the path with classpath:,
+ then the truststore will be obtained from the deployment's classpath instead. Used for outgoing
+ HTTPS communications to the IDP server. Client making HTTPS requests need
+ a way to verify the host of the server they are talking to. This is what the trustore does.
+ The keystore contains one or more trusted host certificates or certificate authorities.
+ You can create this truststore by extracting the public certificate of the IDP's SSL keystore.
+
+
+
+
+
+ Password for the truststore keystore.
+
+
diff --git a/adapters/saml/core/src/test/java/org/keycloak/adapters/saml/config/parsers/KeycloakSamlAdapterXMLParserTest.java b/adapters/saml/core/src/test/java/org/keycloak/adapters/saml/config/parsers/KeycloakSamlAdapterXMLParserTest.java
index 10537b3f60..b64f181dcc 100755
--- a/adapters/saml/core/src/test/java/org/keycloak/adapters/saml/config/parsers/KeycloakSamlAdapterXMLParserTest.java
+++ b/adapters/saml/core/src/test/java/org/keycloak/adapters/saml/config/parsers/KeycloakSamlAdapterXMLParserTest.java
@@ -87,7 +87,7 @@ public class KeycloakSamlAdapterXMLParserTest {
assertEquals(1, config.getSps().size());
SP sp = config.getSps().get(0);
assertEquals("sp", sp.getEntityID());
- assertEquals("ssl", sp.getSslPolicy());
+ assertEquals("EXTERNAL", sp.getSslPolicy());
assertEquals("format", sp.getNameIDPolicyFormat());
assertTrue(sp.isForceAuthentication());
assertTrue(sp.isIsPassive());
@@ -106,26 +106,26 @@ public class KeycloakSamlAdapterXMLParserTest {
assertTrue(encryption.isEncryption());
assertEquals("private pem", encryption.getPrivateKeyPem());
assertEquals("public pem", encryption.getPublicKeyPem());
- assertEquals("policy", sp.getPrincipalNameMapping().getPolicy());
+ assertEquals("FROM_ATTRIBUTE", sp.getPrincipalNameMapping().getPolicy());
assertEquals("attribute", sp.getPrincipalNameMapping().getAttributeName());
assertTrue(sp.getRoleAttributes().size() == 1);
assertTrue(sp.getRoleAttributes().contains("member"));
IDP idp = sp.getIdp();
assertEquals("idp", idp.getEntityID());
- assertEquals("RSA", idp.getSignatureAlgorithm());
+ assertEquals("RSA_SHA256", idp.getSignatureAlgorithm());
assertEquals("canon", idp.getSignatureCanonicalizationMethod());
assertTrue(idp.getSingleSignOnService().isSignRequest());
assertTrue(idp.getSingleSignOnService().isValidateResponseSignature());
- assertEquals("post", idp.getSingleSignOnService().getRequestBinding());
+ assertEquals("POST", idp.getSingleSignOnService().getRequestBinding());
assertEquals("url", idp.getSingleSignOnService().getBindingUrl());
assertTrue(idp.getSingleLogoutService().isSignRequest());
assertTrue(idp.getSingleLogoutService().isSignResponse());
assertTrue(idp.getSingleLogoutService().isValidateRequestSignature());
assertTrue(idp.getSingleLogoutService().isValidateResponseSignature());
- assertEquals("redirect", idp.getSingleLogoutService().getRequestBinding());
- assertEquals("post", idp.getSingleLogoutService().getResponseBinding());
+ assertEquals("REDIRECT", idp.getSingleLogoutService().getRequestBinding());
+ assertEquals("POST", idp.getSingleLogoutService().getResponseBinding());
assertEquals("posturl", idp.getSingleLogoutService().getPostBindingUrl());
assertEquals("redirecturl", idp.getSingleLogoutService().getRedirectBindingUrl());
diff --git a/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-multiple-signing-keys.xml b/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-multiple-signing-keys.xml
index 33b2f73826..37fc7b5a96 100644
--- a/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-multiple-signing-keys.xml
+++ b/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-multiple-signing-keys.xml
@@ -15,9 +15,11 @@
~ limitations under the License.
-->
-
+
@@ -37,19 +39,19 @@
-
+
diff --git a/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-wth-http-client-settings.xml b/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-wth-http-client-settings.xml
index 36410e59b0..0c4abb21d7 100644
--- a/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-wth-http-client-settings.xml
+++ b/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml-wth-http-client-settings.xml
@@ -15,9 +15,11 @@
~ limitations under the License.
-->
-
+
@@ -37,18 +39,18 @@
-
+
@@ -57,8 +59,8 @@
validateResponseSignature="true"
signRequest="true"
signResponse="true"
- requestBinding="redirect"
- responseBinding="post"
+ requestBinding="REDIRECT"
+ responseBinding="POST"
postBindingUrl="posturl"
redirectBindingUrl="redirecturl"
/>
diff --git a/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml.xml b/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml.xml
index 1ad2a027fc..193525a894 100755
--- a/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml.xml
+++ b/adapters/saml/core/src/test/resources/org/keycloak/adapters/saml/config/parsers/keycloak-saml.xml
@@ -15,14 +15,16 @@
~ limitations under the License.
-->
-
+
-
+
@@ -37,18 +39,18 @@
-
+
@@ -57,8 +59,8 @@
validateResponseSignature="true"
signRequest="true"
signResponse="true"
- requestBinding="redirect"
- responseBinding="post"
+ requestBinding="REDIRECT"
+ responseBinding="POST"
postBindingUrl="posturl"
redirectBindingUrl="redirecturl"
/>
diff --git a/examples/saml/post-with-encryption/src/main/webapp/WEB-INF/keycloak-saml.xml b/examples/saml/post-with-encryption/src/main/webapp/WEB-INF/keycloak-saml.xml
index 6001080270..b2e1b664bf 100755
--- a/examples/saml/post-with-encryption/src/main/webapp/WEB-INF/keycloak-saml.xml
+++ b/examples/saml/post-with-encryption/src/main/webapp/WEB-INF/keycloak-saml.xml
@@ -15,7 +15,9 @@
~ limitations under the License.
-->
-
+
-
+
-
+
-
+
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/bad-assertion-sales-post-sig/WEB-INF/keycloak-saml.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/bad-assertion-sales-post-sig/WEB-INF/keycloak-saml.xml
index 2ea7ff73c6..68a1ac8dc7 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/bad-assertion-sales-post-sig/WEB-INF/keycloak-saml.xml
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/bad-assertion-sales-post-sig/WEB-INF/keycloak-saml.xml
@@ -15,7 +15,9 @@
~ limitations under the License.
-->
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+