Class Policy.Rule.RuleBuilder
java.lang.Object
org.springframework.vault.support.Policy.Rule.RuleBuilder
- Enclosing class:
- Policy.Rule
Builder for a
Policy.Rule.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedParameter(String name, String... values) Configure allowed parameter values givennameandvalues.build()Build thePolicy.Ruleobject.capabilities(String... capabilities) Configure capabilities represented asStringliterals.capabilities(Policy.Capability... capabilities) Configure capabilities. apabilities are added when calling this method and do not replace already configured capabilities.capability(Policy.Capability capability) Configure aPolicy.Capabilityfor the rule.deniedParameter(String name, String... values) Configure denied parameter values givennameandvalues.maxWrappingTtl(Duration ttl) Configure a max TTL for response wrapping.minWrappingTtl(Duration ttl) Configure a min TTL for response wrapping.Associate apathwith the rule.
-
Constructor Details
-
RuleBuilder
public RuleBuilder()
-
-
Method Details
-
path
Associate apathwith the rule.- Parameters:
path- must not be null or empty.- Returns:
thisPolicy.Rule.RuleBuilder.
-
capability
Configure aPolicy.Capabilityfor the rule. Capabilities are added when calling this method and do not replace already configured capabilities.- Parameters:
capability- must not be null.- Returns:
thisPolicy.Rule.RuleBuilder.
-
capabilities
Configure capabilities. apabilities are added when calling this method and do not replace already configured capabilities.- Parameters:
capabilities- must not be null.- Returns:
thisPolicy.Rule.RuleBuilder.
-
capabilities
Configure capabilities represented asStringliterals. This method resolves capabilities usingPolicy.BuiltinCapabilities. Capabilities are added when calling this method and do not replace already configured capabilities.- Parameters:
capabilities- must not be null.- Returns:
thisPolicy.Rule.RuleBuilder.- Throws:
IllegalArgumentException- if the capability cannot be resolved to a built-inPolicy.Capability.
-
minWrappingTtl
Configure a min TTL for response wrapping.- Parameters:
ttl- must not be null.- Returns:
thisPolicy.Rule.RuleBuilder.
-
maxWrappingTtl
Configure a max TTL for response wrapping.- Parameters:
ttl- must not be null.- Returns:
thisPolicy.Rule.RuleBuilder.
-
allowedParameter
Configure allowed parameter values givennameandvalues. Allowing parameter values replaces previously configured allowed parameter values. Emptyvaluesallow all values for the given parametername.- Parameters:
name- must not be null or empty.values- must not be null.- Returns:
thisPolicy.Rule.RuleBuilder.
-
deniedParameter
Configure denied parameter values givennameandvalues. Denying parameter values replaces previously configured denied parameter values. Emptyvaluesdeny parameter usage.- Parameters:
name- must not be null or empty.values- must not be null.- Returns:
thisPolicy.Rule.RuleBuilder.
-
build
Build thePolicy.Ruleobject. Requires a configuredpath(String)and at least onecapability(Policy.Capability).- Returns:
- the new
Policy.Ruleobject.
-