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 PropertiesLoader
PropertiesLoader.FileNameKey -
Field Summary
Fields inherited from class PropertiesLoader
debug, LOGIN_CONFIG_SYS_PROP_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabort()booleancommit()voidinitialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) booleanlogin()booleanlogout()static voidMain method that could be used to encrypt given credentials for use in properties filesMethods inherited from class PropertiesLoader
booleanOption, init, load, load, reload, resetUsersAndGroupsCacheMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
initializein interfaceLoginModule
-
login
- Specified by:
loginin interfaceLoginModule- Throws:
LoginException
-
commit
- Specified by:
commitin interfaceLoginModule- Throws:
LoginException
-
abort
- Specified by:
abortin interfaceLoginModule- Throws:
LoginException
-
logout
- 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
-