Class SamlProperties

java.lang.Object
swiss.trustbroker.config.dto.SamlProperties

@Configuration @ConfigurationProperties(prefix="trustbroker.config.saml") public class SamlProperties extends Object
SAML protocol configuration.
  • Constructor Details

    • SamlProperties

      public SamlProperties()
    • SamlProperties

      public SamlProperties(boolean enabled, String consumerUrl, List<SamlNamespace> flowPolicyNamespaces, ArtifactResolution artifactResolution, List<String> bindings, boolean spMetadataEnabled, List<String> spNameFormats, boolean spLogoutMetadataEnabled, boolean idpMetadataEnabled, List<String> idpNameFormats, boolean idpLogoutMetadataEnabled, boolean dropAttrSelectionIfNoFilter)
      Creates a new SamlProperties instance.
      Parameters:
      enabled - SAML protocol enabled.
      Default: true
      consumerUrl - XTB SAML consumer URL, included in the metadata.
      Note: Currently, the path that is requested on XTB needs to be one of the default paths:
      • /api/v1/saml
      • /adfs/ls
      • /adfs/ls/
      • /trustbroker/adfs/ls/ (deprecated)
      flowPolicyNamespaces - Flow control namespace mappings.
      artifactResolution - SAML Artifact Resolution configuration.
      bindings - List of exposed SAML protocols.
      Default:
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact
      • urn:oasis:names:tc:SAML:2.0:bindings:SOAP (since 1.12.0 - only supported for LogoutRequest)
      spMetadataEnabled - SAML SP-side metadata can be hidden setting this feature flag to false.
      spNameFormats - RP-side supported name formats
      spLogoutMetadataEnabled - SAML CP-side logout support could be enabled but CPs need to be added as RPs.
      idpMetadataEnabled - SAML CP-side metadata can be hidden setting this feature flag to false.
      idpNameFormats - CP-side supported name formats
      idpLogoutMetadataEnabled - SAML RP-side logout support can be hidden setting this feature flag to false.
      dropAttrSelectionIfNoFilter - Drop all CP attributes if there is no AttributeSelection defined
      Since:
      1.14.0, 1.9.0, 1.9.0, 1.9.0, 1.9.0, 1.9.0, 1.9.0, 1.9.0, 1.10.0
  • Method Details

    • getSamlBindings

      public Set<swiss.trustbroker.common.saml.dto.SamlBinding> getSamlBindings()
    • builder

      public static SamlProperties.SamlPropertiesBuilder builder()
    • isEnabled

      public boolean isEnabled()
      SAML protocol enabled.
      Default: true
      Since:
      1.14.0
    • getConsumerUrl

      public String getConsumerUrl()
      XTB SAML consumer URL, included in the metadata.
      Note: Currently, the path that is requested on XTB needs to be one of the default paths:
      • /api/v1/saml
      • /adfs/ls
      • /adfs/ls/
      • /trustbroker/adfs/ls/ (deprecated)
    • getFlowPolicyNamespaces

      public List<SamlNamespace> getFlowPolicyNamespaces()
      Flow control namespace mappings.
    • getArtifactResolution

      public ArtifactResolution getArtifactResolution()
      SAML Artifact Resolution configuration.
    • getBindings

      public List<String> getBindings()
      List of exposed SAML protocols.
      Default:
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact
      • urn:oasis:names:tc:SAML:2.0:bindings:SOAP (since 1.12.0 - only supported for LogoutRequest)
      Since:
      1.9.0
    • isSpMetadataEnabled

      public boolean isSpMetadataEnabled()
      SAML SP-side metadata can be hidden setting this feature flag to false.
      Since:
      1.9.0
    • getSpNameFormats

      public List<String> getSpNameFormats()
      RP-side supported name formats
      Since:
      1.9.0
    • isSpLogoutMetadataEnabled

      public boolean isSpLogoutMetadataEnabled()
      SAML CP-side logout support could be enabled but CPs need to be added as RPs.
      Since:
      1.9.0
    • isIdpMetadataEnabled

      public boolean isIdpMetadataEnabled()
      SAML CP-side metadata can be hidden setting this feature flag to false.
      Since:
      1.9.0
    • getIdpNameFormats

      public List<String> getIdpNameFormats()
      CP-side supported name formats
      Since:
      1.9.0
    • isIdpLogoutMetadataEnabled

      public boolean isIdpLogoutMetadataEnabled()
      SAML RP-side logout support can be hidden setting this feature flag to false.
      Since:
      1.9.0
    • isDropAttrSelectionIfNoFilter

      public boolean isDropAttrSelectionIfNoFilter()
      Drop all CP attributes if there is no AttributeSelection defined
      Since:
      1.10.0
    • setEnabled

      public void setEnabled(boolean enabled)
      SAML protocol enabled.
      Default: true
      Since:
      1.14.0
    • setConsumerUrl

      public void setConsumerUrl(String consumerUrl)
      XTB SAML consumer URL, included in the metadata.
      Note: Currently, the path that is requested on XTB needs to be one of the default paths:
      • /api/v1/saml
      • /adfs/ls
      • /adfs/ls/
      • /trustbroker/adfs/ls/ (deprecated)
    • setFlowPolicyNamespaces

      public void setFlowPolicyNamespaces(List<SamlNamespace> flowPolicyNamespaces)
      Flow control namespace mappings.
    • setArtifactResolution

      public void setArtifactResolution(ArtifactResolution artifactResolution)
      SAML Artifact Resolution configuration.
    • setBindings

      public void setBindings(List<String> bindings)
      List of exposed SAML protocols.
      Default:
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
      • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact
      • urn:oasis:names:tc:SAML:2.0:bindings:SOAP (since 1.12.0 - only supported for LogoutRequest)
      Since:
      1.9.0
    • setSpMetadataEnabled

      public void setSpMetadataEnabled(boolean spMetadataEnabled)
      SAML SP-side metadata can be hidden setting this feature flag to false.
      Since:
      1.9.0
    • setSpNameFormats

      public void setSpNameFormats(List<String> spNameFormats)
      RP-side supported name formats
      Since:
      1.9.0
    • setSpLogoutMetadataEnabled

      public void setSpLogoutMetadataEnabled(boolean spLogoutMetadataEnabled)
      SAML CP-side logout support could be enabled but CPs need to be added as RPs.
      Since:
      1.9.0
    • setIdpMetadataEnabled

      public void setIdpMetadataEnabled(boolean idpMetadataEnabled)
      SAML CP-side metadata can be hidden setting this feature flag to false.
      Since:
      1.9.0
    • setIdpNameFormats

      public void setIdpNameFormats(List<String> idpNameFormats)
      CP-side supported name formats
      Since:
      1.9.0
    • setIdpLogoutMetadataEnabled

      public void setIdpLogoutMetadataEnabled(boolean idpLogoutMetadataEnabled)
      SAML RP-side logout support can be hidden setting this feature flag to false.
      Since:
      1.9.0
    • setDropAttrSelectionIfNoFilter

      public void setDropAttrSelectionIfNoFilter(boolean dropAttrSelectionIfNoFilter)
      Drop all CP attributes if there is no AttributeSelection defined
      Since:
      1.10.0
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object