クラス GcpIamCredentialsAuthentication

java.lang.ObjectSE
org.springframework.vault.authentication.GcpJwtAuthenticationSupport
org.springframework.vault.authentication.GcpIamCredentialsAuthentication
実装済みのインターフェース一覧:
ClientAuthentication

public class GcpIamCredentialsAuthentication extends GcpJwtAuthenticationSupport implements ClientAuthentication
Google Cloud IAM 認証情報のログイン実装では、GCP IAM サービスアカウントを使用して、IAM 認証情報 projects.serviceAccounts.signJwt メソッドを使用する JSON Web トークン経由でその信頼性を正当化します。

この認証方法では、Google IAM Credentials API を使用して、特定の com.google.api.client.auth.oauth2.Credential の署名付きトークンを取得します。サービスアカウントの詳細は、JSON ファイルまたはランタイム環境(GAE、GCE)から取得できる GoogleCredentials から取得されます。

GcpIamCredentialsAuthentication は、同期 API を使用する Google Java API を使用します。

導入:
2.3.2
作成者:
Andreas Gebauer, Mark Paluch
関連事項:
  • コンストラクターの詳細

    • GcpIamCredentialsAuthentication

      public GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options, RestOperations restOperations)
      GcpIamCredentialsAuthenticationOptionsRestOperations を指定して、GcpIamCredentialsAuthentication の新しいインスタンスを作成します。このコンストラクターは、Google API の使用のために InstantiatingGrpcChannelProvider を初期化します。
      パラメーター:
      options - null であってはなりません。
      restOperations - Vault ログイン用の HTTP クライアントは null であってはなりません。
    • GcpIamCredentialsAuthentication

      public GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options, RestOperations restOperations, com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider)
      GcpIamCredentialsAuthenticationOptionsRestOperationsTransportChannelProvider を指定して、GcpIamCredentialsAuthentication の新しいインスタンスを作成します。
      パラメーター:
      options - null であってはなりません。
      restOperations - Vault ログイン用の HTTP クライアントは null であってはなりません。
      transportChannelProvider - トランスポートチャネル Google API の使用のためのプロバイダー。null にすることはできません。
    • GcpIamCredentialsAuthentication

      public GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options, RestClient client)
      GcpIamCredentialsAuthenticationOptionsRestClient を指定して、GcpIamCredentialsAuthentication の新しいインスタンスを作成します。このコンストラクターは、Google API の使用のために InstantiatingGrpcChannelProvider を初期化します。
      パラメーター:
      options - null であってはなりません。
      client - Vault ログイン用の HTTP クライアントは null であってはなりません。
      導入:
      4.0
    • GcpIamCredentialsAuthentication

      public GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options, RestClient restClient, com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider)
      GcpIamCredentialsAuthenticationOptionsRestOperationsTransportChannelProvider を指定して、GcpIamCredentialsAuthentication の新しいインスタンスを作成します。
      パラメーター:
      options - null であってはなりません。
      restClient - Vault ログイン用の HTTP クライアントは null であってはなりません。
      transportChannelProvider - トランスポートチャネル Google API の使用のためのプロバイダー。null にすることはできません。
      導入:
      4.0
  • メソッドの詳細

    • login

      public VaultToken login() throws VaultException
      インターフェースからコピーされた説明: ClientAuthentication
      認証された Vault アクセス用の VaultToken を取得します。

      このメソッドは、Vault への認証リクエストを実行するか、キャッシュされたトークンまたは事前構成されたトークンを返す場合があります。

      次で指定:
      インターフェース ClientAuthenticationlogin 
      戻り値:
      後続の認証リクエストの Vault トークン
      例外:
      VaultLoginException - 認証が失敗した場合。
      VaultException
      関連事項:
    • signJwt

      protected StringSE signJwt()