クラス AwsIamAuthentication
java.lang.ObjectSE
org.springframework.vault.authentication.AwsIamAuthentication
- 実装済みのインターフェース一覧:
AuthenticationStepsFactory,ClientAuthentication
public class AwsIamAuthentication
extends ObjectSE
implements ClientAuthentication, AuthenticationStepsFactory
署名付き HTTP リクエストを使用して現在の ID を照会する AWS IAM 認証。
AWS IAM 認証は、Vault によって実行される signed HTTP リクエストを作成し、AWS STS GetCallerIdentity を使用して署名者の ID を取得します。署名には、署名を計算するために AwsCredentials が必要です。
この認証では、AWS の Java SDK がリクエストパラメーターに署名し、署名キーを計算する必要があります。適切な AwsCredentialsProvider を使用すると、ECS および Lambda インスタンス内で、プロファイルが割り当てられた AWS-EC2 インスタンス内での認証が可能になります。
- 導入:
- 1.1
- 作成者:
- Mark Paluch
- 関連事項:
AwsIamAuthenticationOptionsAwsCredentialsProviderRestOperations- 認証バックエンド: AWS (IAM)
- AWS: GetCallerIdentity
コンストラクター概要
コンストラクターコンストラクター説明AwsIamAuthentication(AwsIamAuthenticationOptions options, RestOperations vaultRestOperations) AwsIamAuthenticationOptions、Vault、AWS メタデータ固有のRestOperationsを指定して、新しいAwsIamAuthenticationを作成します。方法の概要
修飾子と型メソッド説明static AuthenticationStepsAwsIamAuthenticationOptionsを指定して AWS-IAM 認証用のAuthenticationStepsを作成します。protected static AuthenticationStepscreateAuthenticationSteps(AwsIamAuthenticationOptions options, software.amazon.awssdk.auth.credentials.AwsCredentials credentials, software.amazon.awssdk.regions.Region region) AWS-IAM 認証方式を使用して Vault ログインを実行するリクエスト本文を作成します。認証フローを記述するAuthenticationStepsを取得します。login()VaultTokenを返します。
コンストラクターの詳細
AwsIamAuthentication
public AwsIamAuthentication(AwsIamAuthenticationOptions options, RestOperations vaultRestOperations) AwsIamAuthenticationOptions、Vault、AWS メタデータ固有のRestOperationsを指定して、新しいAwsIamAuthenticationを作成します。- パラメーター:
options- null であってはなりません。vaultRestOperations- null であってはなりません。
方法の詳細
createAuthenticationSteps
AwsIamAuthenticationOptionsを指定して、AWS-IAM 認証用のAuthenticationStepsを作成します。結果として得られるAuthenticationStepsは、認証中に I/O がブロックされるのを防ぐために、先行してフェッチされたAwsCredentialsを再利用します。- パラメーター:
options- null であってはなりません。- 戻り値:
- AWS-IAM 認証の場合は
AuthenticationSteps。 - 導入:
- 2.2
createAuthenticationSteps
protected static AuthenticationSteps createAuthenticationSteps(AwsIamAuthenticationOptions options, software.amazon.awssdk.auth.credentials.AwsCredentials credentials, software.amazon.awssdk.regions.Region region) login
インターフェースからコピーされた説明:ClientAuthenticationVaultTokenを返します。このメソッドは、必要に応じて Vault にログインしてtokenを取得できます。- 次で指定:
- インターフェース
ClientAuthentication内のlogin - 戻り値:
VaultToken。- 例外:
VaultException
getAuthenticationSteps
インターフェースからコピーされた説明:AuthenticationStepsFactory認証フローを記述するAuthenticationStepsを取得します。- 次で指定:
- インターフェース
AuthenticationStepsFactory内のgetAuthenticationSteps - 戻り値:
- 認証フローを記述する
AuthenticationSteps。
createRequestBody
AWS-IAM 認証方式を使用して Vault ログインを実行するリクエスト本文を作成します。- パラメーター:
options- null であってはなりません。- 戻り値:
- 本体のキーと値のペアを含むマップ。