org.apache.hadoop.yarn.security.client

## Class BaseClientToAMTokenSecretManager

- java.lang.Object
- - org.apache.hadoop.security.token.SecretManager<ClientToAMTokenIdentifier>
  - - org.apache.hadoop.yarn.security.client.BaseClientToAMTokenSecretManager

- Direct Known Subclasses:
    ClientToAMTokenSecretManager

      @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public abstract class BaseClientToAMTokenSecretManager
      extends org.apache.hadoop.security.token.SecretManager<ClientToAMTokenIdentifier>

  A base `SecretManager` for AMs to extend and validate Client-RM tokens issued to clients by the RM using the underlying master-key shared by RM to the AMs on their launch. All the methods are called by either Hadoop RPC or YARN, so this class is strictly for the purpose of inherit/extend and register with Hadoop RPC.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager

      `org.apache.hadoop.security.token.SecretManager.InvalidToken`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseClientToAMTokenSecretManager()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientToAMTokenIdentifier` | `createIdentifier()`
    `byte[]` | `createPassword(ClientToAMTokenIdentifier identifier)`
    `abstract SecretKey` | `getMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)`
    `byte[]` | `retrievePassword(ClientToAMTokenIdentifier identifier)`

    - ### Methods inherited from class org.apache.hadoop.security.token.SecretManager

      `checkAvailableForRead, createPassword, createSecretKey, generateSecret, retriableRetrievePassword`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseClientToAMTokenSecretManager

          public BaseClientToAMTokenSecretManager()

  - ### Method Detail

    - #### getMasterKey

          @InterfaceAudience.Private
          public abstract SecretKey getMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)

    - #### createPassword

          @InterfaceAudience.Private
          public byte[] createPassword(ClientToAMTokenIdentifier identifier)

      Specified by:
        `createPassword` in class `org.apache.hadoop.security.token.SecretManager<ClientToAMTokenIdentifier>`

    - #### retrievePassword

          @InterfaceAudience.Private
          public byte[] retrievePassword(ClientToAMTokenIdentifier identifier)
                                                             throws org.apache.hadoop.security.token.SecretManager.InvalidToken

      Specified by:
        `retrievePassword` in class `org.apache.hadoop.security.token.SecretManager<ClientToAMTokenIdentifier>`
      Throws:
        `org.apache.hadoop.security.token.SecretManager.InvalidToken`

    - #### createIdentifier

          @InterfaceAudience.Private
          public ClientToAMTokenIdentifier createIdentifier()

      Specified by:
        `createIdentifier` in class `org.apache.hadoop.security.token.SecretManager<ClientToAMTokenIdentifier>`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.