Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CredentialsIdQueryParameterName is the name of GET query parameter for the task ID. CredentialsIdQueryParameterName = "id" // CredentialsPath is the path to the credentials handler. CredentialsPath = "/v1/credentials" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IAMRoleCredentials ¶
type IAMRoleCredentials struct {
CredentialsId string `json:"-"`
RoleArn string `json:"RoleArn"`
AccessKeyId string `json:"AccessKeyId"`
SecretAccessKey string `json:"SecretAccessKey"`
SessionToken string `json:"Token"`
// Expiration is a string instead of a timestamp. This is to avoid any loss of context
// while marshalling/unmarshalling this field in the agent. The agent just echo's
// whatever is sent by the backend.
Expiration string `json:"Expiration"`
}
IAMRoleCredentials is used to save credentials sent by ACS
func IAMRoleCredentialsFromACS ¶
func IAMRoleCredentialsFromACS(roleCredentials *ecsacs.IAMRoleCredentials) IAMRoleCredentials
IAMRoleCredentialsFromACS translates ecsacs.IAMRoleCredentials object to api.IAMRoleCredentials
func (*IAMRoleCredentials) GenerateCredentialsEndpointRelativeURI ¶
func (roleCredentials *IAMRoleCredentials) GenerateCredentialsEndpointRelativeURI() string
GenerateCredentialsEndpointRelativeURI generates the relative URI for the credentials endpoint, for a given task id.
type Manager ¶
type Manager interface {
SetTaskCredentials(TaskIAMRoleCredentials) error
GetTaskCredentials(string) (*TaskIAMRoleCredentials, bool)
RemoveCredentials(string)
}
Manager is responsible for saving and retrieving credentials. A single instance of the credentials manager is created in the agent, and shared between the task engine, acs and credentials handlers
type TaskIAMRoleCredentials ¶
type TaskIAMRoleCredentials struct {
ARN string
IAMRoleCredentials IAMRoleCredentials
}
TaskIAMRoleCredentials wraps the task arn and the credentials object for the same
Click to show internal directories.
Click to hide internal directories.