Documentation ¶
Overview ¶
Package authinfo provides authentication and authorization information that results from the TLS handshake.
Index ¶
- func NewS2AAuthInfo(result *grpcpb.SessionResult) (credentials.AuthInfo, error)
- type S2AAuthInfo
- func (s *S2AAuthInfo) ApplicationProtocol() string
- func (s *S2AAuthInfo) AuthType() string
- func (s *S2AAuthInfo) Ciphersuite() commonpb.Ciphersuite
- func (s *S2AAuthInfo) IsHandshakeResumed() bool
- func (s *S2AAuthInfo) LocalCertFingerprint() []byte
- func (s *S2AAuthInfo) LocalIdentity() *commonpb.Identity
- func (s *S2AAuthInfo) PeerCertFingerprint() []byte
- func (s *S2AAuthInfo) PeerIdentity() *commonpb.Identity
- func (s *S2AAuthInfo) SecurityLevel() credentials.SecurityLevel
- func (s *S2AAuthInfo) TLSVersion() commonpb.TLSVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewS2AAuthInfo ¶
func NewS2AAuthInfo(result *grpcpb.SessionResult) (credentials.AuthInfo, error)
NewS2AAuthInfo returns a new S2AAuthInfo object from the S2A session result.
Types ¶
type S2AAuthInfo ¶
type S2AAuthInfo struct {
// contains filtered or unexported fields
}
S2AAuthInfo exposes authentication and authorization information from the S2A session result to the gRPC stack.
func (*S2AAuthInfo) ApplicationProtocol ¶
func (s *S2AAuthInfo) ApplicationProtocol() string
ApplicationProtocol returns the application protocol, e.g. "grpc".
func (*S2AAuthInfo) AuthType ¶
func (s *S2AAuthInfo) AuthType() string
AuthType returns the authentication type.
func (*S2AAuthInfo) Ciphersuite ¶
func (s *S2AAuthInfo) Ciphersuite() commonpb.Ciphersuite
Ciphersuite returns the ciphersuite negotiated during the handshake.
func (*S2AAuthInfo) IsHandshakeResumed ¶
func (s *S2AAuthInfo) IsHandshakeResumed() bool
IsHandshakeResumed returns true if a cached session was used to resume the handshake.
func (*S2AAuthInfo) LocalCertFingerprint ¶
func (s *S2AAuthInfo) LocalCertFingerprint() []byte
LocalCertFingerprint returns the SHA256 hash of the local certificate used in the S2A handshake.
func (*S2AAuthInfo) LocalIdentity ¶
func (s *S2AAuthInfo) LocalIdentity() *commonpb.Identity
LocalIdentity returns the local identity of the application used during session setup.
func (*S2AAuthInfo) PeerCertFingerprint ¶
func (s *S2AAuthInfo) PeerCertFingerprint() []byte
PeerCertFingerprint returns the SHA256 hash of the peer certificate used in the S2A handshake.
func (*S2AAuthInfo) PeerIdentity ¶
func (s *S2AAuthInfo) PeerIdentity() *commonpb.Identity
PeerIdentity returns the authenticated identity of the peer.
func (*S2AAuthInfo) SecurityLevel ¶
func (s *S2AAuthInfo) SecurityLevel() credentials.SecurityLevel
SecurityLevel returns the security level of the connection.
func (*S2AAuthInfo) TLSVersion ¶
func (s *S2AAuthInfo) TLSVersion() commonpb.TLSVersion
TLSVersion returns the TLS version negotiated during the handshake.