Hello, It has taken me some time (weeks!) but I think I've found the solution to the problem:
1. Added "org.apache.felix.jaas.boot" to "org.osgi.framework.bootdelegation". 2. Added "-Xbootclasspath/a:/opt/sling/artifacts/org/apache/felix/org.apache.felix.jaas/1.0.2/org.apache.felix.jaas-1.0.2.jar" to the JVM arguments. And the null context class loader was apparently not the sign of an issue, from what I read about OSGi, but also as seen in practice: > [LoginContext]: Build ServiceProviders cache for ClassLoader: null > [LoginContext]: Discovered ServiceProviders for ClassLoader: null > java.util.ServiceLoader$ProviderImpl@5a0e195d > [LoginContext]: org.apache.felix.jaas.boot.ProxyLoginModule loaded via > reflection > Why this bit of configuration was not necessary for the full Sling distribution to work, I have no idea. If someone knows and can enlighten me, I'd be curious. Regards, On Sun, Dec 25, 2022 at 1:52 PM Damiano Albani <damiano.alb...@gmail.com> wrote: > Hello, > > By the way, when running the JVM with: > >> -Djava.security.debug=logincontext >> > I get the following in the logs: > >> [LoginContext]: Build ServiceProviders cache for ClassLoader: null >> 2022-12-25T12:44:12.098782749Z [LoginContext]: Discovered >> ServiceProviders for ClassLoader: null >> 2022-12-25T12:44:12.099238285Z >> java.util.ServiceLoader$ProviderImpl@aa8a886e >> 2022-12-25T12:44:12.099896168Z [LoginContext]: login OPTIONAL failure >> 2022-12-25T12:44:12.100246110Z [LoginContext]: login OPTIONAL failure >> 2022-12-25T12:44:12.100525812Z [LoginContext]: login REQUIRED failure >> 2022-12-25T12:44:12.100869944Z [LoginContext]: login REQUIRED failure >> 2022-12-25T12:44:12.101177253Z [LoginContext]: abort OPTIONAL failure >> 2022-12-25T12:44:12.101655572Z [LoginContext]: abort OPTIONAL failure >> 2022-12-25T12:44:12.101914557Z [LoginContext]: abort REQUIRED failure >> 2022-12-25T12:44:12.102136095Z [LoginContext]: abort REQUIRED failure >> > > And this is how the context class loader is initialized in > *javax.security.auth.login.LoginContext*: > >> contextClassLoader = java.security.AccessController.doPrivileged >> (new java.security.PrivilegedAction<ClassLoader>() { >> public ClassLoader run() { >> ClassLoader loader = >> >> Thread.currentThread().getContextClassLoader(); >> if (loader == null) { >> // Don't use bootstrap class loader directly to >> ensure >> // proper package access control! >> loader = ClassLoader.getSystemClassLoader(); >> } >> >> return loader; >> } >> }); >> > > Yet, this method returns *null* apparently, as seen in the logs above. > So, could the issue be class loader related?? > > Regards, > > On Thu, Dec 22, 2022 at 5:01 PM Damiano Albani <damiano.alb...@gmail.com> > wrote: > >> Hi Robert, >> >> Yes, sure, this is the whole configuration: >> https://gist.github.com/dalbani/b9e8e10e8a61499f7e56900c858e15b2. >> Thanks! >> >> Regards, >> >> On Thu, Dec 22, 2022 at 1:49 PM Robert Munteanu <romb...@apache.org> >> wrote: >> >>> On Tue, 2022-12-20 at 16:06 +0100, Damiano Albani wrote: >>> > Hi, >>> > >>> > I just picked up my effort to use (a trimmed down flavor of) Sling >>> > Starter >>> > to deploy Oak *only*. >>> > I'm running into this issue when code tries to log into the JCR >>> > repository: >>> > >>> > > javax.security.auth.login.LoginException: No LoginModule found for >>> > > org.apache.felix.jaas.boot.ProxyLoginModule >>> >>> (snip) >>> >>> Is there any chance that you could post your feature model definitions >>> somewhere? I don't see anything obviously wrong in your setup, and >>> running it myself might help. >>> >>> Thanks, >>> Robert >>> >> >> >> -- >> Damiano Albani >> > > > -- > Damiano Albani > -- Damiano Albani