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:
javax.security.auth.spi.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(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,?> sharedState, java.util.Map<java.lang.String,?> options)booleanlogin()booleanlogout()static voidmain(java.lang.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(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,?> sharedState, java.util.Map<java.lang.String,?> options)- Specified by:
initializein interfacejavax.security.auth.spi.LoginModule
-
login
public boolean login() throws javax.security.auth.login.LoginException- Specified by:
loginin interfacejavax.security.auth.spi.LoginModule- Throws:
javax.security.auth.login.LoginException
-
commit
public boolean commit() throws javax.security.auth.login.LoginException- Specified by:
commitin interfacejavax.security.auth.spi.LoginModule- Throws:
javax.security.auth.login.LoginException
-
abort
public boolean abort() throws javax.security.auth.login.LoginException- Specified by:
abortin interfacejavax.security.auth.spi.LoginModule- Throws:
javax.security.auth.login.LoginException
-
logout
public boolean logout() throws javax.security.auth.login.LoginException- Specified by:
logoutin interfacejavax.security.auth.spi.LoginModule- Throws:
javax.security.auth.login.LoginException
-
main
public static void main(java.lang.String[] args) throws java.security.GeneralSecurityException, ScramException, StringPrep.StringPrepError, java.io.IOExceptionMain method that could be used to encrypt given credentials for use in properties files- Parameters:
args- username password type [iterations]- Throws:
java.security.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 StringPrepjava.io.IOException- if writing as properties failed
-
-