org.apache.storm.security.auth.digest

## Class JassPasswordProvider

- java.lang.Object
- - org.apache.storm.security.auth.digest.JassPasswordProvider

- All Implemented Interfaces:
    PasswordProvider

      public class JassPasswordProvider
      extends Object
      implements PasswordProvider

  Provides passwords out of a jaas conf for typical MD5-DIGEST authentication support.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SYSPROP_SUPER_PASSWORD` The system property that sets a super user password.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JassPasswordProvider(Map<String,Object> topoConf)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<char[]>` | `getPasswordFor(String user)` Get an optional password for a user.
    `boolean` | `isImpersonationAllowed()` Should impersonation be allowed by this password provider.

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

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

    - ### Methods inherited from interface org.apache.storm.security.auth.sasl.PasswordProvider

      `userName`

- - ### Field Detail

    - #### SYSPROP_SUPER_PASSWORD

          public static final String SYSPROP_SUPER_PASSWORD

      The system property that sets a super user password. This can be used in addition to the jaas conf, and takes precedent over a “super” user in the jaas conf if this is set.

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JassPasswordProvider

          public JassPasswordProvider(Map<String,Object> topoConf)
                               throws IOException

      Constructor.

      Parameters:
        `topoConf` - the configuration containing the jaas conf to use.
      Throws:
        `IOException` - if we could not read the Server section in the jaas conf.

  - ### Method Detail

    - #### getPasswordFor

          public Optional<char[]> getPasswordFor(String user)

      Description copied from interface: `PasswordProvider`

      Get an optional password for a user. If no password for the user is found the option will be empty and another PasswordProvider would be tried.

      Specified by:
        `getPasswordFor` in interface `PasswordProvider`
      Parameters:
        `user` - the user this is for.
      Returns:
        the password if it is found.

    - #### isImpersonationAllowed

          public boolean isImpersonationAllowed()

      Description copied from interface: `PasswordProvider`

      Should impersonation be allowed by this password provider. The default is false.

      Specified by:
        `isImpersonationAllowed` in interface `PasswordProvider`
      Returns:
        true if it should else false.

Copyright © 2021 The Apache Software Foundation. All rights reserved.