public class InstancePrincipalsAuthenticationDetailsProvider extends AbstractRequestingAuthenticationDetailsProvider implements RegionProvider, RefreshableOnNotAuthenticatedProvider<String>, ConfigurableRefreshOnNotAuthenticatedProvider<String>
Implementation of BasicAuthenticationDetailsProvider that integrates with instance
principal authentication endpoints to generate service tokens used for actual signing.
Also uses AuthCachingPolicy to disable caching (as the values for signing requests may
be rotated periodically).
| Modifier and Type | Class and Description |
|---|---|
static class |
InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder
Builder for InstancePrincipalsAuthenticationDetailsProviderBuilder.
|
AbstractRequestingAuthenticationDetailsProvider.Builder<B extends AbstractRequestingAuthenticationDetailsProvider.Builder<B>>, AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplierfederationClient, sessionKeySupplier| Modifier and Type | Method and Description |
|---|---|
static InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder |
builder()
Creates a new InstancePrincipalsAuthenticationDetailsProviderBuilder.
|
Region |
getRegion()
Returns the region.
|
String |
refresh()
Refreshes the authentication data used by the provider
|
String |
refreshIfExpiringWithin(Duration time)
Refreshes the authentication data used by the provider if the token is expiring within the
provided duration
|
String |
refreshIfExpiringWithin(Duration time,
boolean refreshKeys)
Refreshes the authentication data used by the provider if the token is expiring within the
provided duration and allows to enable/disable refresh of keys
|
String |
refreshSecurityToken()
Deprecated.
use
refresh() instead |
getKeyId, getPassPhrase, getPassphraseCharacters, getPrivateKeypublic static InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder builder()
Creates a new InstancePrincipalsAuthenticationDetailsProviderBuilder.
@Deprecated public String refreshSecurityToken()
refresh() insteadRefreshes the authentication data used by the provider
public String refresh()
RefreshableOnNotAuthenticatedProviderRefreshes the authentication data used by the provider
refresh in interface RefreshableOnNotAuthenticatedProvider<String>public String refreshIfExpiringWithin(Duration time)
ConfigurableRefreshOnNotAuthenticatedProviderRefreshes the authentication data used by the provider if the token is expiring within the provided duration
refreshIfExpiringWithin in interface ConfigurableRefreshOnNotAuthenticatedProvider<String>time - the duration to checkpublic String refreshIfExpiringWithin(Duration time, boolean refreshKeys)
ConfigurableRefreshOnNotAuthenticatedProviderRefreshes the authentication data used by the provider if the token is expiring within the provided duration and allows to enable/disable refresh of keys
refreshIfExpiringWithin in interface ConfigurableRefreshOnNotAuthenticatedProvider<String>time - the duration to checkrefreshKeys - boolean value to enable/disable refresh of keyspublic Region getRegion()
RegionProviderReturns the region.
getRegion in interface RegionProviderCopyright © 2016–2024. All rights reserved.