Class SecurityPolicies
java.lang.Object
swiss.trustbroker.federation.xmlconfig.SecurityPolicies
- All Implemented Interfaces:
Serializable
This class allows configuring policies per CP/RP as opposed to SecurityChecks on a global level.
Breaking changes:
Breaking changes:
- Specification alignment: With 1.10.0
requireSignedLogoutRequestis applied to incoming LogoutRequests as specified (instead ofrequireSignedAuthnRequestused in previous releases).
The newrequireSignedLogoutNotificationRequestnow controls outbound LogoutRequests sent as SLO notifications (instead ofrequireSignedLogoutRequestused in previous releases).
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSecurityPolicies(Boolean requireSignedAuthnRequest, Boolean requireSignedLogoutRequest, Boolean requireSignedLogoutNotificationRequest, Boolean requireSignedResponse, Boolean requireEncryptedAssertion, Boolean requireSignedArtifactResponse, Boolean doSignArtifactResolve, Boolean requireAudienceRestriction, Boolean requireAudienceRestrictionForBearerSubjectConfirmation, Boolean requireSignedAuthnRequestForSsoJoin, Integer notOnOrAfterSeconds, Integer audienceNotOnOrAfterSeconds, Integer ssoMinQoaLevel, Boolean validateXmlSchema, Boolean validateHttpHeaders, Boolean delegateOrigin, Boolean forceAuthn, Boolean wsTrustIssueRequireSignedAssertion, Boolean wsTrustIssueRequireSignedRequest, Boolean wsTrustIssueRequireTimestamp, Long wsTrustIssueNotBeforeToleranceSec, Long wsTrustIssueNotOnOrAfterToleranceSec, List<String> allowedSignatureAlgorithms) Deprecated.Transition feature -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanList of allowed message signature algorithms.Overrides the globalnotOnOrAfterSecondsfor conditionsnotOnOrAfterif greater than zero.Control CP AuthnRequest scopes and RP Attribute OriginalIssuer.Flag allows to sign outbound SAML artifact resolve messages for maximum security.Always enforce re-authentication on this CP/on all CPs configured for this RP.Overrides the globaltokenLifetimeSecfor CP response AuthnInstant checks.Overrides global SecurityChecksOverrides global SecurityChecksAllow to disable required encrypted Assertion when the EncryptionKeystore is configured.Flag allows to enforce signed SAML artifact responses from CP required for maximum security to assert integrity of the incoming artifact response message.Allow to disable signature check for incoming SAML AuthnRequests.Require signed SAML AuthnRequests to join an SSO session.Allow to disable signature check for outgoing SLO notification LogoutRequests.Allow to disable signature check for incoming LogoutRequests.Flag allows to enforce signed SAML responses from CP required for maximum security to assert integrity of the incoming message and assertion.If CP returns AuthnContext of value less than that, no SSO session is created.Validate HTTP request headers.Some claims providers are not sending well-formed valid XML and therefore are blocked by XTB.WS-Trust ISSUE timestamp not before tolerance override.WS-Trust ISSUE timestamp not on or after tolerance override.Deprecated.Transition featureRequire signed request in WS-Trust ISSUE.WS-Trust ISSUE requires timestamp.inthashCode()voidsetAllowedSignatureAlgorithms(List<String> allowedSignatureAlgorithms) List of allowed message signature algorithms.voidsetAudienceNotOnOrAfterSeconds(Integer audienceNotOnOrAfterSeconds) Overrides the globalnotOnOrAfterSecondsfor conditionsnotOnOrAfterif greater than zero.voidsetDelegateOrigin(Boolean delegateOrigin) Control CP AuthnRequest scopes and RP Attribute OriginalIssuer.voidsetDoSignArtifactResolve(Boolean doSignArtifactResolve) Flag allows to sign outbound SAML artifact resolve messages for maximum security.voidsetForceAuthn(Boolean forceAuthn) Always enforce re-authentication on this CP/on all CPs configured for this RP.voidsetNotOnOrAfterSeconds(Integer notOnOrAfterSeconds) Overrides the globaltokenLifetimeSecfor CP response AuthnInstant checks.voidsetRequireAudienceRestriction(Boolean requireAudienceRestriction) Overrides global SecurityChecksvoidsetRequireAudienceRestrictionForBearerSubjectConfirmation(Boolean requireAudienceRestrictionForBearerSubjectConfirmation) Overrides global SecurityChecksvoidsetRequireEncryptedAssertion(Boolean requireEncryptedAssertion) Allow to disable required encrypted Assertion when the EncryptionKeystore is configured.voidsetRequireSignedArtifactResponse(Boolean requireSignedArtifactResponse) Flag allows to enforce signed SAML artifact responses from CP required for maximum security to assert integrity of the incoming artifact response message.voidsetRequireSignedAuthnRequest(Boolean requireSignedAuthnRequest) Allow to disable signature check for incoming SAML AuthnRequests.voidsetRequireSignedAuthnRequestForSsoJoin(Boolean requireSignedAuthnRequestForSsoJoin) Require signed SAML AuthnRequests to join an SSO session.voidsetRequireSignedLogoutNotificationRequest(Boolean requireSignedLogoutNotificationRequest) Allow to disable signature check for outgoing SLO notification LogoutRequests.voidsetRequireSignedLogoutRequest(Boolean requireSignedLogoutRequest) Allow to disable signature check for incoming LogoutRequests.voidsetRequireSignedResponse(Boolean requireSignedResponse) Flag allows to enforce signed SAML responses from CP required for maximum security to assert integrity of the incoming message and assertion.voidsetSsoMinQoaLevel(Integer ssoMinQoaLevel) If CP returns AuthnContext of value less than that, no SSO session is created.voidsetValidateHttpHeaders(Boolean validateHttpHeaders) Validate HTTP request headers.voidsetValidateXmlSchema(Boolean validateXmlSchema) Some claims providers are not sending well-formed valid XML and therefore are blocked by XTB.voidsetWsTrustIssueNotBeforeToleranceSec(Long wsTrustIssueNotBeforeToleranceSec) WS-Trust ISSUE timestamp not before tolerance override.voidsetWsTrustIssueNotOnOrAfterToleranceSec(Long wsTrustIssueNotOnOrAfterToleranceSec) WS-Trust ISSUE timestamp not on or after tolerance override.voidsetWsTrustIssueRequireSignedAssertion(Boolean wsTrustIssueRequireSignedAssertion) Deprecated.Transition featurevoidsetWsTrustIssueRequireSignedRequest(Boolean wsTrustIssueRequireSignedRequest) Require signed request in WS-Trust ISSUE.voidsetWsTrustIssueRequireTimestamp(Boolean wsTrustIssueRequireTimestamp) WS-Trust ISSUE requires timestamp.toString()
-
Constructor Details
-
SecurityPolicies
public SecurityPolicies() -
SecurityPolicies
public SecurityPolicies(Boolean requireSignedAuthnRequest, Boolean requireSignedLogoutRequest, Boolean requireSignedLogoutNotificationRequest, Boolean requireSignedResponse, Boolean requireEncryptedAssertion, Boolean requireSignedArtifactResponse, Boolean doSignArtifactResolve, Boolean requireAudienceRestriction, Boolean requireAudienceRestrictionForBearerSubjectConfirmation, Boolean requireSignedAuthnRequestForSsoJoin, Integer notOnOrAfterSeconds, Integer audienceNotOnOrAfterSeconds, Integer ssoMinQoaLevel, Boolean validateXmlSchema, Boolean validateHttpHeaders, Boolean delegateOrigin, Boolean forceAuthn, Boolean wsTrustIssueRequireSignedAssertion, Boolean wsTrustIssueRequireSignedRequest, Boolean wsTrustIssueRequireTimestamp, Long wsTrustIssueNotBeforeToleranceSec, Long wsTrustIssueNotOnOrAfterToleranceSec, List<String> allowedSignatureAlgorithms) Deprecated.Transition featureCreates a newSecurityPoliciesinstance.- Parameters:
requireSignedAuthnRequest- Allow to disable signature check for incoming SAML AuthnRequests.
Default: truerequireSignedLogoutRequest- Allow to disable signature check for incoming LogoutRequests. If not set, falls back torequireSignedAuthnRequest.requireSignedLogoutNotificationRequest- Allow to disable signature check for outgoing SLO notification LogoutRequests.
Default: truerequireSignedResponse- Flag allows to enforce signed SAML responses from CP required for maximum security to assert integrity of the incoming message and assertion. There is no requireSignedAssertion yet as this data structure is the actual data to trust. The check can therefore not be disabled for security reasons.
Overrides global SecurityChecksrequireEncryptedAssertion- Allow to disable required encrypted Assertion when the EncryptionKeystore is configured.
Default: truerequireSignedArtifactResponse- Flag allows to enforce signed SAML artifact responses from CP required for maximum security to assert integrity of the incoming artifact response message.
Overrides global SecurityChecksdoSignArtifactResolve- Flag allows to sign outbound SAML artifact resolve messages for maximum security.
Overrides global SecurityChecksrequireAudienceRestriction- Overrides global SecurityChecksrequireAudienceRestrictionForBearerSubjectConfirmation- Overrides global SecurityChecksrequireSignedAuthnRequestForSsoJoin- Require signed SAML AuthnRequests to join an SSO session. If not set, falls back torequireSignedAuthnRequest.notOnOrAfterSeconds- Overrides the globaltokenLifetimeSecfor CP response AuthnInstant checks.
Default: 2600 This is quite long time to transfer a SAML token from the issuer to its consumer to establish a relation between a user and the consuming RP. Tje problem is that some components cache the token and transfer it later.audienceNotOnOrAfterSeconds- Overrides the globalnotOnOrAfterSecondsfor conditionsnotOnOrAfterif greater than zero.ssoMinQoaLevel- If CP returns AuthnContext of value less than that, no SSO session is created.validateXmlSchema- Some claims providers are not sending well-formed valid XML and therefore are blocked by XTB. The schema check can be disabled lowering the security barrier and let OpenSAML deal with the data directly.
Default: truevalidateHttpHeaders- Validate HTTP request headers. Currentlyrefererandorigincan be validated against the AcWhitelist of an RP.delegateOrigin- Control CP AuthnRequest scopes and RP Attribute OriginalIssuer. Defaults to null as RP and CP side default behavior differsforceAuthn- Always enforce re-authentication on this CP/on all CPs configured for this RP.
Overrides the globalforceCpAuthentication.
Default: false (only enforced if RP requests it)wsTrustIssueRequireSignedAssertion- Require signed assertion in WS-Trust ISSUE.
Default: fallback to default (global default is true)wsTrustIssueRequireSignedRequest- Require signed request in WS-Trust ISSUE.
Default: fallback to defaultwsTrustIssueRequireTimestamp- WS-Trust ISSUE requires timestamp.
Default: truewsTrustIssueNotBeforeToleranceSec- WS-Trust ISSUE timestamp not before tolerance override.wsTrustIssueNotOnOrAfterToleranceSec- WS-Trust ISSUE timestamp not on or after tolerance override.allowedSignatureAlgorithms- List of allowed message signature algorithms. (Empty list means no restriction.)
Default: Global default- Since:
- 1.10.0, 1.10.0, 1.10.0, 1.10.0, 1.15.0, 1.11.0, 1.12.0, 1.10.0, 1.13.0, 1.13.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0
- See Also:
-
-
Method Details
-
builder
-
getRequireSignedAuthnRequest
Allow to disable signature check for incoming SAML AuthnRequests.
Default: true -
getRequireSignedLogoutRequest
Allow to disable signature check for incoming LogoutRequests. If not set, falls back torequireSignedAuthnRequest. -
getRequireSignedLogoutNotificationRequest
Allow to disable signature check for outgoing SLO notification LogoutRequests.
Default: true- Since:
- 1.10.0
- See Also:
-
getRequireSignedResponse
Flag allows to enforce signed SAML responses from CP required for maximum security to assert integrity of the incoming message and assertion. There is no requireSignedAssertion yet as this data structure is the actual data to trust. The check can therefore not be disabled for security reasons.
Overrides global SecurityChecks -
getRequireEncryptedAssertion
Allow to disable required encrypted Assertion when the EncryptionKeystore is configured.
Default: true- Since:
- 1.10.0
-
getRequireSignedArtifactResponse
Flag allows to enforce signed SAML artifact responses from CP required for maximum security to assert integrity of the incoming artifact response message.
Overrides global SecurityChecks- Since:
- 1.10.0
-
getDoSignArtifactResolve
Flag allows to sign outbound SAML artifact resolve messages for maximum security.
Overrides global SecurityChecks- Since:
- 1.10.0
-
getRequireAudienceRestriction
Overrides global SecurityChecks -
getRequireAudienceRestrictionForBearerSubjectConfirmation
Overrides global SecurityChecks- Since:
- 1.15.0
-
getRequireSignedAuthnRequestForSsoJoin
Require signed SAML AuthnRequests to join an SSO session. If not set, falls back torequireSignedAuthnRequest.- Since:
- 1.11.0
-
getNotOnOrAfterSeconds
Overrides the globaltokenLifetimeSecfor CP response AuthnInstant checks.
Default: 2600 This is quite long time to transfer a SAML token from the issuer to its consumer to establish a relation between a user and the consuming RP. Tje problem is that some components cache the token and transfer it later. -
getAudienceNotOnOrAfterSeconds
Overrides the globalnotOnOrAfterSecondsfor conditionsnotOnOrAfterif greater than zero. -
getSsoMinQoaLevel
If CP returns AuthnContext of value less than that, no SSO session is created. -
getValidateXmlSchema
Some claims providers are not sending well-formed valid XML and therefore are blocked by XTB. The schema check can be disabled lowering the security barrier and let OpenSAML deal with the data directly.
Default: true -
getValidateHttpHeaders
Validate HTTP request headers. Currentlyrefererandorigincan be validated against the AcWhitelist of an RP.- Since:
- 1.12.0
-
getDelegateOrigin
Control CP AuthnRequest scopes and RP Attribute OriginalIssuer. Defaults to null as RP and CP side default behavior differs -
getForceAuthn
Always enforce re-authentication on this CP/on all CPs configured for this RP.
Overrides the globalforceCpAuthentication.
Default: false (only enforced if RP requests it)- Since:
- 1.10.0
-
getWsTrustIssueRequireSignedAssertion
Deprecated.Transition featureRequire signed assertion in WS-Trust ISSUE.
Default: fallback to default (global default is true)- Since:
- 1.13.0
-
getWsTrustIssueRequireSignedRequest
Require signed request in WS-Trust ISSUE.
Default: fallback to default- Since:
- 1.13.0
-
getWsTrustIssueRequireTimestamp
WS-Trust ISSUE requires timestamp.
Default: true- Since:
- 1.15.0
-
getWsTrustIssueNotBeforeToleranceSec
WS-Trust ISSUE timestamp not before tolerance override.- Since:
- 1.15.0
-
getWsTrustIssueNotOnOrAfterToleranceSec
WS-Trust ISSUE timestamp not on or after tolerance override.- Since:
- 1.15.0
-
getAllowedSignatureAlgorithms
List of allowed message signature algorithms. (Empty list means no restriction.)
Default: Global default- Since:
- 1.15.0
-
setRequireSignedAuthnRequest
Allow to disable signature check for incoming SAML AuthnRequests.
Default: true -
setRequireSignedLogoutRequest
Allow to disable signature check for incoming LogoutRequests. If not set, falls back torequireSignedAuthnRequest. -
setRequireSignedLogoutNotificationRequest
public void setRequireSignedLogoutNotificationRequest(Boolean requireSignedLogoutNotificationRequest) Allow to disable signature check for outgoing SLO notification LogoutRequests.
Default: true- Since:
- 1.10.0
- See Also:
-
setRequireSignedResponse
Flag allows to enforce signed SAML responses from CP required for maximum security to assert integrity of the incoming message and assertion. There is no requireSignedAssertion yet as this data structure is the actual data to trust. The check can therefore not be disabled for security reasons.
Overrides global SecurityChecks -
setRequireEncryptedAssertion
Allow to disable required encrypted Assertion when the EncryptionKeystore is configured.
Default: true- Since:
- 1.10.0
-
setRequireSignedArtifactResponse
Flag allows to enforce signed SAML artifact responses from CP required for maximum security to assert integrity of the incoming artifact response message.
Overrides global SecurityChecks- Since:
- 1.10.0
-
setDoSignArtifactResolve
Flag allows to sign outbound SAML artifact resolve messages for maximum security.
Overrides global SecurityChecks- Since:
- 1.10.0
-
setRequireAudienceRestriction
Overrides global SecurityChecks -
setRequireAudienceRestrictionForBearerSubjectConfirmation
public void setRequireAudienceRestrictionForBearerSubjectConfirmation(Boolean requireAudienceRestrictionForBearerSubjectConfirmation) Overrides global SecurityChecks- Since:
- 1.15.0
-
setRequireSignedAuthnRequestForSsoJoin
Require signed SAML AuthnRequests to join an SSO session. If not set, falls back torequireSignedAuthnRequest.- Since:
- 1.11.0
-
setNotOnOrAfterSeconds
Overrides the globaltokenLifetimeSecfor CP response AuthnInstant checks.
Default: 2600 This is quite long time to transfer a SAML token from the issuer to its consumer to establish a relation between a user and the consuming RP. Tje problem is that some components cache the token and transfer it later. -
setAudienceNotOnOrAfterSeconds
Overrides the globalnotOnOrAfterSecondsfor conditionsnotOnOrAfterif greater than zero. -
setSsoMinQoaLevel
If CP returns AuthnContext of value less than that, no SSO session is created. -
setValidateXmlSchema
Some claims providers are not sending well-formed valid XML and therefore are blocked by XTB. The schema check can be disabled lowering the security barrier and let OpenSAML deal with the data directly.
Default: true -
setValidateHttpHeaders
Validate HTTP request headers. Currentlyrefererandorigincan be validated against the AcWhitelist of an RP.- Since:
- 1.12.0
-
setDelegateOrigin
Control CP AuthnRequest scopes and RP Attribute OriginalIssuer. Defaults to null as RP and CP side default behavior differs -
setForceAuthn
Always enforce re-authentication on this CP/on all CPs configured for this RP.
Overrides the globalforceCpAuthentication.
Default: false (only enforced if RP requests it)- Since:
- 1.10.0
-
setWsTrustIssueRequireSignedAssertion
@Deprecated public void setWsTrustIssueRequireSignedAssertion(Boolean wsTrustIssueRequireSignedAssertion) Deprecated.Transition featureRequire signed assertion in WS-Trust ISSUE.
Default: fallback to default (global default is true)- Since:
- 1.13.0
-
setWsTrustIssueRequireSignedRequest
Require signed request in WS-Trust ISSUE.
Default: fallback to default- Since:
- 1.13.0
-
setWsTrustIssueRequireTimestamp
WS-Trust ISSUE requires timestamp.
Default: true- Since:
- 1.15.0
-
setWsTrustIssueNotBeforeToleranceSec
WS-Trust ISSUE timestamp not before tolerance override.- Since:
- 1.15.0
-
setWsTrustIssueNotOnOrAfterToleranceSec
WS-Trust ISSUE timestamp not on or after tolerance override.- Since:
- 1.15.0
-
setAllowedSignatureAlgorithms
List of allowed message signature algorithms. (Empty list means no restriction.)
Default: Global default- Since:
- 1.15.0
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-