[ 
https://issues.apache.org/jira/browse/OAK-11199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manfred Baedke resolved OAK-11199.
----------------------------------
    Resolution: Fixed

> Java 23: getSubject is supported only if a security manager is allowed
> ----------------------------------------------------------------------
>
>                 Key: OAK-11199
>                 URL: https://issues.apache.org/jira/browse/OAK-11199
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: security
>            Reporter: Thomas Mueller
>            Assignee: Manfred Baedke
>            Priority: Major
>              Labels: java23
>             Fix For: 1.74.0
>
>
> I tried compiling Oak with a recent JDK (kind of by mistake):
> {noformat}
> java --version
> openjdk 23 2024-09-17
> OpenJDK Runtime Environment Homebrew (build 23)
> OpenJDK 64-Bit Server VM Homebrew (build 23, mixed mode, sharing)
> {noformat}
> And then got the following errors in oak-core:
> {noformat}
> [ERROR] 
> testRepositoryPermissionIsNotGrantedOR(org.apache.jackrabbit.oak.security.authorization.composite.CompositeProviderNoScopeReverseTest)
>   Time elapsed: 0.019 s  <<< ERROR!
> java.lang.UnsupportedOperationException: getSubject is supported only if a 
> security manager is allowed
>       at java.base/javax.security.auth.Subject.getSubject(Subject.java:347)
>       at 
> org.apache.jackrabbit.oak.security.authentication.LoginContextProviderImpl.getSubject(LoginContextProviderImpl.java:97)
>       at 
> org.apache.jackrabbit.oak.security.authentication.LoginContextProviderImpl.getLoginContext(LoginContextProviderImpl.java:79)
>       at 
> org.apache.jackrabbit.oak.core.ContentRepositoryImpl.login(ContentRepositoryImpl.java:169)
>       at 
> org.apache.jackrabbit.oak.AbstractSecurityTest.createAdminSession(AbstractSecurityTest.java:186)
>       at 
> org.apache.jackrabbit.oak.AbstractSecurityTest.before(AbstractSecurityTest.java:116)
>       at 
> org.apache.jackrabbit.oak.security.authorization.composite.AbstractCompositeProviderTest.before(AbstractCompositeProviderTest.java:102)
>       at 
> org.apache.jackrabbit.oak.security.authorization.composite.CompositeProviderNoScopeTest.before(CompositeProviderNoScopeTest.java:74)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to