-
Hi all, I've created a custom Login Module that inherits from TextFileCertificateLoginModule because I wanted to add it some custom logics. This new Login Module uses same properties file defined by the parent module where I defined user and roles e.g
I would like to install it into Artemis and apply security-settings with this value
What I've done till now is to create a custom init image containing the custom JAAS module and related property files and I think I have to define an ActiveMQArtemisSecurity CR to define the previous settings. Looking at ActiveMQArtemisSecurity CRD definition It seems that Login Module that can be used are fixed e.g. guestLoginModules, keycloakLoginModules, propertiesLoginModules and so on. Am I wrong can you please suggest me the right approach for this use case? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Yes the security CR only support fixed types of login modules. I think for your case you can use broker.properties in the CR to define the security settings. For your custom login module you may take a look at the jaas login configmap to configure it. |
Beta Was this translation helpful? Give feedback.
-
@brusdev just another question related to my first one at the beginning of the discussion: to configure the custom JAAS module I've created a ConfigMap following the naming convention supported by the Operator e.g. defining a configmap's name with a suffix equal to "-jaas-config". apiVersion: v1
kind: ConfigMap
metadata:
name: test-jaas-config
data:
login.config: |
activemq {
com.test.activemq.artemis.plugins.security.jaas.LogLoginModule sufficient
debug=true;
}; My custom JAAS module now needs three property files let's name them: prop1.properties, prop2.properties, prop3.properties. apiVersion: v1
kind: ConfigMap
metadata:
name: test-jaas-config
data:
login.config: |
activemq {
com.test.activemq.artemis.plugins.security.jaas.LogLoginModule sufficient
com.test.activemq.artemis.plugins.security.jaas.prop1=prop1.properties
com.test.activemq.artemis.plugins.security.jaas.prop2=prop2.properties
com.test.activemq.artemis.plugins.security.jaas.prop3=prop3.properties
debug=true;
};
prop1.properties: |
prop1a=value1a
prop1b=value1b
prop2.properties: |
prop2a=value2a
prop2b=value2b
prop3.properties: |
prop3a=value3a
prop3b=value3b or if I can create another configmap along with the JAAS config one containing all three property files content. |
Beta Was this translation helpful? Give feedback.
Yes the security CR only support fixed types of login modules. I think for your case you can use broker.properties in the CR to define the security settings. For your custom login module you may take a look at the jaas login configmap to configure it.
take a look at this
https://github.com/artemiscloud/activemq-artemis-operator/issues/356