Class SignedHeadersConfig
java.lang.Object
io.helidon.security.providers.httpsign.SignedHeadersConfig
Configuration of required and "if-present" headers to be signed.
Example for configuration based approach:
sign-headers: [
# request may sign headers not specified here - only specify the ones that MUST be signed
{
# if method is not defined, then this is the default config
# MUST be present and signed
always = ["date"]
}
{
method = "GET"
# MUST be present and signed
always = ["date", "(request-target)", "host"]
# MUST be signed IF present
if-present = ["authorization"]
}
]
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent API builder to createSignedHeadersConfiginstances.static final classConfiguration of headers to be signed. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSpecial header "(request-target)" is used for method and request target, including query when present. -
Method Summary
Modifier and TypeMethodDescriptionstatic SignedHeadersConfig.Builderbuilder()Builder to create a new instance.static SignedHeadersConfigLoad header configuration from config.Headers configured for a method.Headers configured for a method with optional headers matched against actual transport headers.
-
Field Details
-
REQUEST_TARGET
Special header "(request-target)" is used for method and request target, including query when present.- See Also:
-
-
Method Details
-
create
Load header configuration from config. Non-uppercase known HTTP methods also configure their uppercase names for compatibility and log a warning. An explicit uppercase configuration takes precedence over this compatibility configuration. Otherwise, the last non-uppercase configuration for a known method supplies its uppercase configuration. Custom methods retain exact case. Use uppercase names for known HTTP methods; this compatibility will be removed in a future major version.- Parameters:
config- config instance, expecting object array as children- Returns:
- signed headers configuration loaded from config
-
builder
Builder to create a new instance.- Returns:
- new builder
-
headers
Headers configured for a method with optional headers matched against actual transport headers.- Parameters:
method- method (such as GET)transportHeaders- actual headers received on the transport- Returns:
- list of headers that must be signed
-
headers
-