Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP JWT 1.2 fails to load all relevant MP Config properties #19627

Closed
ayoho opened this issue Dec 13, 2021 · 0 comments
Closed

MP JWT 1.2 fails to load all relevant MP Config properties #19627

ayoho opened this issue Dec 13, 2021 · 0 comments
Assignees
Labels
release bug This bug is present in a released version of Open Liberty release:22004 team:Security SSO

Comments

@ayoho
Copy link
Member

ayoho commented Dec 13, 2021

Describe the bug
The mpJwt-1.2 feature might fail to load MP Config properties related to MicroProfile JWT 1.2. The MP JWT feature uses an OSGi service (MpConfigProxyService) to load MP Config properties related to the feature. There are currently implementation classes for two versions of that service - 1.1 and 1.2 - that load the MP Config properties specific to each respective MP JWT release. It's possible for the 1.1 version of the service to be activated and set as the service to use in the MicroProfileJwtTAI class before the 1.2 version of the service is activated. That can cause the MP JWT feature to ignore any MP Config properties specific to MP JWT 1.2.

Example log:

[12/9/21 16:04:34:850 GMT] 00000019 id=00000000 .ws.security.mp.jwt.v11.config.impl.MpConfigProxyServiceImpl I CWWKS5775I: The MicroProfile JWT version 1.1 mpConfigProxy processed successfully.
...
[12/9/21 16:04:38:674 GMT] 00000017 id=00000000 com.ibm.ws.security.mp.jwt.config.MpConfigUtil              > <init> Entry 
                                                                                                              AtomicServiceReference[name=mpJwtExtensionService,ctx=null,ref=null,svc=null]
[12/9/21 16:04:38:674 GMT] 00000017 id=18b5bc0f com.ibm.ws.security.mp.jwt.config.MpConfigUtil              < <init> Exit 
                                                                                                              com.ibm.ws.security.mp.jwt.config.MpConfigUtil@18b5bc0f
...
[12/9/21 16:04:38:685 GMT] 00000018 id=00000000 rty.security.mp.jwt.v12.config.impl.MpConfigProxyServiceImpl I CWWKS5780I: The MicroProfile JWT version 1.2 mpConfigProxy processed successfully.
...
[12/9/21 16:04:57:387 GMT] 00000024 id=18b5bc0f com.ibm.ws.security.mp.jwt.config.MpConfigUtil               > getMpConfigMap Entry  
                                                                                                               com.ibm.ws.security.mp.jwt.v11.config.impl.MpConfigProxyServiceImpl@1993dbf5
                                                                                                               com.ibm.ws.classloading.internal.ThreadContextClassLoader@7b3a6eed
                                                                                                               {}
[12/9/21 16:04:57:387 GMT] 00000024 id=1993dbf5 .ws.security.mp.jwt.v11.config.impl.MpConfigProxyServiceImpl > getSupportedConfigPropertyNames Entry 
[12/9/21 16:04:57:387 GMT] 00000024 id=1993dbf5 .ws.security.mp.jwt.v11.config.impl.MpConfigProxyServiceImpl < getSupportedConfigPropertyNames Exit  
                                                                                                               [mp.jwt.verify.publickey, mp.jwt.verify.issuer, mp.jwt.verify.publickey.location]

Steps to Reproduce
No clear and easy steps to reproduce.

Expected behavior
The MP Config properties for the MP JWT feature version in use should be loaded correctly.

Diagnostic information:

  • OpenLiberty Version: 20.0.0.10 and above
  • Affected feature(s): mpJwt-1.2
@ayoho ayoho added team:Security SSO release bug This bug is present in a released version of Open Liberty labels Dec 13, 2021
@ayoho ayoho self-assigned this Dec 13, 2021
@ayoho ayoho added this to In Progress in Security SSO Jan 10, 2022
ayoho added a commit to ayoho/open-liberty that referenced this issue Feb 23, 2022
@ayoho ayoho closed this as completed Mar 10, 2022
Security SSO automation moved this from In Progress to Done Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:22004 team:Security SSO
Projects
Status: Done
Security SSO
  
Done
Development

No branches or pull requests

2 participants