Help us shape the future of Go! Take the 2026 Go Developer Survey

gcp

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PluginName = "gcp_iit"
)

Variables

View Source
var DefaultAgentPathTemplate = agentpathtemplate.MustParse("/{{ .PluginName }}/{{ .ProjectID }}/{{ .InstanceID }}")

DefaultAgentPathTemplate is the default text/template

Functions

func MakeAgentID added in v1.2.0

func MakeAgentID(td spiffeid.TrustDomain, agentPathTemplate *agentpathtemplate.Template, identityMetadata IdentityToken) (spiffeid.ID, error)

MakeAgentID makes an agent SPIFFE ID. The ID always has a host value equal to the given trust domain, the path is created using the given agentPathTemplate which is given access to a fully populated IdentityToken object.

Types

type ComputeEngine

type ComputeEngine struct {
	ProjectID                 string `json:"project_id"`
	ProjectNumber             int64  `json:"project_number"`
	Zone                      string `json:"zone"`
	InstanceID                string `json:"instance_id"`
	InstanceName              string `json:"instance_name"`
	InstanceCreationTimestamp int64  `json:"instance_creation_timestamp"`
}

type Google

type Google struct {
	ComputeEngine ComputeEngine `json:"compute_engine"`
}

type IdentityToken

type IdentityToken struct {
	jwt.Claims

	AuthorizedParty string `json:"azp"`
	Email           string `json:"email"`
	Google          Google `json:"google"`
}

Jump to

Keyboard shortcuts

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