gcp

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PluginName = "gcp_iit"
)

Variables

View Source
var DefaultAgentPathTemplate = template.Must(template.New("agent-path").Parse("{{ .PluginName }}/{{ .ProjectID }}/{{ .InstanceID }}"))

DefaultAgentPathTemplate is the default text/template

Functions

func MakeSpiffeID

func MakeSpiffeID(trustDomain string, agentPathTemplate *template.Template, computeEngine ComputeEngine) (*url.URL, error)

MakeSpiffeID 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