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, LOGIN_CONFIG_SYS_PROP_NAME
-
-
Constructor Summary
Constructors Constructor Description SCRAMPropertiesLoginModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
abort()
boolean
commit()
void
initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
boolean
login()
boolean
logout()
static void
main(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
booleanOption, init, load, reload, 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:
initialize
in interfaceLoginModule
-
login
public boolean login() throws LoginException
- Specified by:
login
in interfaceLoginModule
- Throws:
LoginException
-
commit
public boolean commit() throws LoginException
- Specified by:
commit
in interfaceLoginModule
- Throws:
LoginException
-
abort
public boolean abort() throws LoginException
- Specified by:
abort
in interfaceLoginModule
- Throws:
LoginException
-
logout
public boolean logout() throws LoginException
- Specified by:
logout
in 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
-
-