identity

package
v0.0.0-...-aa5415f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// 64 is the max length of docker container ids
	MaxInstanceIDLen = 64
)

Variables

This section is empty.

Functions

func GetMetadataIdentity

func GetMetadataIdentity(agentIdentity identity.IAgentIdentityInner) (identity.IMetadataIdentity, bool)

GetMetadataIdentity returns the metadata interface if the identity supports it

func GetRemoteProvider

func GetRemoteProvider(agentIdentity identity.IAgentIdentity) (credentialproviders.IRemoteProvider, bool)

GetRemoteProvider returns the credentials refresher interface if the identity supports it

func IsEC2Instance

func IsEC2Instance(agentIdentity identity.IAgentIdentity) bool

IsEC2Instance return true if the agent identity is ec2

func IsOnPremInstance

func IsOnPremInstance(agentIdentity identity.IAgentIdentity) bool

IsOnPremInstance returns true if the agent identity is onprem

func NewAgentIdentity

func NewAgentIdentity(log log.T, config *appconfig.SsmagentConfig, selector IAgentIdentitySelector) (identity identity.IAgentIdentity, err error)

Types

type IAgentIdentitySelector

type IAgentIdentitySelector interface {
	SelectAgentIdentity([]identity.IAgentIdentityInner, string) identity.IAgentIdentityInner
}

IAgentIdentitySelector abstracts logic to select an agent identity

func NewDefaultAgentIdentitySelector

func NewDefaultAgentIdentitySelector(log log.T) IAgentIdentitySelector

NewDefaultAgentIdentitySelector creates a instance of a default agent identity selector

func NewInstanceIDRegionAgentIdentitySelector

func NewInstanceIDRegionAgentIdentitySelector(log log.T, instanceID, region string) IAgentIdentitySelector

NewInstanceIDRegionAgentIdentitySelector creates a instance of a default agent identity selector

func NewRuntimeConfigIdentitySelector

func NewRuntimeConfigIdentitySelector(log log.T) IAgentIdentitySelector

Jump to

Keyboard shortcuts

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