pub struct CredentialProcessProvider { /* private fields */ }
Expand description

External process credentials provider

This credentials provider runs a configured external process and parses its output to retrieve credentials.

The external process must exit with status 0 and output the following JSON format to stdout to provide credentials:

{
    "Version:" 1,
    "AccessKeyId": "access key id",
    "SecretAccessKey": "secret access key",
    "SessionToken": "session token",
    "Expiration": "time that the expiration will expire"
}

The Version must be set to 1. AccessKeyId and SecretAccessKey are always required. SessionToken must be set if a session token is associated with the AccessKeyId. The Expiration is optional, and must be given in the RFC 3339 date time format (e.g., 2022-05-26T12:34:56.789Z).

If the external process exits with a non-zero status, then the contents of stderr will be output as part of the credentials provider error message.

This credentials provider is included in the profile credentials provider, and can be configured using the credential_process attribute. For example:

[profile example]
credential_process = /path/to/my/process --some --arguments

Implementations

Create new CredentialProcessProvider with the command needed to execute the external process.

Trait Implementations

Formats the value using the given formatter. Read more

Returns a future that provides credentials.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more