pac4j cannot find matching kid

10 views
Skip to first unread message

Vivek P.Netha

unread,
Jun 29, 2026, 12:18:51 PMJun 29
to druid...@googlegroups.com
Hi we are on Druid version 33. Trying to setup SSO with Microsoft Entra ID using Pac4j. Getting this exception below.

HTTP ERROR 500 org.pac4j.core.exception.TechnicalException: com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) foundURI:/druid-ext/druid-pac4j/callbackSTATUS:500MESSAGE:org.pac4j.core.exception.TechnicalException: com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) foundSERVLET:org.eclipse.jetty.servlet.DefaultServlet-41bdaa81CAUSED BY:org.pac4j.core.exception.TechnicalException: com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) foundCAUSED BY:com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) found  

With some Copilot analysis, this appears to be the root cause:
  • Token kid (****) missing from default JWKS
  • Entra app appears configured with app-specific tenant-scoped signing keys
  • Token signed by /{tenant}/discovery/keys?appid={client_id}, while pac4j validates against /common/discovery/keys from discovery doc
  • Result: pac4j cannot find matching kid → BadJOSEException

Any ideas on how to resolve this?

Thanks.
Reply all
Reply to author
Forward
0 new messages