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

NPE when using custom policy in AuthorizationPolicy #1095

Closed
bohmber opened this issue Jul 9, 2024 · 1 comment · Fixed by #1096
Closed

NPE when using custom policy in AuthorizationPolicy #1095

bohmber opened this issue Jul 9, 2024 · 1 comment · Fixed by #1096
Labels

Comments

@bohmber
Copy link
Contributor

bohmber commented Jul 9, 2024

Current Behavior

When importing client with custom policy the import stops with a NPE

java.lang.NullPointerException: RESTEASY004645: templateValues entry was null org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.resolveTemplates(ClientWebTarget.java:170) org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.resolveTemplates(ClientWebTarget.java:26) org.jboss.resteasy.client.jaxrs.internal.proxy.SubResourceInvoker.invoke(SubResourceInvoker.java:59) org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:102) jdk.proxy2/jdk.proxy2.$Proxy104.policy(Unknown Source) de.adorsys.keycloak.config.repository.ClientRepository.updateAuthorizationPolicy(ClientRepository.java:246) de.adorsys.keycloak.config.service.ClientAuthorizationImportService.updateAuthorizationPolicy(ClientAuthorizationImportService.java:489) de.adorsys.keycloak.config.service.ClientAuthorizationImportService.createOrUpdateAuthorizationPolicy(ClientAuthorizationImportService.java:467) de.adorsys.keycloak.config.service.ClientAuthorizationImportService.createOrUpdateAuthorizationPolicies(ClientAuthorizationImportService.java:447) de.adorsys.keycloak.config.service.ClientAuthorizationImportService.updateAuthorization(ClientAuthorizationImportService.java:174) de.adorsys.keycloak.config.service.ClientAuthorizationImportService.updateClientAuthorizationSettings(ClientAuthorizationImportService.java:121) de.adorsys.keycloak.config.service.ClientAuthorizationImportService.doImport(ClientAuthorizationImportService.java:98)

Expected Behavior

Import without error.

Steps To Reproduce

There are no custom policies available in the keycloak-config-cli project hard to reproduce.

Environment

  • Keycloak Version: 25.0.1
  • keycloak-config-cli Version: v6.1.5
  • Java Version: 21

Anything else?

No response

@bohmber bohmber added the bug label Jul 9, 2024
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 9, 2024
…he list. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

Fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 9, 2024
…he list. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 9, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 9, 2024
…he list. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 9, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 9, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 11, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 11, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 11, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 11, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 12, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 12, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 12, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 12, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 12, 2024
…. Avoid problems with DEFAULT_MAX_RESULTS = 100 and custom policies

fixes adorsys#1095 adorsys#1090
@minanis
Copy link

minanis commented Aug 29, 2024

I have same issue,
but one point to add, if I tried to update the autherization settings of existing customer I got same error.
But if I tried to remove the client and import everything again (client with autherization settings) it works well.

I appritiate if there is a fix or even workaround soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

2 participants