impersonate

package
v0.210.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package impersonate is used to impersonate Google Credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TokenSource

func TokenSource(ctx context.Context, ts oauth2.TokenSource, config *Config) (oauth2.TokenSource, error)

TokenSource returns an impersonated TokenSource configured with the provided config using ts as the base credential provider for making requests.

Types

type Config

type Config struct {
	// Target is the service account to impersonate. Required.
	Target string
	// Scopes the impersonated credential should have. Required.
	Scopes []string
	// Delegates are the service accounts in a delegation chain. Each service
	// account must be granted roles/iam.serviceAccountTokenCreator on the next
	// service account in the chain. Optional.
	Delegates []string
}

Config for generating impersonated credentials.

Jump to

Keyboard shortcuts

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