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
Login modules that uses properties files similar to the
PropertiesLoginModule
. It can
either store the username-password in plain text or in an encrypted/hashed form. the
main(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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
abort()
boolean
commit()
void
initialize
(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) boolean
login()
boolean
logout()
static void
Main method that could be used to encrypt given credentials for use in properties filesMethods inherited from class org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoader
booleanOption, init, load, 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
-
Constructor Details
-
SCRAMPropertiesLoginModule
public SCRAMPropertiesLoginModule()
-
-
Method Details
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) - Specified by:
initialize
in interfaceLoginModule
-
login
- Specified by:
login
in interfaceLoginModule
- Throws:
LoginException
-
commit
- Specified by:
commit
in interfaceLoginModule
- Throws:
LoginException
-
abort
- Specified by:
abort
in interfaceLoginModule
- Throws:
LoginException
-
logout
- 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
-