Class UserScramCredentialUpsertion

java.lang.Object
org.apache.kafka.clients.admin.UserScramCredentialAlteration
org.apache.kafka.clients.admin.UserScramCredentialUpsertion

public class UserScramCredentialUpsertion
extends UserScramCredentialAlteration
A request to update/insert a SASL/SCRAM credential for a user.
See Also:
KIP-554: Add Broker-side SCRAM Config API
  • Constructor Details

    • UserScramCredentialUpsertion

      public UserScramCredentialUpsertion​(String user, ScramCredentialInfo credentialInfo, String password)
      Constructor that generates a random salt
      Parameters:
      user - the user for which the credential is to be updated/inserted
      credentialInfo - the mechanism and iterations to be used
      password - the password
    • UserScramCredentialUpsertion

      public UserScramCredentialUpsertion​(String user, ScramCredentialInfo credentialInfo, byte[] password)
      Constructor that generates a random salt
      Parameters:
      user - the user for which the credential is to be updated/inserted
      credentialInfo - the mechanism and iterations to be used
      password - the password
    • UserScramCredentialUpsertion

      public UserScramCredentialUpsertion​(String user, ScramCredentialInfo credentialInfo, byte[] password, byte[] salt)
      Constructor that accepts an explicit salt
      Parameters:
      user - the user for which the credential is to be updated/inserted
      credentialInfo - the mechanism and iterations to be used
      password - the password
      salt - the salt to be used
  • Method Details

    • credentialInfo

      public ScramCredentialInfo credentialInfo()
      Returns:
      the mechanism and iterations
    • salt

      public byte[] salt()
      Returns:
      the salt
    • password

      public byte[] password()
      Returns:
      the password