Package swiss.trustbroker.config.dto
Class OidcProperties
java.lang.Object
swiss.trustbroker.config.dto.OidcProperties
@Configuration
@ConfigurationProperties(prefix="trustbroker.config.oidc")
public class OidcProperties
extends Object
OIDC protocol configuration.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanGlobally customize /token and /userinfo output dropping technical claims (typ=JWT and iss=issuer we keep for now).Globally customize OIDC header (e.g.Enabled code challenge methods.intOIDC code lifetime in seconds.Default error code for OIDC.Global default QoA.Global default for legacy Policy Enforcement Point (PEP) QOA mapping policy configured viaEnabled Demonstrating Proof of Possession (DPoP) signing algorithm values.If we have the same attribute from both original issuer and IDM, drop the original issuer one.XTB OIDC session termination endpoint, included in the metadata.Enabled grant types.OIDC identity provider configuration.Enabled ID token encryption algorithms.Enabled ID token encryption methods.Enabled ID token signing algorithms methods.Enabled introspection endpoint auth methods.XTB OIDC issuer ID.List<swiss.trustbroker.common.config.RegexNameValue> List of HTTP header names and regex matching the value.longDeletion of expired (rotated) keys in minutes.longExpiration of keys in minutes.Key rotation schedule.swiss.trustbroker.common.config.KeystorePropertiesDefault keystore for direct connections to OIDC CPs.longCached CP metadata is only refreshed if cached earlier than this.XTB OIDC perimeter URL.Claims to remove for user info.Enabled response types.Enabled revocation endpoint auth methods.List<swiss.trustbroker.common.config.RegexNameValue> SAML error code mappings.SAML namespace to OIDC mappings.Enabled scopes.XTB OIDC session iframe endpoint.intOIDC session lifetime in seconds.Mode for Tomcat sessions.Enabled subject types.Schedule for fetching current metadata configurations from all CPs.Enabled token endpoint authentication methods.swiss.trustbroker.common.config.KeystorePropertiesDefault truststore for direct connections to OIDC CPs.Enabled UserInfo encryption algorithms.Enabled UserInfo encryption methods.inthashCode()booleanInternal fallback to add eID OIDC standard-claimsbooleanEnable device authorization endpoint.booleanOIDC protocol enabled.booleanAllow token exchange with external tokens.booleanEnable introspection endpoint.booleanNOTE: Transparency mode simulates /realms/X URLs and IDs for all clients on redirects etc.booleanEnable logout endpoint.booleanDeprecated.booleanEnable pushed authorization requests endpoints.booleanEnable revocation endpoint.booleanAllow saml2 token exchange.booleanEncrypt internal SAML messages to XTB.booleanUse session cookies - delete cookies on browser close.booleanEnable TLS client certificate bound access tokens.booleanUse Keycloak issuer ID.booleanEnable user info endpoint.voidsetAddEidStandardClaims(boolean addEidStandardClaims) Internal fallback to add eID OIDC standard-claimsvoidsetAddTokenClaims(List<String> addTokenClaims) Globally customize /token and /userinfo output dropping technical claims (typ=JWT and iss=issuer we keep for now).voidsetAddTokenHeader(List<String> addTokenHeader) Globally customize OIDC header (e.g.voidsetCodeChallengeMethods(List<String> codeChallengeMethods) Enabled code challenge methods.voidsetCodeLifetimeSec(int codeLifetimeSec) OIDC code lifetime in seconds.voidsetDefaultErrorCode(String defaultErrorCode) Default error code for OIDC.voidsetDefaultQoa(String defaultQoa) Global default QoA.voidsetDefaultUsePepQoaPolicy(String defaultUsePepQoaPolicy) Global default for legacy Policy Enforcement Point (PEP) QOA mapping policy configured viavoidsetDeviceAuthorizationEnabled(boolean deviceAuthorizationEnabled) Enable device authorization endpoint.voidsetDPoPSigningAlgValuesSupported(List<String> dPoPSigningAlgValuesSupported) Enabled Demonstrating Proof of Possession (DPoP) signing algorithm values.voidsetDropDuplicatedAttributeFromOriginalIssuer(List<String> dropDuplicatedAttributeFromOriginalIssuer) If we have the same attribute from both original issuer and IDM, drop the original issuer one.voidsetEnabled(boolean enabled) OIDC protocol enabled.voidsetEndSessionEndpoint(String endSessionEndpoint) XTB OIDC session termination endpoint, included in the metadata.voidsetExternalTokenExchangeEnabled(boolean externalTokenExchangeEnabled) Allow token exchange with external tokens.voidsetGrantTypes(List<String> grantTypes) Enabled grant types.voidsetIdentityProvider(OidcIdentityProvider identityProvider) OIDC identity provider configuration.voidsetIdTokenEncryptionAlgorithms(List<String> idTokenEncryptionAlgorithms) Enabled ID token encryption algorithms.voidsetIdTokenEncryptionMethods(List<String> idTokenEncryptionMethods) Enabled ID token encryption methods.voidsetIdTokenSigningAlgorithms(List<String> idTokenSigningAlgorithms) Enabled ID token signing algorithms methods.voidsetIntrospectionEnabled(boolean introspectionEnabled) Enable introspection endpoint.voidsetIntrospectionEndpointAuthMethods(List<String> introspectionEndpointAuthMethods) Enabled introspection endpoint auth methods.voidXTB OIDC issuer ID.voidsetJsonErrorPageHeaders(List<swiss.trustbroker.common.config.RegexNameValue> jsonErrorPageHeaders) List of HTTP header names and regex matching the value.voidsetKeycloakTransparencyModeOn(boolean keycloakTransparencyModeOn) NOTE: Transparency mode simulates /realms/X URLs and IDs for all clients on redirects etc.voidsetKeyDeletionMinutes(long keyDeletionMinutes) Deletion of expired (rotated) keys in minutes.voidsetKeyExpirationMinutes(long keyExpirationMinutes) Expiration of keys in minutes.voidsetKeySchedule(String keySchedule) Key rotation schedule.voidsetKeystore(swiss.trustbroker.common.config.KeystoreProperties keystore) Default keystore for direct connections to OIDC CPs.voidsetLogoutEnabled(boolean logoutEnabled) Enable logout endpoint.voidsetMinimumMetadataCacheTimeSecs(long minimumMetadataCacheTimeSecs) Cached CP metadata is only refreshed if cached earlier than this.voidsetOpaqueRefreshTokenEnabled(boolean opaqueRefreshTokenEnabled) Deprecated.voidsetPerimeterUrl(String perimeterUrl) XTB OIDC perimeter URL.voidsetPushedAuthorizationRequestsEndpointEnabled(boolean pushedAuthorizationRequestsEndpointEnabled) Enable pushed authorization requests endpoints.voidsetRemoveUserInfoClaims(List<String> removeUserInfoClaims) Claims to remove for user info.voidsetResponseTypes(List<String> responseTypes) Enabled response types.voidsetRevocationEnabled(boolean revocationEnabled) Enable revocation endpoint.voidsetRevocationEndpointAuthMethods(List<String> revocationEndpointAuthMethods) Enabled revocation endpoint auth methods.voidsetSaml2TokenExchangeEnabled(boolean saml2TokenExchangeEnabled) Allow saml2 token exchange.voidsetSamlEncrypt(boolean samlEncrypt) Encrypt internal SAML messages to XTB.voidsetSamlErrorCodeRegexMappings(List<swiss.trustbroker.common.config.RegexNameValue> samlErrorCodeRegexMappings) SAML error code mappings.voidsetSamlNamespacesMappedToOidcFormat(List<SamlNamespace> samlNamespacesMappedToOidcFormat) SAML namespace to OIDC mappings.voidEnabled scopes.voidsetSessionCookie(boolean sessionCookie) Use session cookies - delete cookies on browser close.voidsetSessionIFrameEndpoint(String sessionIFrameEndpoint) XTB OIDC session iframe endpoint.voidsetSessionLifetimeSec(int sessionLifetimeSec) OIDC session lifetime in seconds.voidsetSessionMode(TomcatSessionMode sessionMode) Mode for Tomcat sessions.voidsetSubjectTypes(List<String> subjectTypes) Enabled subject types.voidsetSyncSchedule(String syncSchedule) Schedule for fetching current metadata configurations from all CPs.voidsetTlsClientCertificateBoundAccessTokens(boolean tlsClientCertificateBoundAccessTokens) Enable TLS client certificate bound access tokens.voidsetTokenEndpointAuthMethods(List<String> tokenEndpointAuthMethods) Enabled token endpoint authentication methods.voidsetTruststore(swiss.trustbroker.common.config.KeystoreProperties truststore) Default truststore for direct connections to OIDC CPs.voidsetUseKeycloakIssuerId(boolean useKeycloakIssuerId) Use Keycloak issuer ID.voidsetUserInfoEnabled(boolean userInfoEnabled) Enable user info endpoint.voidsetUserInfoEncryptionAlgorithms(List<String> userInfoEncryptionAlgorithms) Enabled UserInfo encryption algorithms.voidsetUserInfoEncryptionMethods(List<String> userInfoEncryptionMethods) Enabled UserInfo encryption methods.toString()
-
Constructor Details
-
OidcProperties
public OidcProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()OIDC protocol enabled.
Default: true- Since:
- 1.14.0
-
getIssuer
XTB OIDC issuer ID. -
getPerimeterUrl
XTB OIDC perimeter URL.
Note: Currently, the path that is requested on XTB needs to be/login/saml2/sso. -
getEndSessionEndpoint
XTB OIDC session termination endpoint, included in the metadata.
Note: Currently, the path that is requested on XTB needs to be/logout. -
getSessionIFrameEndpoint
XTB OIDC session iframe endpoint. -
isSessionCookie
public boolean isSessionCookie()Use session cookies - delete cookies on browser close.
Default: true -
getSessionLifetimeSec
public int getSessionLifetimeSec()OIDC session lifetime in seconds. -
getCodeLifetimeSec
public int getCodeLifetimeSec()OIDC code lifetime in seconds.- Since:
- 1.9.0
-
getSessionMode
Mode for Tomcat sessions.
Default: IN_DB -
getIdentityProvider
OIDC identity provider configuration. -
isSamlEncrypt
public boolean isSamlEncrypt()Encrypt internal SAML messages to XTB. -
getKeySchedule
Key rotation schedule. Cron expression. -
getKeyExpirationMinutes
public long getKeyExpirationMinutes()Expiration of keys in minutes. -
getKeyDeletionMinutes
public long getKeyDeletionMinutes()Deletion of expired (rotated) keys in minutes. -
isRevocationEnabled
public boolean isRevocationEnabled()Enable revocation endpoint.
Default: true -
isIntrospectionEnabled
public boolean isIntrospectionEnabled()Enable introspection endpoint.
Default: true -
isUserInfoEnabled
public boolean isUserInfoEnabled()Enable user info endpoint.
Default: true -
isLogoutEnabled
public boolean isLogoutEnabled()Enable logout endpoint.
Default: true -
isDeviceAuthorizationEnabled
public boolean isDeviceAuthorizationEnabled()Enable device authorization endpoint.
Default: true- Since:
- 1.10.0
-
isPushedAuthorizationRequestsEndpointEnabled
public boolean isPushedAuthorizationRequestsEndpointEnabled()Enable pushed authorization requests endpoints.
Default: false (not yet verified)- Since:
- 1.11.0
-
isTlsClientCertificateBoundAccessTokens
public boolean isTlsClientCertificateBoundAccessTokens()Enable TLS client certificate bound access tokens.
Default: true- Since:
- 1.10.0
-
getTokenEndpointAuthMethods
Enabled token endpoint authentication methods.- Since:
- 1.10.0
-
getIntrospectionEndpointAuthMethods
Enabled introspection endpoint auth methods.- Since:
- 1.10.0
-
getRevocationEndpointAuthMethods
Enabled revocation endpoint auth methods.- Since:
- 1.10.0
-
getGrantTypes
Enabled grant types.- Since:
- 1.10.0
-
getResponseTypes
Enabled response types.- Since:
- 1.10.0
-
getSubjectTypes
Enabled subject types.- Since:
- 1.10.0
-
getScopes
Enabled scopes.- Since:
- 1.10.0
-
getCodeChallengeMethods
Enabled code challenge methods.- Since:
- 1.10.0
-
getIdTokenSigningAlgorithms
Enabled ID token signing algorithms methods.- Since:
- 1.10.0
-
getDPoPSigningAlgValuesSupported
Enabled Demonstrating Proof of Possession (DPoP) signing algorithm values.
Default: none (not yet verified)- Since:
- 1.11.0
-
isOpaqueRefreshTokenEnabled
Deprecated.Use opaque refresh token.
Default: false (i.e. JWT token) -
getIdTokenEncryptionAlgorithms
Enabled ID token encryption algorithms.- Since:
- 1.12.0
-
getIdTokenEncryptionMethods
Enabled ID token encryption methods.- Since:
- 1.12.0
-
getUserInfoEncryptionAlgorithms
Enabled UserInfo encryption algorithms.- Since:
- 1.12.0
-
getUserInfoEncryptionMethods
Enabled UserInfo encryption methods.- Since:
- 1.12.0
-
getDefaultQoa
Global default QoA. -
getDefaultUsePepQoaPolicy
Global default for legacy Policy Enforcement Point (PEP) QOA mapping policy configured viaOidcClient.usePepQoa
. -
isUseKeycloakIssuerId
public boolean isUseKeycloakIssuerId()Use Keycloak issuer ID. Support CORS headers without preflight and handle Issuer.
Default: true -
isKeycloakTransparencyModeOn
public boolean isKeycloakTransparencyModeOn()NOTE: Transparency mode simulates /realms/X URLs and IDs for all clients on redirects etc. in case client adapters are picky on cross-checking URLs against token claims (like iss) and metadata (like Issuer). For now, we assume we do not need it.
Default: false -
getSamlNamespacesMappedToOidcFormat
SAML namespace to OIDC mappings. -
getSamlErrorCodeRegexMappings
SAML error code mappings.
If the regex contains a capturing group that matches, use the matching part (converted to snake case) else the value is used to replace the matching status code. -
getDefaultErrorCode
Default error code for OIDC.
Fallback: access_denied -
getJsonErrorPageHeaders
List of HTTP header names and regex matching the value. If any one matches, the request is considered to originate from Javascript and a JSON response is sent.- Since:
- 1.7.0
-
isAddEidStandardClaims
public boolean isAddEidStandardClaims()Internal fallback to add eID OIDC standard-claims -
getAddTokenHeader
Globally customize OIDC header (e.g. adding option typ=JWT). -
getAddTokenClaims
Globally customize /token and /userinfo output dropping technical claims (typ=JWT and iss=issuer we keep for now). Claims to add. -
getRemoveUserInfoClaims
Claims to remove for user info. -
getDropDuplicatedAttributeFromOriginalIssuer
If we have the same attribute from both original issuer and IDM, drop the original issuer one. -
getKeystore
public swiss.trustbroker.common.config.KeystoreProperties getKeystore()Default keystore for direct connections to OIDC CPs.- Since:
- 1.10.0
-
getTruststore
public swiss.trustbroker.common.config.KeystoreProperties getTruststore()Default truststore for direct connections to OIDC CPs.- Since:
- 1.9.0
-
getSyncSchedule
Schedule for fetching current metadata configurations from all CPs. Cron expression.- Since:
- 1.9.0
-
getMinimumMetadataCacheTimeSecs
public long getMinimumMetadataCacheTimeSecs()Cached CP metadata is only refreshed if cached earlier than this.
Default: 60- Since:
- 1.10.0
-
isExternalTokenExchangeEnabled
public boolean isExternalTokenExchangeEnabled()Allow token exchange with external tokens.
Default: false- Since:
- 1.13.0
-
isSaml2TokenExchangeEnabled
public boolean isSaml2TokenExchangeEnabled()Allow saml2 token exchange.
Default: false- Since:
- 1.14.0
-
setEnabled
public void setEnabled(boolean enabled) OIDC protocol enabled.
Default: true- Since:
- 1.14.0
-
setIssuer
XTB OIDC issuer ID. -
setPerimeterUrl
XTB OIDC perimeter URL.
Note: Currently, the path that is requested on XTB needs to be/login/saml2/sso. -
setEndSessionEndpoint
XTB OIDC session termination endpoint, included in the metadata.
Note: Currently, the path that is requested on XTB needs to be/logout. -
setSessionIFrameEndpoint
XTB OIDC session iframe endpoint. -
setSessionCookie
public void setSessionCookie(boolean sessionCookie) Use session cookies - delete cookies on browser close.
Default: true -
setSessionLifetimeSec
public void setSessionLifetimeSec(int sessionLifetimeSec) OIDC session lifetime in seconds. -
setCodeLifetimeSec
public void setCodeLifetimeSec(int codeLifetimeSec) OIDC code lifetime in seconds.- Since:
- 1.9.0
-
setSessionMode
Mode for Tomcat sessions.
Default: IN_DB -
setIdentityProvider
OIDC identity provider configuration. -
setSamlEncrypt
public void setSamlEncrypt(boolean samlEncrypt) Encrypt internal SAML messages to XTB. -
setKeySchedule
Key rotation schedule. Cron expression. -
setKeyExpirationMinutes
public void setKeyExpirationMinutes(long keyExpirationMinutes) Expiration of keys in minutes. -
setKeyDeletionMinutes
public void setKeyDeletionMinutes(long keyDeletionMinutes) Deletion of expired (rotated) keys in minutes. -
setRevocationEnabled
public void setRevocationEnabled(boolean revocationEnabled) Enable revocation endpoint.
Default: true -
setIntrospectionEnabled
public void setIntrospectionEnabled(boolean introspectionEnabled) Enable introspection endpoint.
Default: true -
setUserInfoEnabled
public void setUserInfoEnabled(boolean userInfoEnabled) Enable user info endpoint.
Default: true -
setLogoutEnabled
public void setLogoutEnabled(boolean logoutEnabled) Enable logout endpoint.
Default: true -
setDeviceAuthorizationEnabled
public void setDeviceAuthorizationEnabled(boolean deviceAuthorizationEnabled) Enable device authorization endpoint.
Default: true- Since:
- 1.10.0
-
setPushedAuthorizationRequestsEndpointEnabled
public void setPushedAuthorizationRequestsEndpointEnabled(boolean pushedAuthorizationRequestsEndpointEnabled) Enable pushed authorization requests endpoints.
Default: false (not yet verified)- Since:
- 1.11.0
-
setTlsClientCertificateBoundAccessTokens
public void setTlsClientCertificateBoundAccessTokens(boolean tlsClientCertificateBoundAccessTokens) Enable TLS client certificate bound access tokens.
Default: true- Since:
- 1.10.0
-
setTokenEndpointAuthMethods
Enabled token endpoint authentication methods.- Since:
- 1.10.0
-
setIntrospectionEndpointAuthMethods
Enabled introspection endpoint auth methods.- Since:
- 1.10.0
-
setRevocationEndpointAuthMethods
Enabled revocation endpoint auth methods.- Since:
- 1.10.0
-
setGrantTypes
Enabled grant types.- Since:
- 1.10.0
-
setResponseTypes
Enabled response types.- Since:
- 1.10.0
-
setSubjectTypes
Enabled subject types.- Since:
- 1.10.0
-
setScopes
Enabled scopes.- Since:
- 1.10.0
-
setCodeChallengeMethods
Enabled code challenge methods.- Since:
- 1.10.0
-
setIdTokenSigningAlgorithms
Enabled ID token signing algorithms methods.- Since:
- 1.10.0
-
setDPoPSigningAlgValuesSupported
Enabled Demonstrating Proof of Possession (DPoP) signing algorithm values.
Default: none (not yet verified)- Since:
- 1.11.0
-
setOpaqueRefreshTokenEnabled
Deprecated.Use opaque refresh token.
Default: false (i.e. JWT token) -
setIdTokenEncryptionAlgorithms
Enabled ID token encryption algorithms.- Since:
- 1.12.0
-
setIdTokenEncryptionMethods
Enabled ID token encryption methods.- Since:
- 1.12.0
-
setUserInfoEncryptionAlgorithms
Enabled UserInfo encryption algorithms.- Since:
- 1.12.0
-
setUserInfoEncryptionMethods
Enabled UserInfo encryption methods.- Since:
- 1.12.0
-
setDefaultQoa
Global default QoA. -
setDefaultUsePepQoaPolicy
Global default for legacy Policy Enforcement Point (PEP) QOA mapping policy configured viaOidcClient.usePepQoa
. -
setUseKeycloakIssuerId
public void setUseKeycloakIssuerId(boolean useKeycloakIssuerId) Use Keycloak issuer ID. Support CORS headers without preflight and handle Issuer.
Default: true -
setKeycloakTransparencyModeOn
public void setKeycloakTransparencyModeOn(boolean keycloakTransparencyModeOn) NOTE: Transparency mode simulates /realms/X URLs and IDs for all clients on redirects etc. in case client adapters are picky on cross-checking URLs against token claims (like iss) and metadata (like Issuer). For now, we assume we do not need it.
Default: false -
setSamlNamespacesMappedToOidcFormat
public void setSamlNamespacesMappedToOidcFormat(List<SamlNamespace> samlNamespacesMappedToOidcFormat) SAML namespace to OIDC mappings. -
setSamlErrorCodeRegexMappings
public void setSamlErrorCodeRegexMappings(List<swiss.trustbroker.common.config.RegexNameValue> samlErrorCodeRegexMappings) SAML error code mappings.
If the regex contains a capturing group that matches, use the matching part (converted to snake case) else the value is used to replace the matching status code. -
setDefaultErrorCode
Default error code for OIDC.
Fallback: access_denied -
setJsonErrorPageHeaders
public void setJsonErrorPageHeaders(List<swiss.trustbroker.common.config.RegexNameValue> jsonErrorPageHeaders) List of HTTP header names and regex matching the value. If any one matches, the request is considered to originate from Javascript and a JSON response is sent.- Since:
- 1.7.0
-
setAddEidStandardClaims
public void setAddEidStandardClaims(boolean addEidStandardClaims) Internal fallback to add eID OIDC standard-claims -
setAddTokenHeader
Globally customize OIDC header (e.g. adding option typ=JWT). -
setAddTokenClaims
Globally customize /token and /userinfo output dropping technical claims (typ=JWT and iss=issuer we keep for now). Claims to add. -
setRemoveUserInfoClaims
Claims to remove for user info. -
setDropDuplicatedAttributeFromOriginalIssuer
public void setDropDuplicatedAttributeFromOriginalIssuer(List<String> dropDuplicatedAttributeFromOriginalIssuer) If we have the same attribute from both original issuer and IDM, drop the original issuer one. -
setKeystore
public void setKeystore(swiss.trustbroker.common.config.KeystoreProperties keystore) Default keystore for direct connections to OIDC CPs.- Since:
- 1.10.0
-
setTruststore
public void setTruststore(swiss.trustbroker.common.config.KeystoreProperties truststore) Default truststore for direct connections to OIDC CPs.- Since:
- 1.9.0
-
setSyncSchedule
Schedule for fetching current metadata configurations from all CPs. Cron expression.- Since:
- 1.9.0
-
setMinimumMetadataCacheTimeSecs
public void setMinimumMetadataCacheTimeSecs(long minimumMetadataCacheTimeSecs) Cached CP metadata is only refreshed if cached earlier than this.
Default: 60- Since:
- 1.10.0
-
setExternalTokenExchangeEnabled
public void setExternalTokenExchangeEnabled(boolean externalTokenExchangeEnabled) Allow token exchange with external tokens.
Default: false- Since:
- 1.13.0
-
setSaml2TokenExchangeEnabled
public void setSaml2TokenExchangeEnabled(boolean saml2TokenExchangeEnabled) Allow saml2 token exchange.
Default: false- Since:
- 1.14.0
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-