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
sourceimpl 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
sourceimpl Debug for CredentialProcessProvider
impl Debug for CredentialProcessProvider
sourceimpl ProvideCredentials for CredentialProcessProvider
impl ProvideCredentials for CredentialProcessProvider
sourcefn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a> where
Self: 'a,
fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a> where
Self: 'a,
Returns a future that provides credentials.
Auto Trait Implementations
impl RefUnwindSafe for CredentialProcessProvider
impl Send for CredentialProcessProvider
impl Sync for CredentialProcessProvider
impl Unpin for CredentialProcessProvider
impl UnwindSafe for CredentialProcessProvider
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more