identity

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 3 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 (
	// ClusterLocalTrustDomain is the trust domain for the local kubernetes cluster
	ClusterLocalTrustDomain = "cluster.local"
)

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) IsEmpty added in v0.9.0

func (sa K8sServiceAccount) IsEmpty() bool

IsEmpty returns true if the given service account object is empty

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 TODO(draychev): ToServiceIdentity is used in many places to ease with transition from K8sServiceAccount to ServiceIdentity and should be removed (not everywhere) - [https://github.com/openservicemesh/osm/issues/2218]

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>.cluster.local

func GetKubernetesServiceIdentity

func GetKubernetesServiceIdentity(svcAccount K8sServiceAccount, trustDomain string) ServiceIdentity

GetKubernetesServiceIdentity returns the ServiceIdentity based on Kubernetes ServiceAccount and a trust domain

func (ServiceIdentity) GetCertificateCommonName added in v0.9.0

func (si ServiceIdentity) GetCertificateCommonName() certificate.CommonName

GetCertificateCommonName returns a certificate CommonName compliant with RFC-1123 (https://tools.ietf.org/html/rfc1123) DNS name. TODO(draychev): Remove this once the transition to ServiceIdentity is complete [https://github.com/openservicemesh/osm/issues/3182]

func (ServiceIdentity) GetSDSCSecretName added in v0.9.0

func (si ServiceIdentity) GetSDSCSecretName() string

GetSDSCSecretName returns a string key used as the name of Certificate in all SDS structs. TODO(draychev): Remove this once the transition to ServiceIdentity is complete [https://github.com/openservicemesh/osm/issues/3182]

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