javax.security.auth.login.LoginException: unable to find LoginModule class in AEM 6.3
Hi team ,
Recently we have upgraded AEM 6.0 to AEM 6.3 , where we have JAAS module configured to generate token for authentication.
Step 1: After starting the server in AEM 6.3 , we get below error when we replicate something.
09.11.2018 07:41:43.424 *WARN* [sling-threadpool-cb90f54b-e9a7-47b5-a011-36ec26f9ae1f-(apache-sling-job-thread-pool)-3-com_day_cq_replication_job_rep-ny-dev-2(com/day/cq/replication/job/rep-ny-dev-2)] org.apache.felix.jaas No JAAS module configured for realm "XXX09.11.2018 07:41:43.425 *ERROR* [sling-threadpool-cb90f54b-e9a7-47b5-a011-36ec26f9ae1f-(apache-sling-job-thread-pool)-3-com_day_cq_replication_job_rep-ny-dev-2(com/day/cq/replication/job/rep-ny-dev-2)] ***.***.*** Failed to generate new token
javax.security.auth.login.LoginException: unable to find LoginModule class: aa.bb.cc
Step 2: Whenever after restart we manually do test connection , than replication start working as if has loaded the login module
- 09.11.2018 07:42:06.957 *INFO* [ [1541767326884] GET /etc/replication/agents.author/rep-ny-dev-1.test.html HTTP/1.1] LoginModule Initializing...
- 09.11.2018 07:42:06.957 *INFO* [ [1541767326884] GET /etc/replication/agents.author/rep-ny-dev-1.test.html HTTP/1.1] LoginModule System property from aa.properties
- 09.11.2018 07:42:06.960 *INFO* [ [1541767326884] GET /etc/replication/agents.author/rep-ny-dev-1.test.html HTTP/1.1] LoginModule Reading login properties from [aa.properties]
- 09.11.2018 07:42:06.963 *INFO* [ [1541767326884] GET /etc/replication/agents.author/rep-ny-dev-1.test.html HTTP/1.1] LoginModule Initialisation complete...
Any pointer will be helpful , thanks in Advance.
Just like to share more information so that can be useful to trouble shoot.
In Aem 6.0 , we didn't have any problem with jaas configuration.
We used to place all the bundle in install folder for installation of bundles.
But after upgrade to AEM 6.3 , we have change this approach to package manager for installation.
Below is the log(related to jaas configuration) which appear in AEM 6.3 which wasn't available in AEM 6.0 after starting the server
- 12.11.2018 09:05:44.440 *INFO* [FelixStartLevel] org.apache.felix.jaas Registered provider FelixJaasProvider for managing JAAS config with type JavaLoginConfig
- 12.11.2018 09:05:44.442 *INFO* [FelixStartLevel] org.apache.felix.jaas Service [org.apache.felix.jaas.ConfigurationSpi,134, [org.osgi.service.cm.ManagedService]] ServiceEvent REGISTERED
- 12.11.2018 09:05:44.442 *INFO* [FelixStartLevel] org.apache.felix.jaas Service [135, [org.apache.felix.jaas.LoginContextFactory]] ServiceEvent REGISTERED
- 12.11.2018 09:05:44.443 *INFO* [CM Configuration Updater (ManagedService Update: pid=[org.apache.felix.jaas.ConfigurationSpi])] org.apache.felix.jaas Removed provider FelixJaasProvider type JavaLoginConfig from Security providers list
- 12.11.2018 09:05:44.443 *INFO* [CM Configuration Updater (ManagedService Update: pid=[org.apache.felix.jaas.ConfigurationSpi])] org.apache.felix.jaas Registered provider FelixJaasProvider for managing JAAS config with type JavaLoginConfig
- 12.11.2018 09:05:44.444 *INFO* [CM Configuration Updater (ManagedService Update: pid=[org.apache.felix.jaas.ConfigurationSpi])] org.apache.felix.jaas Replacing the global JAAS configuration with OSGi based proxy configuration. It would look first in the OSGi based configuration and if not found would use the default global configuration