zone

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO (bartsmykla): uncomment when Zone Token will be available for dataplanes
	// 	and ingresses
	// DataplaneScope string = "dataplane
	// IngressScope string = "ingress"
	EgressScope string = "egress"
)
View Source
const SigningKeyPrefix = "zone-token-signing-key"
View Source
const SigningPublicKeyPrefix = "zone-token-signing-public-key"

Variables

View Source
var FullScope = []string{

	EgressScope,
}
View Source
var TokenRevocationsGlobalSecretKey = core_model.ResourceKey{
	Name: "zone-token-revocations",
	Mesh: core_model.NoMesh,
}

Functions

func InScope

func InScope(scope []string, s string) bool

Types

type Identity

type Identity struct {
	Zone  string
	Scope []string
}

type Token

type Token = string

type TokenIssuer

type TokenIssuer interface {
	Generate(ctx context.Context, identity Identity, validFor time.Duration) (tokens.Token, error)
}

TokenIssuer issues Zone Tokens used then for proving identity of the zone egresses. Issued token can be bound by the zone name and the scope.

func NewTokenIssuer

func NewTokenIssuer(issuer tokens.Issuer) TokenIssuer

type Validator

type Validator interface {
	Validate(ctx context.Context, token Token) (Identity, error)
}

func NewValidator

func NewValidator(validator core_tokens.Validator) Validator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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