Class CounterParty
java.lang.Object
swiss.trustbroker.federation.xmlconfig.CounterParty
- All Implemented Interfaces:
Serializable,PathReference
- Direct Known Subclasses:
ClaimsParty,RelyingParty
Abstraction for shared features of RP and CP.
Design note: This base class could contain shared XML fields directly. But as it was retrofitted, that would change the order of elements in the XML, breaking backward compatibility.
Design note: This base class could contain shared XML fields directly. But as it was retrofitted, that would change the order of elements in the XML, breaking backward compatibility.
- Since:
- 1.8.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCounterParty.CounterPartyBuilder<C extends CounterParty,B extends CounterParty.CounterPartyBuilder<C, B>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionCounterParty(String subPath, ValidationStatus validationStatus) protected -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleandoSignArtifactResolve(boolean defaultValue) booleanbooleanforceAuthn(boolean defaultValue) booleangetAllowedSignatureAlgorithms(List<String> defaultValue) abstract AttributesSelectionabstract Certificatesabstract FeatureEnumabstract StringgetId()abstract OidcgetOidc()abstract QoagetQoa()abstract SamlgetSaml()abstract Scriptsabstract SecurityPoliciesabstract Stringswiss.trustbroker.common.saml.dto.SignatureParameters.SignatureParametersBuilderintgetSsoMinQoaLevel(int defaultValue) abstract SubjectNameMappingsList<swiss.trustbroker.common.saml.dto.SamlBinding> getSupportedWsTrustBindings(CounterParty baseParty) abstract WsTrustlonggetWsTrustIssueNotBeforeToleranceSec(long defaultValue) longgetWsTrustIssueNotOnOrAfterToleranceSec(long defaultValue) inthashCode()voidinvalidate(String error) voidinvalidate(Throwable ex) booleanbooleanisOidcEnabled(boolean oidcGloballyEnabled) booleanisSamlEnabled(boolean samlGloballyEnabled) booleanisValid()booleanisValidInboundBinding(swiss.trustbroker.common.saml.dto.SamlBinding samlBinding, Collection<swiss.trustbroker.common.saml.dto.SamlBinding> defaultBindings) booleanisValidInboundBinding(WsTrustBinding wsTrustBinding, Collection<WsTrustBinding> defaultBindings, CounterParty baseParty) booleanisWsTrustEnabled(boolean wsTrustGloballyEnabled, CounterParty baseParty) booleanbooleanrequireSignedArtifactResponse(boolean defaultValue) booleanbooleanbooleanbooleanbooleanrequireSignedResponse(boolean defaultValue) abstract voidsetEnabled(FeatureEnum enabled) voidsetSubPath(String subPath) voidsetValidationStatus(ValidationStatus validationStatus) toString()booleanvalidateHttpHeaders(boolean defaultValue) booleanwsTrustIssueRequireSignedAssertion(boolean defaultValue) booleanwsTrustIssueRequireSignedRequest(boolean defaultValue) booleanwsTrustIssueRequireTimestamp(boolean defaultValue)
-
Constructor Details
-
CounterParty
-
CounterParty
public CounterParty() -
CounterParty
-
-
Method Details
-
getId
- Returns:
- ID of the counterparty
-
getEnabled
- Returns:
- enabled flag from config or overridden due to validation errors
-
setEnabled
- Parameters:
enabled- override enabled flag
-
getShortType
- Returns:
- type for logging etc. (RP/CP)
-
getSubjectNameMappings
- Returns:
- Subject Name ID mappings for this party.
-
getSecurityPolicies
- Returns:
- Global security policy overrides for this party.
-
getSaml
- Returns:
- SAML configuration
-
getWsTrust
- Returns:
- WS-Trust configuration
-
getOidc
- Returns:
- SAML configuration
-
getAttributesSelection
- Returns:
- Selection of attributes.
-
getScripts
- Returns:
- Scripts
-
getQoa
- Returns:
- Qoa configuration
- Since:
- 1.9.0
-
getCertificates
- Returns:
- Certificate
- Since:
- 1.12.0
-
getSubPath
- Specified by:
getSubPathin interfacePathReference- Returns:
- The file's path relative to the definition directory.
-
setSubPath
- Specified by:
setSubPathin interfacePathReference- Parameters:
subPath- The file's path relative to the definition directory.
-
getValidationStatus
-
isValid
public boolean isValid() -
isEnabled
public boolean isEnabled() -
invalidate
-
invalidate
-
initializedValidationStatus
-
getSamlProtocolEndpoints
-
getSamlArtifactBinding
-
getSupportedSamlBindings
-
getEncryption
-
getSignature
-
getSignatureParametersBuilder
public swiss.trustbroker.common.saml.dto.SignatureParameters.SignatureParametersBuilder getSignatureParametersBuilder() -
isValidInboundBinding
public boolean isValidInboundBinding(swiss.trustbroker.common.saml.dto.SamlBinding samlBinding, Collection<swiss.trustbroker.common.saml.dto.SamlBinding> defaultBindings) -
forwardRpProtocolBinding
public boolean forwardRpProtocolBinding() -
getQoaConfig
-
requireSignedAuthnRequest
public boolean requireSignedAuthnRequest() -
requireSignedLogoutRequest
public boolean requireSignedLogoutRequest() -
requireSignedLogoutNotificationRequest
public boolean requireSignedLogoutNotificationRequest() -
requireSignedResponse
public boolean requireSignedResponse(boolean defaultValue) -
requireEncryptedAssertion
public boolean requireEncryptedAssertion() -
requireSignedArtifactResponse
public boolean requireSignedArtifactResponse(boolean defaultValue) -
doSignArtifactResolve
public boolean doSignArtifactResolve(boolean defaultValue) -
validateHttpHeaders
public boolean validateHttpHeaders(boolean defaultValue) -
forceAuthn
public boolean forceAuthn(boolean defaultValue) -
requireSignedAuthnRequestForSsoJoin
public boolean requireSignedAuthnRequestForSsoJoin() -
getAllowedSignatureAlgorithms
-
wsTrustIssueRequireSignedAssertion
public boolean wsTrustIssueRequireSignedAssertion(boolean defaultValue) -
wsTrustIssueRequireSignedRequest
public boolean wsTrustIssueRequireSignedRequest(boolean defaultValue) -
wsTrustIssueRequireTimestamp
public boolean wsTrustIssueRequireTimestamp(boolean defaultValue) -
getWsTrustIssueNotBeforeToleranceSec
public long getWsTrustIssueNotBeforeToleranceSec(long defaultValue) -
getWsTrustIssueNotOnOrAfterToleranceSec
public long getWsTrustIssueNotOnOrAfterToleranceSec(long defaultValue) -
getSsoMinQoaLevel
public int getSsoMinQoaLevel(int defaultValue) -
getAttributesDefinitions
-
getOidcClients
-
isOidcEnabled
public boolean isOidcEnabled(boolean oidcGloballyEnabled) - Returns:
- true if OIDC is to be used towards RP/CP.
-
isSamlEnabled
public boolean isSamlEnabled(boolean samlGloballyEnabled) - Returns:
- true if SAML is to be used towards RP/CP.
SAML works without explicitSamlelement - in that case it is considered enabled if noOidcelement is present.
Thus, for using both SAML and OIDC (only makes sense for RPs), you need to add aSamlelement.
-
getSupportedWsTrustBindings
-
isValidInboundBinding
public boolean isValidInboundBinding(WsTrustBinding wsTrustBinding, Collection<WsTrustBinding> defaultBindings, CounterParty baseParty) -
isWsTrustEnabled
- Returns:
- true if Ws-Trust is to be used towards RP/CP.
-
setValidationStatus
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-