identity

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package identity implements types and utility routines related to the identity of a workload, as used within OSM.

Index

Constants

View Source
const WildcardPrincipal = "*"

WildcardPrincipal is a wildcard to match all principals. A principal is a service identity with a trust domain.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sServiceAccount added in v0.9.0

type K8sServiceAccount struct {
	Namespace string
	Name      string
}

K8sServiceAccount is a type for a namespaced service account

func (K8sServiceAccount) AsPrincipal added in v1.2.1

func (sa K8sServiceAccount) AsPrincipal(trustDomain string) string

AsPrincipal converts the K8sServiceAccount to a Principal with the given trust domain.

func (K8sServiceAccount) String added in v0.9.0

func (sa K8sServiceAccount) String() string

String returns the string representation of the service account object

func (K8sServiceAccount) ToServiceIdentity added in v0.9.0

func (sa K8sServiceAccount) ToServiceIdentity() ServiceIdentity

ToServiceIdentity converts K8sServiceAccount to the newer ServiceIdentity

type ServiceIdentity

type ServiceIdentity string

ServiceIdentity is the type used to represent the identity for a service For Kubernetes services this string will be in the format: <ServiceAccount>.<Namespace>

const WildcardServiceIdentity ServiceIdentity = "*"

WildcardServiceIdentity is a wildcard to match all service identities

func New added in v1.2.0

func New(name, namespace string) ServiceIdentity

New returns a new ServiceIdentity for the given name and namespace.

func (ServiceIdentity) AsPrincipal added in v1.2.0

func (si ServiceIdentity) AsPrincipal(trustDomain string) string

AsPrincipal converts the ServiceIdentity to a Principal with the given trust domain.

func (ServiceIdentity) IsWildcard added in v0.10.0

func (si ServiceIdentity) IsWildcard() bool

IsWildcard determines if the ServiceIdentity is a wildcard

func (ServiceIdentity) String

func (si ServiceIdentity) String() string

String returns the ServiceIdentity as a string

func (ServiceIdentity) ToK8sServiceAccount added in v0.9.0

func (si ServiceIdentity) ToK8sServiceAccount() K8sServiceAccount

ToK8sServiceAccount converts a ServiceIdentity to a K8sServiceAccount to help with transition from K8sServiceAccount to ServiceIdentity

Jump to

Keyboard shortcuts

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