pub struct CredentialProcessProvider { /* private fields */ }
credentials-process
only.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§
Source§impl CredentialProcessProvider
impl CredentialProcessProvider
Sourcepub fn new(command: String) -> Self
pub fn new(command: String) -> Self
Create new CredentialProcessProvider
with the command
needed to execute the external process.
Trait Implementations§
Source§impl Debug for CredentialProcessProvider
impl Debug for CredentialProcessProvider
Source§impl ProvideCredentials for CredentialProcessProvider
impl ProvideCredentials for CredentialProcessProvider
Source§fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>where
Self: 'a,
fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>where
Self: 'a,
Source§fn fallback_on_interrupt(&self) -> Option<Credentials>
fn fallback_on_interrupt(&self) -> Option<Credentials>
Auto Trait Implementations§
impl Freeze for CredentialProcessProvider
impl RefUnwindSafe for CredentialProcessProvider
impl Send for CredentialProcessProvider
impl Sync for CredentialProcessProvider
impl Unpin for CredentialProcessProvider
impl UnwindSafe for CredentialProcessProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more