Package com.yahoo.security.tls
Record Class ConnectionAuthContext
java.lang.Object
java.lang.Record
com.yahoo.security.tls.ConnectionAuthContext
public record ConnectionAuthContext(List<X509Certificate> peerCertificateChain, CapabilitySet capabilities, Set<String> matchedPolicies, CapabilityMode capabilityMode)
extends Record
- Author:
- bjorncs
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionAuthContext(List<X509Certificate> peerCertificateChain, CapabilitySet capabilities, Set<String> matchedPolicies, CapabilityMode capabilityMode) Creates an instance of aConnectionAuthContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecapabilitiesrecord component.Returns the value of thecapabilityModerecord component.static ConnectionAuthContextConstruct instance with all capabilitiesstatic ConnectionAuthContextConstruct instance with all capabilitiesfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thematchedPoliciesrecord component.Returns the value of thepeerCertificateChainrecord component.final StringtoString()Returns a string representation of this record class.voidverifyCapabilities(CapabilitySet requiredCapabilities) Throws checked exception to force caller to handle verification failed.voidverifyCapabilities(CapabilitySet requiredCapabilities, String action, String resource, String peer) Throws checked exception to force caller to handle verification failed.
-
Constructor Details
-
ConnectionAuthContext
public ConnectionAuthContext(List<X509Certificate> peerCertificateChain, CapabilitySet capabilities, Set<String> matchedPolicies, CapabilityMode capabilityMode) Creates an instance of aConnectionAuthContextrecord class.- Parameters:
peerCertificateChain- the value for thepeerCertificateChainrecord componentcapabilities- the value for thecapabilitiesrecord componentmatchedPolicies- the value for thematchedPoliciesrecord componentcapabilityMode- the value for thecapabilityModerecord component
-
-
Method Details
-
authorized
public boolean authorized() -
verifyCapabilities
public void verifyCapabilities(CapabilitySet requiredCapabilities) throws MissingCapabilitiesException Throws checked exception to force caller to handle verification failed.- Throws:
MissingCapabilitiesException
-
verifyCapabilities
public void verifyCapabilities(CapabilitySet requiredCapabilities, String action, String resource, String peer) throws MissingCapabilitiesException Throws checked exception to force caller to handle verification failed. Provided strings are used for improved logging only- Throws:
MissingCapabilitiesException
-
peerCertificate
-
peerCertificateString
-
defaultAllCapabilities
Construct instance with all capabilities -
defaultAllCapabilities
Construct instance with all capabilities -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
peerCertificateChain
Returns the value of thepeerCertificateChainrecord component.- Returns:
- the value of the
peerCertificateChainrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
matchedPolicies
Returns the value of thematchedPoliciesrecord component.- Returns:
- the value of the
matchedPoliciesrecord component
-
capabilityMode
Returns the value of thecapabilityModerecord component.- Returns:
- the value of the
capabilityModerecord component
-