Documentation ¶
Overview ¶
Package credentialhelper is a Go library for interacting with `Credential Helpers`.
A `Credential Helper` is a tool for securely storing and retrieving credentials (e.g., for interacting with remote servers over `gRPC` or `HTTP(s)`).
This library provides an easy and convenient way for implementing a credential helper as well as using a credential Helper from within an application to retrieve credentials.
See https://github.com/bazelbuild/proposals/blob/main/designs/2022-06-07-bazel-credential-helpers.md#proposal for additional information about credential helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartCredentialHelper ¶
func StartCredentialHelper(helper CredentialHelper)
StartCredentialHelper is a util for turning the current process as credential helper.
This function never returns.
Types ¶
type CredentialHelper ¶
type CredentialHelper interface { // GetCredentials fetches credentials from the helper. GetCredentials(ctx context.Context, request *GetCredentialsRequest, extraParameters ...string) (*GetCredentialsResponse, error) // contains filtered or unexported methods }
CredentialHelper provides an interface to implement a Credential Helper or communicate with one.
func NewClient ¶
func NewClient(credentialHelperPath string) (CredentialHelper, error)
NewClient returns a new CredentialHelper invoking the provided path following the protocol for Bazel Credential Helpers.
type CredentialHelperBase ¶
type CredentialHelperBase struct{}
CredentialHelperBase is the base for all implementations of [CredentialHelper]s.
func (CredentialHelperBase) GetCredentials ¶
func (CredentialHelperBase) GetCredentials(ctx context.Context, request *GetCredentialsRequest, extraParameters ...string) (*GetCredentialsResponse, error)
type GetCredentialsRequest ¶
type GetCredentialsRequest struct {
URI string `json:"uri"`
}
GetCredentialsRequest represents the request for the `get` command of the Helper Protocol.
type GetCredentialsResponse ¶
GetCredentialsResponse represents the response for the `get` command of the Helper Protocol.
Directories ¶
Path | Synopsis |
---|---|
Package grpc provides integration for credential helpers with `gRPC`.
|
Package grpc provides integration for credential helpers with `gRPC`. |