googlecloudlogs4datatug

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMSClient

KMSClient is implemented by Cloud KMS KeyManagementClient. A single service identity with narrow Encrypt/Decrypt permission supplies this client.

type OAuth

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

func NewOAuth

func NewOAuth(config OAuthConfig) (*OAuth, error)

func (*OAuth) AuthorizationURL

func (o *OAuth) AuthorizationURL(a personalcloudlogs4datatug.Authorization) (string, error)

AuthorizationURL accepts only the server-generated state, nonce and S256 challenge.

func (*OAuth) Exchange

Exchange performs the code exchange on the server and verifies the signed ID token before any Google subject is exposed to the service.

func (*OAuth) Refresh

func (o *OAuth) Refresh(ctx context.Context, refreshToken string) (string, time.Time, error)

Refresh uses only the delegated refresh token. Callers keep the returned access token in bounded server memory and fence the grant generation before use.

func (*OAuth) Revoke

func (o *OAuth) Revoke(ctx context.Context, refreshToken string) error

Revoke sends a bounded provider request. Google revocation can invalidate the entire isolated OAuth project grant; the caller owns cleanup and its fence.

type OAuthConfig

type OAuthConfig struct {
	ClientID, ClientSecret, RedirectURI string
	HTTPClient                          *http.Client
}

OAuthConfig is supplied only by the server's dedicated Cloud Logs OAuth project. ClientSecret must never be returned to a browser or put in a URL.

type Vault

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

func NewVault

func NewVault(keyName string, kms KMSClient) (*Vault, error)

func (*Vault) Open

Open decrypts only with the same grant identity and key. A corrupt envelope, changed AAD, disabled key version or KMS failure never yields a token.

func (*Vault) Seal

func (v *Vault) Seal(ctx context.Context, grant personalcloudlogs4datatug.Grant, refreshToken string) ([]byte, error)

Seal binds the refresh token to every stable grant identity field. Key rotation uses the KMS CryptoKey primary for new encryptions.

Jump to

Keyboard shortcuts

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