identitymanager

package
v0.3.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package identitymanager provides an interface, and its implementation, to handle the creation and the issue process of an identity for a remote cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsConfig added in v0.3.0

type AwsConfig struct {
	AwsAccessKeyID     string
	AwsSecretAccessKey string
	AwsRegion          string
	AwsClusterName     string
}

AwsConfig contains the AWS configuration and access key for the Liqo user and the current EKS cluster.

func (*AwsConfig) IsEmpty added in v0.3.0

func (ac *AwsConfig) IsEmpty() bool

IsEmpty indicates that some of the required values is not set.

type IdentityManager

type IdentityManager interface {
	IdentityReader

	CreateIdentity(remoteClusterID string) (*v1.Secret, error)
	GetSigningRequest(remoteClusterID string) ([]byte, error)
	StoreCertificate(remoteClusterID string, identityResponse *auth.CertificateIdentityResponse) error
}

IdentityManager interface provides the methods to manage identities for the remote clusters.

func NewCertificateIdentityManager

func NewCertificateIdentityManager(client kubernetes.Interface,
	localClusterID clusterid.ClusterID, namespaceManager tenantnamespace.Manager) IdentityManager

NewCertificateIdentityManager gets a new certificate identity manager.

func NewIAMIdentityManager added in v0.3.0

func NewIAMIdentityManager(client kubernetes.Interface,
	localClusterID clusterid.ClusterID, awsConfig *AwsConfig,
	namespaceManager tenantnamespace.Manager) IdentityManager

NewIAMIdentityManager gets a new identity manager to handle IAM identities.

func NewIAMIdentityReader added in v0.3.0

func NewIAMIdentityReader(client kubernetes.Interface,
	localClusterID clusterid.ClusterID, awsConfig *AwsConfig,
	namespaceManager tenantnamespace.Manager) IdentityManager

NewIAMIdentityReader gets a new identity reader to handle IAM identities.

type IdentityProvider added in v0.3.0

type IdentityProvider interface {
	GetRemoteCertificate(clusterID, namespace, signingRequest string) (response *responsetypes.SigningRequestResponse, err error)
	ApproveSigningRequest(clusterID, signingRequest string) (response *responsetypes.SigningRequestResponse, err error)
}

IdentityProvider provides the interface to retrieve and approve remote cluster identities.

func NewCertificateIdentityProvider added in v0.3.0

func NewCertificateIdentityProvider(ctx context.Context, client kubernetes.Interface,
	localClusterID clusterid.ClusterID, namespaceManager tenantnamespace.Manager) IdentityProvider

NewCertificateIdentityProvider gets a new certificate identity approver.

func NewIAMIdentityProvider added in v0.3.0

func NewIAMIdentityProvider(client kubernetes.Interface,
	localClusterID clusterid.ClusterID, awsConfig *AwsConfig,
	namespaceManager tenantnamespace.Manager) IdentityProvider

NewIAMIdentityProvider gets a new identity approver to handle IAM identities.

type IdentityReader added in v0.3.0

type IdentityReader interface {
	GetConfig(remoteClusterID string, namespace string) (*rest.Config, error)
	GetRemoteTenantNamespace(remoteClusterID string, namespace string) (string, error)
}

IdentityReader provides the interface to retrieve the identities for the remote clusters.

func NewCertificateIdentityReader added in v0.3.0

func NewCertificateIdentityReader(client kubernetes.Interface,
	localClusterID clusterid.ClusterID, namespaceManager tenantnamespace.Manager) IdentityReader

NewCertificateIdentityReader gets a new certificate identity reader.

Directories

Path Synopsis
Package responsetypes contains utils for methods responses.
Package responsetypes contains utils for methods responses.
Package identitymanagertestutils provides utility funcition for identity manager testing.
Package identitymanagertestutils provides utility funcition for identity manager testing.

Jump to

Keyboard shortcuts

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