Class SAMLConfiguration

java.lang.Object
org.opensaml.saml.config.SAMLConfiguration

public class SAMLConfiguration extends Object
SAML-related configuration information.

The configuration instance to use would typically be retrieved from the ConfigurationService.

  • Field Details

    • saml1ArtifactBuilderFactory

      @Nullable private SAML1ArtifactBuilderFactory saml1ArtifactBuilderFactory
      SAML 1 Artifact factory.
    • saml2ArtifactBuilderFactory

      @Nullable private SAML2ArtifactBuilderFactory saml2ArtifactBuilderFactory
      SAML 2 Artifact factory.
    • allowedBindingURLSchemes

      @Nonnull @Unmodifiable @NotLive private List<String> allowedBindingURLSchemes
      The list of schemes allowed to appear in binding URLs when encoding a message. Defaults to 'http' and 'https'.
    • enforceDecoderRequestSizeLimit

      private boolean enforceDecoderRequestSizeLimit
      Flag indicating whether to enforce SAMLRequest message size limits in the decoders.
    • decoderRequestSizeLimit

      @Nullable private Integer decoderRequestSizeLimit
      SAMLRequest message size limit.
    • enforceDecoderResponseSizeLimit

      private boolean enforceDecoderResponseSizeLimit
      Flag indicating whether to enforce SAMLResponse message size limits in the decoders.
    • decoderResponseSizeLimit

      @Nullable private Integer decoderResponseSizeLimit
      SAMLResponse message size limit.
    • enforceDecoderKeyInfoSizeLimit

      private boolean enforceDecoderKeyInfoSizeLimit
      Flag indicating whether to enforce KeyInfo size limits in the decoders (currently POST SimpleSign only).
    • decoderKeyInfoSizeLimit

      @Nullable private Integer decoderKeyInfoSizeLimit
      KeyInfo size limit (currently POST SimpleSign only).
    • decoderEstimateInflatedSize

      private boolean decoderEstimateInflatedSize
      Flag indicating whether to estimate the inflated size of deflated data, or to do an exact computation.
    • decoderInflationFactor

      @Nullable private Float decoderInflationFactor
      The inflation factor to use when isDecoderEstimateInflatedSize() is enabled.
  • Constructor Details

    • SAMLConfiguration

      public SAMLConfiguration()
      Constructor.
  • Method Details

    • getSAML1ArtifactBuilderFactory

      @Nullable public SAML1ArtifactBuilderFactory getSAML1ArtifactBuilderFactory()
      Gets the artifact factory for the library.
      Returns:
      artifact factory for the library
    • setSAML1ArtifactBuilderFactory

      public void setSAML1ArtifactBuilderFactory(@Nullable SAML1ArtifactBuilderFactory factory)
      Sets the artifact factory for the library.
      Parameters:
      factory - artifact factory for the library
    • getSAML2ArtifactBuilderFactory

      @Nullable public SAML2ArtifactBuilderFactory getSAML2ArtifactBuilderFactory()
      Gets the artifact factory for the library.
      Returns:
      artifact factory for the library
    • setSAML2ArtifactBuilderFactory

      public void setSAML2ArtifactBuilderFactory(@Nullable SAML2ArtifactBuilderFactory factory)
      Sets the artifact factory for the library.
      Parameters:
      factory - artifact factory for the library
    • getAllowedBindingURLSchemes

      @Nonnull @Unmodifiable @NotLive public List<String> getAllowedBindingURLSchemes()
      Gets the unmodifiable list of schemes allowed to appear in binding URLs when encoding a message.

      All scheme values returned will be lowercased.

      Defaults to 'http' and 'https'.

      Returns:
      list of URL schemes allowed to appear in a message
    • setAllowedBindingURLSchemes

      public void setAllowedBindingURLSchemes(@Nullable List<String> schemes)
      Sets the list of schemes allowed to appear in binding URLs when encoding a message.

      The supplied list will be copied. Values will be normalized: 1) strings will be trimmed, 2) nulls will be removed, and 3) all values will be lowercased.

      Note, the appearance of schemes such as 'javascript' may open the system up to attacks (e.g. cross-site scripting attacks).

      Parameters:
      schemes - URL schemes allowed to appear in a message
    • isEnforceDecoderRequestSizeLimit

      public boolean isEnforceDecoderRequestSizeLimit()
      Get the flag indicating whether to enforce SAMLRequest message size limits in the decoders.
      Returns:
      true if enforcement enabled, false if not
    • setEnforceDecoderRequestSizeLimit

      public void setEnforceDecoderRequestSizeLimit(boolean flag)
      Set the flag indicating whether to enforce SAMLRequest message size limits in the decoders.
      Parameters:
      flag - true if enforcement enabled, false if not
    • getDecoderRequestSizeLimit

      @Nullable public Integer getDecoderRequestSizeLimit()
      Get the SAMLRequest message size limit.
      Returns:
      the limit in bytes
    • setDecoderRequestSizeLimit

      public void setDecoderRequestSizeLimit(@Nullable Integer limit)
      Set the SAMLRequest message size limit.
      Parameters:
      limit - the limit in bytes
    • isEnforceDecoderResponseSizeLimit

      public boolean isEnforceDecoderResponseSizeLimit()
      Get the flag indicating whether to enforce SAMLResponse message size limits in the decoders.
      Returns:
      true if enforcement enabled, false if not
    • setEnforceDecoderResponseSizeLimit

      public void setEnforceDecoderResponseSizeLimit(boolean flag)
      Set the flag indicating whether to enforce SAMLResponse message size limits in the decoders.
      Parameters:
      flag - true if enforcement enabled, false if not
    • getDecoderResponseSizeLimit

      @Nullable public Integer getDecoderResponseSizeLimit()
      Get the SAMLResponse message size limit.
      Returns:
      the limit in bytes
    • setDecoderResponseSizeLimit

      public void setDecoderResponseSizeLimit(@Nullable Integer limit)
      Set the SAMLResponse message size limit.
      Parameters:
      limit - the limit in bytes
    • isEnforceDecoderKeyInfoSizeLimit

      public boolean isEnforceDecoderKeyInfoSizeLimit()
      Get the flag indicating whether to enforce KeyInfo size limits in the decoders (currently POST SimpleSign only).
      Returns:
      true if enforcement enabled, false if not
    • setEnforceDecoderKeyInfoSizeLimit

      public void setEnforceDecoderKeyInfoSizeLimit(boolean flag)
      Set the flag indicating whether to enforce KeyInfo size limits in the decoders (currently POST SimpleSign only).
      Parameters:
      flag - true if enforcement enabled, false if not
    • getDecoderKeyInfoSizeLimit

      @Nullable public Integer getDecoderKeyInfoSizeLimit()
      Get the KeyInfo size limit (currently POST SimpleSign only).
      Returns:
      the limit in bytes
    • setDecoderKeyInfoSizeLimit

      public void setDecoderKeyInfoSizeLimit(@Nullable Integer limit)
      Set the KeyInfo size limit (currently POST SimpleSign only).
      Parameters:
      limit - the limit in bytes
    • isDecoderEstimateInflatedSize

      public boolean isDecoderEstimateInflatedSize()
      Get the flag indicating whether to estimate the inflated size of deflated data, or to do an exact computation.

      For more details on usage see the documentation for SAMLBindingSupport.getDeflatedSize(String, boolean, Float).

      Returns:
      true if estimation is enabled, false if not
    • setDecoderEstimateInflatedSize

      public void setDecoderEstimateInflatedSize(boolean flag)
      Set the flag indicating whether to estimate the inflated size of deflated data, or to do an exact computation.

      For more details on usage see the documentation for SAMLBindingSupport.getDeflatedSize(String, boolean, Float).

      Parameters:
      flag - true if estimate is enabled, false if not
    • getDecoderInflationFactor

      @Nullable public Float getDecoderInflationFactor()
      Get the inflation factor to use when isDecoderEstimateInflatedSize() is enabled.

      For more details on usage see the documentation for SAMLBindingSupport.getDeflatedSize(String, boolean, Float).

      Returns:
      the inflation factor
    • setDecoderInflationFactor

      public void setDecoderInflationFactor(@Nullable Float inflationFactor)
      Set the inflation factor to use when isDecoderEstimateInflatedSize() is enabled.

      For more details on usage see the documentation for SAMLBindingSupport.getDeflatedSize(String, boolean, Float).

      Parameters:
      inflationFactor - the inflation factor