Class InboundClientDefinition
- java.lang.Object
- 
- io.helidon.security.providers.httpsign.InboundClientDefinition
 
- 
 public class InboundClientDefinition extends Object Configuration of inbound client. This information is used to validate incoming signatures and to create a principal.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classInboundClientDefinition.BuilderFluent API builder to create a new instance ofInboundClientDefinition.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringalgorithm()Algorithm of signature used by this client.static InboundClientDefinition.Builderbuilder(Config config)Create a new builder from configuration.static InboundClientDefinition.Builderbuilder(String keyId)Create a new builder for the keyId.static InboundClientDefinitioncreate(Config config)Create a new instance from configuration.Optional<byte[]>hmacSharedSecret()For hmac-sha256 algorithm, this provides access to a secret shared with the client.Optional<KeyConfig>keyConfig()For rsa-sha256 algorithm, this provides access to the public key of the client.StringkeyId()The key id of this client.StringprincipalName()The principal name of the client.SubjectTypesubjectType()The type of principal we have authenticated (either user or service, defaults to service).
 
- 
- 
- 
Method Detail- 
builderpublic static InboundClientDefinition.Builder builder(String keyId) Create a new builder for the keyId.- Parameters:
- keyId- Key id as is received in inbound signature (mandatory part of the signature header) to map to configured RSA or HMAC key.
- Returns:
- builder instance
 
 - 
builderpublic static InboundClientDefinition.Builder builder(Config config) Create a new builder from configuration.- Parameters:
- config- configuration instance located at a single client definition (expect key-id as a child)
- Returns:
- builder configured based on config
 
 - 
createpublic static InboundClientDefinition create(Config config) Create a new instance from configuration.- Parameters:
- config- configuration instance located at a single client definition (expect key-id as a child)
- Returns:
- instance configured based on config
 
 - 
keyIdpublic String keyId() The key id of this client.- Returns:
- key id to map this configuration to inbound signature
 
 - 
principalNamepublic String principalName() The principal name of the client.- Returns:
- name to use when creating security principal for this client
 
 - 
subjectTypepublic SubjectType subjectType() The type of principal we have authenticated (either user or service, defaults to service).- Returns:
- principal type to use when creating security principal for this client
 
 - 
algorithmpublic String algorithm() Algorithm of signature used by this client.- Returns:
- algorithm of signature expected in request
 
 - 
keyConfigpublic Optional<KeyConfig> keyConfig() For rsa-sha256 algorithm, this provides access to the public key of the client.- Returns:
- Public key configuration to validate signature or empty optional if none configured
 
 - 
hmacSharedSecretpublic Optional<byte[]> hmacSharedSecret() For hmac-sha256 algorithm, this provides access to a secret shared with the client.- Returns:
- shared secret to validate signature or empty optional if none configured
 
 
- 
 
-