gcpauth

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 35 Imported by: 41

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeGCE

func AuthorizeGCE(ctx context.Context, i *AuthorizeGCEInput) error

func Factory

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

Factory returns a new backend as logical.Backend.

Types

type AuthorizeGCEInput

type AuthorizeGCEInput struct {
	// contains filtered or unexported fields
}

type CLIHandler

type CLIHandler struct{}

func (*CLIHandler) Auth

func (h *CLIHandler) Auth(c *api.Client, m map[string]string) (*api.Secret, error)

func (*CLIHandler) Help

func (h *CLIHandler) Help() string

type GcpAuthBackend

type GcpAuthBackend struct {
	*framework.Backend
	// contains filtered or unexported fields
}

func Backend

func Backend() *GcpAuthBackend

func (*GcpAuthBackend) CRMClient

func (b *GcpAuthBackend) CRMClient(ctx context.Context, s logical.Storage) (*cloudresourcemanager.Service, error)

CRMClient returns a new Cloud Resource Manager client. The client is cached.

func (*GcpAuthBackend) ClearCaches

func (b *GcpAuthBackend) ClearCaches()

ClearCaches deletes all cached clients and credentials.

func (*GcpAuthBackend) ComputeClient

func (b *GcpAuthBackend) ComputeClient(ctx context.Context, s logical.Storage) (*compute.Service, error)

ComputeClient returns a new Compute client. The client is cached.

func (*GcpAuthBackend) IAMClient

func (b *GcpAuthBackend) IAMClient(ctx context.Context, s logical.Storage) (*iam.Service, error)

IAMClient returns a new IAM client. This client talks to the IAM endpoint, for all things that are not signing JWTs. The SignJWT method in the IAM client has been deprecated, but other methods are still valid and supported.

See: https://pkg.go.dev/google.golang.org/api@v0.45.0/iam/v1 and: https://cloud.google.com/iam/docs/migrating-to-credentials-api#iam-sign-jwt-go

The client is cached.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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