Class SecurityConfigurationProperties

java.lang.Object
org.apache.camel.main.SecurityConfigurationProperties
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.camel.spi.BootstrapCloseable

@Configurer(extended=true) public class SecurityConfigurationProperties extends Object implements org.apache.camel.spi.BootstrapCloseable
Security policy configuration for Camel applications.

Controls how Camel reacts to insecure configuration at startup. Policies can be set globally or per security category:

  • allow — no warnings, allow the configuration
  • warn — log a warning at startup (default)
  • fail — throw an exception and prevent startup
Since:
4.19.0
  • Constructor Details

  • Method Details

    • end

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getPolicy

      public String getPolicy()
    • setPolicy

      public void setPolicy(String policy)
      Global security policy applied to all categories unless overridden. Controls how Camel reacts when insecure configuration is detected at startup.
    • getSecretPolicy

      public String getSecretPolicy()
    • setSecretPolicy

      public void setSecretPolicy(String secretPolicy)
      Security policy for plain-text secrets. When set, overrides the global policy for properties that contain sensitive values configured as plain text.
    • getInsecureSslPolicy

      public String getInsecureSslPolicy()
    • setInsecureSslPolicy

      public void setInsecureSslPolicy(String insecureSslPolicy)
      Security policy for insecure SSL/TLS configuration. When set, overrides the global policy for options that disable certificate validation or hostname verification.
    • getInsecureSerializationPolicy

      public String getInsecureSerializationPolicy()
    • setInsecureSerializationPolicy

      public void setInsecureSerializationPolicy(String insecureSerializationPolicy)
      Security policy for insecure deserialization configuration. When set, overrides the global policy for options that enable dangerous deserialization of untrusted data.
    • getInsecureDevPolicy

      public String getInsecureDevPolicy()
    • setInsecureDevPolicy

      public void setInsecureDevPolicy(String insecureDevPolicy)
      Security policy for development-only features. When set, overrides the global policy for options intended only for development environments.
    • getAllowedProperties

      public String getAllowedProperties()
    • setAllowedProperties

      public void setAllowedProperties(String allowedProperties)
      Comma-separated list of property keys to exclude from security policy checks. Use full property paths to allow specific properties regardless of the configured policy.
    • resolvePolicy

      public String resolvePolicy(String category)
      Resolve the effective policy for a given security category.
      Parameters:
      category - the security category (e.g., "secret", "insecure:ssl")
      Returns:
      the effective policy ("allow", "warn", or "fail")
    • isAllowed

      public boolean isAllowed(String propertyKey)
      Whether the given property key is in the allowed list.
    • getAllowedPropertySet

      public Set<String> getAllowedPropertySet()
      Returns the allowed properties as a set.