diff --git a/services/src/main/java/org/keycloak/services/clienttype/client/TypeAwareClientModelDelegate.java b/services/src/main/java/org/keycloak/services/clienttype/client/TypeAwareClientModelDelegate.java index 2a3737bf57..fe1174c154 100644 --- a/services/src/main/java/org/keycloak/services/clienttype/client/TypeAwareClientModelDelegate.java +++ b/services/src/main/java/org/keycloak/services/clienttype/client/TypeAwareClientModelDelegate.java @@ -252,8 +252,8 @@ public class TypeAwareClientModelDelegate extends ClientModelLazyDelegate { // Get extended client type attributes and values from the client type configuration. Set extendedClientTypeAttributes = clientType.getOptionNames().stream() - .filter(optionName -> TypedClientExtendedAttribute.getAttributesByName().containsKey(optionName)) - .collect(Collectors.toSet()); + .filter(optionName -> TypedClientExtendedAttribute.getAttributesByName().containsKey(optionName)) + .collect(Collectors.toSet()); // Augment client type attributes on top of attributes on the delegate. for (String entry : extendedClientTypeAttributes) { @@ -262,4 +262,4 @@ public class TypeAwareClientModelDelegate extends ClientModelLazyDelegate { return attributes; } -} \ No newline at end of file +} diff --git a/services/src/main/java/org/keycloak/services/clienttype/client/TypedClientAttribute.java b/services/src/main/java/org/keycloak/services/clienttype/client/TypedClientAttribute.java index bfe1ea71b2..18c469e207 100644 --- a/services/src/main/java/org/keycloak/services/clienttype/client/TypedClientAttribute.java +++ b/services/src/main/java/org/keycloak/services/clienttype/client/TypedClientAttribute.java @@ -53,7 +53,39 @@ enum TypedClientExtendedAttribute implements TypedClientAttribute { CIBA_GRANT_ENABLED("oidc.ciba.grant.enabled", "false"), LOGIN_THEME("login_theme", null), LOGO_URI("logoUri", null), - POLICY_URI("policyUri", null); + POLICY_URI("policyUri", null), + + SAML_ALLOW_ECP_FLOW("saml.allow.ecp.flow", "false"), + SAML_ARTIFACT_BINDING("saml.artifact.binding", "false"), + SAML_ARTIFACT_BINDING_IDENTIFIER("saml.artifact.binding.identifier", null), + SAML_ARTIFACT_BINDING_URL("saml_artifact_binding_url", null), + SAML_ARTIFACT_RESOLUTION_SERVICE_URL("saml_artifact_resolution_service_url", null), + SAML_ASSERTION_CONSUMER_URL_POST("saml_assertion_consumer_url_post", null), + SAML_ASSERTION_CONSUMER_URL_REDIRECT("saml_assertion_consumer_url_redirect", null), + SAML_ASSERTION_LIFESPAN("saml.assertion.lifespan", null), + SAML_ASSERTION_SIGNATURE("saml.assertion.signature", "false"), + SAML_AUTHNSTATEMENT("saml.authnstatement", "false"), + SAML_CLIENT_SIGNATURE("saml.client.signature", "false"), + SAML_ENCRYPT("saml.encrypt", "false"), + SAML_ENCRYPTION_CERTIFICATE("saml.encryption.certificate", null), + SAML_ENCRYPTION_PRIVATE_KEY("saml.encryption.private.key", null), + SAML_FORCE_POST_BINDING("saml.force.post.binding", "false"), + SAML_FORCE_NAME_ID_FORMAT("saml_force_name_id_format", "false"), + SAML_IDP_INITIATED_SSO_RELAY_STATE("saml_idp_initiated_sso_relay_state", null), + SAML_IDP_INITIATED_SSO_URL_NAME("saml_idp_initiated_sso_url_name", null), + SAML_ONETIMEUSE_CONDITION("saml.onetimeuse.condition", "false"), + SAML_SERVER_SIGNATURE("saml.server.signature", "false"), + SAML_SERVER_SIGNATURE_KEYINFO_EXT("saml.server.signature.keyinfo.ext", "false"), + SAML_SERVER_SIGNATURE_KEYINFO_XMLSIGKEYINFOKEYNAMETRANSFORMER("saml.server.signature.keyinfo.xmlSigKeyInfoKeyNameTransformer", null), + SAML_SIGNATURE_ALGORITHM("saml.signature.algorithm", null), + SAML_SIGNATURE_CANONICALIZATION_METHOD("saml_signature_canonicalization_method", null), + SAML_SIGNING_CERTIFICATE("saml.signing.certificate", null), + SAML_SIGNING_PRIVATE_KEY("saml.signing.private.key", null), + SAML_SINGLE_LOGOUT_SERVICE_URL_ARTIFACT("saml_single_logout_service_url_artifact", null), + SAML_SINGLE_LOGOUT_SERVICE_URL_POST("saml_single_logout_service_url_post", null), + SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT("saml_single_logout_service_url_redirect", null), + SAML_SINGLE_LOGOUT_SERVICE_URL_SOAP("saml_single_logout_service_url_soap", null); + private static final Map attributesByName = new HashMap<>(); diff --git a/services/src/main/resources/keycloak-default-client-types.json b/services/src/main/resources/keycloak-default-client-types.json index 7d74412674..566398f0ee 100644 --- a/services/src/main/resources/keycloak-default-client-types.json +++ b/services/src/main/resources/keycloak-default-client-types.json @@ -122,6 +122,115 @@ "applicable": false } } + }, + { + "name": "saml", + "provider": "default", + "config": { + "consentRequired": { + "applicable": true + }, + "fullScopeAllowed": { + "applicable": true + }, + "frontchannelLogout": { + "applicable": true + }, + "protocol": { + "applicable": true, + "value": "saml" + }, + "saml.allow.ecp.flow": { + "applicable": true + }, + "saml.artifact.binding": { + "applicable": true + }, + "saml.artifact.binding.identifier": { + "applicable": true + }, + "saml_artifact_binding_url": { + "applicable": true + }, + "saml_artifact_resolution_service_url": { + "applicable": true + }, + "saml_assertion_consumer_url_post": { + "applicable": true + }, + "saml_assertion_consumer_url_redirect": { + "applicable": true + }, + "saml.assertion.lifespan": { + "applicable": true + }, + "saml.assertion.signature": { + "applicable": true + }, + "saml.authnstatement": { + "applicable": true + }, + "saml.client.signature": { + "applicable": true + }, + "saml.encrypt": { + "applicable": true + }, + "saml.encryption.certificate": { + "applicable": true + }, + "saml.encryption.private.key": { + "applicable": true + }, + "saml.force.post.binding": { + "applicable": true + }, + "saml_force_name_id_format": { + "applicable": true + }, + "saml_idp_initiated_sso_relay_state": { + "applicable": true + }, + "saml_idp_initiated_sso_url_name": { + "applicable": true + }, + "saml.onetimeuse.condition": { + "applicable": true + }, + "saml.server.signature": { + "applicable": true + }, + "saml.server.signature.keyinfo.ext": { + "applicable": true + }, + "saml.server.signature.keyinfo.xmlSigKeyInfoKeyNameTransformer": { + "applicable": true + }, + "saml.signature.algorithm": { + "applicable": true + }, + "saml_signature_canonicalization_method": { + "applicable": true + }, + "saml.signing.certificate": { + "applicable": true + }, + "saml.signing.private.key": { + "applicable": true + }, + "saml_single_logout_service_url_artifact": { + "applicable": true + }, + "saml_single_logout_service_url_post": { + "applicable": true + }, + "saml_single_logout_service_url_redirect": { + "applicable": true + }, + "saml_single_logout_service_url_soap": { + "applicable": true + } + } } ] }