gcp

package
v1.8.10 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 4 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, computeEngine ComputeEngine) (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 ComputeEngine 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"`
	Google          Google `json:"google"`
}

Jump to

Keyboard shortcuts

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