Merge pull request #4725 from hmlnarik/KEYCLOAK-5183-Support-for-AssertionConsumerServiceUrl-in-Saml-Adapter-subsystem
KEYCLOAK-5183 Support for AssertionConsumerServiceUrl in Saml Adapter subsystem
This commit is contained in:
commit
d0ee1e6ee5
10 changed files with 37 additions and 6 deletions
|
@ -16,7 +16,6 @@
|
||||||
*/
|
*/
|
||||||
package org.keycloak.subsystem.saml.as7;
|
package org.keycloak.subsystem.saml.as7;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
|
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +45,8 @@ public class Constants {
|
||||||
static final String SIGN_REQUEST = "signRequest";
|
static final String SIGN_REQUEST = "signRequest";
|
||||||
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
|
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
|
||||||
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
|
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
|
||||||
|
static final String ASSERTION_CONSUMER_SERVICE_URL = "assertionConsumerServiceUrl";
|
||||||
|
|
||||||
static final String REQUEST_BINDING = "requestBinding";
|
static final String REQUEST_BINDING = "requestBinding";
|
||||||
static final String BINDING_URL = "bindingUrl";
|
static final String BINDING_URL = "bindingUrl";
|
||||||
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
|
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
|
||||||
|
@ -69,7 +70,6 @@ public class Constants {
|
||||||
static final String SIGNATURES_REQUIRED = "signaturesRequired";
|
static final String SIGNATURES_REQUIRED = "signaturesRequired";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static class XML {
|
static class XML {
|
||||||
static final String SECURE_DEPLOYMENT = "secure-deployment";
|
static final String SECURE_DEPLOYMENT = "secure-deployment";
|
||||||
static final String SERVICE_PROVIDER = "SP";
|
static final String SERVICE_PROVIDER = "SP";
|
||||||
|
@ -122,5 +122,6 @@ public class Constants {
|
||||||
static final String ALIAS = "alias";
|
static final String ALIAS = "alias";
|
||||||
static final String FILE = "file";
|
static final String FILE = "file";
|
||||||
static final String SIGNATURES_REQUIRED = "signaturesRequired";
|
static final String SIGNATURES_REQUIRED = "signaturesRequired";
|
||||||
|
static final String ASSERTION_CONSUMER_SERVICE_URL = "assertionConsumerServiceUrl";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,12 @@ abstract class SingleSignOnDefinition {
|
||||||
.setXmlName(Constants.XML.BINDING_URL)
|
.setXmlName(Constants.XML.BINDING_URL)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, VALIDATE_ASSERTION_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL};
|
static final SimpleAttributeDefinition ASSERTION_CONSUMER_SERVICE_URL =
|
||||||
|
new SimpleAttributeDefinitionBuilder(Constants.Model.ASSERTION_CONSUMER_SERVICE_URL, ModelType.STRING, true)
|
||||||
|
.setXmlName(Constants.XML.ASSERTION_CONSUMER_SERVICE_URL)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, VALIDATE_ASSERTION_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL, ASSERTION_CONSUMER_SERVICE_URL};
|
||||||
|
|
||||||
static final HashMap<String, SimpleAttributeDefinition> ATTRIBUTE_MAP = new HashMap<>();
|
static final HashMap<String, SimpleAttributeDefinition> ATTRIBUTE_MAP = new HashMap<>();
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ keycloak-saml.IDP.SingleSignOnService.validateAssertionSignature=Validate an SSO
|
||||||
keycloak-saml.IDP.SingleSignOnService.requestBinding=HTTP method to use for requests
|
keycloak-saml.IDP.SingleSignOnService.requestBinding=HTTP method to use for requests
|
||||||
keycloak-saml.IDP.SingleSignOnService.responseBinding=HTTP method to use for responses
|
keycloak-saml.IDP.SingleSignOnService.responseBinding=HTTP method to use for responses
|
||||||
keycloak-saml.IDP.SingleSignOnService.bindingUrl=SSO endpoint URL
|
keycloak-saml.IDP.SingleSignOnService.bindingUrl=SSO endpoint URL
|
||||||
|
keycloak-saml.IDP.SingleSignOnService.assertionConsumerServiceUrl=Endpoint of Assertion Consumer Service at SP
|
||||||
keycloak-saml.IDP.SingleLogoutService=Single logout configuration
|
keycloak-saml.IDP.SingleLogoutService=Single logout configuration
|
||||||
keycloak-saml.IDP.SingleLogoutService.validateRequestSignature=Validate a SingleLogoutService request signature
|
keycloak-saml.IDP.SingleLogoutService.validateRequestSignature=Validate a SingleLogoutService request signature
|
||||||
keycloak-saml.IDP.SingleLogoutService.validateResponseSignature=Validate a SingleLogoutService response signature
|
keycloak-saml.IDP.SingleLogoutService.validateResponseSignature=Validate a SingleLogoutService response signature
|
||||||
|
|
|
@ -152,6 +152,11 @@
|
||||||
<xs:documentation>SSO endpoint URL</xs:documentation>
|
<xs:documentation>SSO endpoint URL</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="assertionConsumerServiceUrl" type="xs:string" use="optional">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Endpoint of Assertion Consumer Service at SP</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="single-logout-type">
|
<xs:complexType name="single-logout-type">
|
||||||
<xs:attribute name="validateRequestSignature" type="xs:boolean" use="optional">
|
<xs:attribute name="validateRequestSignature" type="xs:boolean" use="optional">
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
validateResponseSignature="true"
|
validateResponseSignature="true"
|
||||||
validateAssertionSignature="true"
|
validateAssertionSignature="true"
|
||||||
requestBinding="POST"
|
requestBinding="POST"
|
||||||
bindingUrl="http://localhost:8080/auth/realms/saml-demo/protocol/saml"/>
|
bindingUrl="http://localhost:8080/auth/realms/saml-demo/protocol/saml"
|
||||||
|
assertionConsumerServiceUrl="acsUrl"/>
|
||||||
<SingleLogoutService
|
<SingleLogoutService
|
||||||
validateRequestSignature="true"
|
validateRequestSignature="true"
|
||||||
validateResponseSignature="true"
|
validateResponseSignature="true"
|
||||||
|
|
|
@ -46,6 +46,9 @@ public class Constants {
|
||||||
static final String SIGN_REQUEST = "signRequest";
|
static final String SIGN_REQUEST = "signRequest";
|
||||||
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
|
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
|
||||||
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
|
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
|
||||||
|
static final String ASSERTION_CONSUMER_SERVICE_URL = "assertionConsumerServiceUrl";
|
||||||
|
|
||||||
|
|
||||||
static final String REQUEST_BINDING = "requestBinding";
|
static final String REQUEST_BINDING = "requestBinding";
|
||||||
static final String BINDING_URL = "bindingUrl";
|
static final String BINDING_URL = "bindingUrl";
|
||||||
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
|
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
|
||||||
|
@ -122,5 +125,8 @@ public class Constants {
|
||||||
static final String ALIAS = "alias";
|
static final String ALIAS = "alias";
|
||||||
static final String FILE = "file";
|
static final String FILE = "file";
|
||||||
static final String SIGNATURES_REQUIRED = "signaturesRequired";
|
static final String SIGNATURES_REQUIRED = "signaturesRequired";
|
||||||
|
static final String ASSERTION_CONSUMER_SERVICE_URL = "assertionConsumerServiceUrl";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,12 @@ abstract class SingleSignOnDefinition {
|
||||||
.setXmlName(Constants.XML.BINDING_URL)
|
.setXmlName(Constants.XML.BINDING_URL)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, VALIDATE_ASSERTION_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL};
|
static final SimpleAttributeDefinition ASSERTION_CONSUMER_SERVICE_URL =
|
||||||
|
new SimpleAttributeDefinitionBuilder(Constants.Model.ASSERTION_CONSUMER_SERVICE_URL, ModelType.STRING, true)
|
||||||
|
.setXmlName(Constants.XML.ASSERTION_CONSUMER_SERVICE_URL)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, VALIDATE_ASSERTION_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL, ASSERTION_CONSUMER_SERVICE_URL};
|
||||||
|
|
||||||
static final HashMap<String, SimpleAttributeDefinition> ATTRIBUTE_MAP = new HashMap<>();
|
static final HashMap<String, SimpleAttributeDefinition> ATTRIBUTE_MAP = new HashMap<>();
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ keycloak-saml.IDP.SingleSignOnService.validateAssertionSignature=Validate an SSO
|
||||||
keycloak-saml.IDP.SingleSignOnService.requestBinding=HTTP method to use for requests
|
keycloak-saml.IDP.SingleSignOnService.requestBinding=HTTP method to use for requests
|
||||||
keycloak-saml.IDP.SingleSignOnService.responseBinding=HTTP method to use for responses
|
keycloak-saml.IDP.SingleSignOnService.responseBinding=HTTP method to use for responses
|
||||||
keycloak-saml.IDP.SingleSignOnService.bindingUrl=SSO endpoint URL
|
keycloak-saml.IDP.SingleSignOnService.bindingUrl=SSO endpoint URL
|
||||||
|
keycloak-saml.IDP.SingleSignOnService.assertionConsumerServiceUrl=Endpoint of Assertion Consumer Service at SP
|
||||||
keycloak-saml.IDP.SingleLogoutService=Single logout configuration
|
keycloak-saml.IDP.SingleLogoutService=Single logout configuration
|
||||||
keycloak-saml.IDP.SingleLogoutService.validateRequestSignature=Validate a SingleLogoutService request signature
|
keycloak-saml.IDP.SingleLogoutService.validateRequestSignature=Validate a SingleLogoutService request signature
|
||||||
keycloak-saml.IDP.SingleLogoutService.validateResponseSignature=Validate a SingleLogoutService response signature
|
keycloak-saml.IDP.SingleLogoutService.validateResponseSignature=Validate a SingleLogoutService response signature
|
||||||
|
|
|
@ -152,6 +152,11 @@
|
||||||
<xs:documentation>SSO endpoint URL</xs:documentation>
|
<xs:documentation>SSO endpoint URL</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="assertionConsumerServiceUrl" type="xs:string" use="optional">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Endpoint of Assertion Consumer Service at SP</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="single-logout-type">
|
<xs:complexType name="single-logout-type">
|
||||||
<xs:attribute name="validateRequestSignature" type="xs:boolean" use="optional">
|
<xs:attribute name="validateRequestSignature" type="xs:boolean" use="optional">
|
||||||
|
|
|
@ -47,7 +47,8 @@
|
||||||
validateAssertionSignature="true"
|
validateAssertionSignature="true"
|
||||||
requestBinding="POST"
|
requestBinding="POST"
|
||||||
responseBinding="POST"
|
responseBinding="POST"
|
||||||
bindingUrl="http://localhost:8080/auth/realms/saml-demo/protocol/saml"/>
|
bindingUrl="http://localhost:8080/auth/realms/saml-demo/protocol/saml"
|
||||||
|
assertionConsumerServiceUrl="acsUrl"/>
|
||||||
<SingleLogoutService
|
<SingleLogoutService
|
||||||
validateRequestSignature="true"
|
validateRequestSignature="true"
|
||||||
validateResponseSignature="true"
|
validateResponseSignature="true"
|
||||||
|
|
Loading…
Reference in a new issue