secrets

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package secrets loads secrets from the Google Cloud Secret Manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name    string
	Project string
	// contains filtered or unexported fields
}

Config contains settings for secrets.

func NewConfig

func NewConfig(project string) *Config

NewConfig creates a new secret config.

func (*Config) LoadSigner

func (c *Config) LoadSigner(ctx context.Context, client SecretClient) (*token.Signer, error)

LoadSigner fetches the latest version of the named secret containing the JWT signer key from the Secret Manager API and returns a *token.Signer.

func (*Config) LoadVerifier

func (c *Config) LoadVerifier(ctx context.Context, client SecretClient) (*token.Verifier, error)

LoadVerifier fetches all enabled versions of the named secret containing the JWT verifier keys and returns a * token.Verifier.

type SecretClient

SecretClient wraps the AccessSecretVersion function provided by the secretmanager.Client.

Jump to

Keyboard shortcuts

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