Class SCRAMPropertiesLoginModule
- java.lang.Object
-
- org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoader
-
- org.apache.activemq.artemis.spi.core.security.jaas.SCRAMPropertiesLoginModule
-
- All Implemented Interfaces:
LoginModule,AuditLoginModule
public class SCRAMPropertiesLoginModule extends PropertiesLoader implements AuditLoginModule
Login modules that uses properties files similar to thePropertiesLoginModule. It can either store the username-password in plain text or in an encrypted/hashed form. themain(String[])method provides a way to prepare unencrypted data to be encrypted/hashed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoader
PropertiesLoader.FileNameKey
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoader
debug
-
-
Constructor Summary
Constructors Constructor Description SCRAMPropertiesLoginModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort()booleancommit()voidinitialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)booleanlogin()booleanlogout()static voidmain(String[] args)Main method that could be used to encrypt given credentials for use in properties files-
Methods inherited from class org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoader
init, load, resetUsersAndGroupsCache
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.spi.core.security.jaas.AuditLoginModule
registerFailureForAudit
-
-
-
-
Method Detail
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
- Specified by:
initializein interfaceLoginModule
-
login
public boolean login() throws LoginException- Specified by:
loginin interfaceLoginModule- Throws:
LoginException
-
commit
public boolean commit() throws LoginException- Specified by:
commitin interfaceLoginModule- Throws:
LoginException
-
abort
public boolean abort() throws LoginException- Specified by:
abortin interfaceLoginModule- Throws:
LoginException
-
logout
public boolean logout() throws LoginException- Specified by:
logoutin interfaceLoginModule- Throws:
LoginException
-
main
public static void main(String[] args) throws GeneralSecurityException, ScramException, StringPrep.StringPrepError, IOException
Main method that could be used to encrypt given credentials for use in properties files- Parameters:
args- username password type [iterations]- Throws:
GeneralSecurityException- if any security mechanism is not available on this JVMScramException- if invalid data is suppliedStringPrep.StringPrepError- if username can't be encoded according to SASL StringPrepIOException- if writing as properties failed
-
-