credentials

package
v1.61.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package credentials defines APIs for parsing SPIFFE ID.

All APIs in this package are experimental.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendH2ToNextProtos added in v1.32.0

func AppendH2ToNextProtos(ps []string) []string

AppendH2ToNextProtos appends h2 to next protos.

func ClientHandshakeInfoFromContext added in v1.38.0

func ClientHandshakeInfoFromContext(ctx context.Context) any

ClientHandshakeInfoFromContext extracts the ClientHandshakeInfo from ctx.

func CloneTLSConfig added in v1.32.0

func CloneTLSConfig(cfg *tls.Config) *tls.Config

CloneTLSConfig returns a shallow clone of the exported fields of cfg, ignoring the unexported sync.Once, which contains a mutex and must not be copied.

If cfg is nil, a new zero tls.Config is returned.

TODO: inline this function if possible.

func NewClientHandshakeInfoContext added in v1.38.0

func NewClientHandshakeInfoContext(ctx context.Context, chi any) context.Context

NewClientHandshakeInfoContext creates a context with chi.

func NewRequestInfoContext added in v1.38.0

func NewRequestInfoContext(ctx context.Context, ri any) context.Context

NewRequestInfoContext creates a context with ri.

func RequestInfoFromContext added in v1.38.0

func RequestInfoFromContext(ctx context.Context) any

RequestInfoFromContext extracts the RequestInfo from ctx.

func SPIFFEIDFromCert added in v1.33.2

func SPIFFEIDFromCert(cert *x509.Certificate) *url.URL

SPIFFEIDFromCert parses the SPIFFE ID from x509.Certificate. If the SPIFFE ID format is invalid, return nil with warning.

func SPIFFEIDFromState

func SPIFFEIDFromState(state tls.ConnectionState) *url.URL

SPIFFEIDFromState parses the SPIFFE ID from State. If the SPIFFE ID format is invalid, return nil with warning.

func WrapSyscallConn added in v1.32.0

func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn

WrapSyscallConn tries to wrap rawConn and newConn into a net.Conn that implements syscall.Conn. rawConn will be used to support syscall, and newConn will be used for read/write.

This function returns newConn if rawConn doesn't implement syscall.Conn.

Types

This section is empty.

Directories

Path Synopsis
Package xds contains non-user facing functionality of the xds credentials.
Package xds contains non-user facing functionality of the xds credentials.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL