[java-idp-oidc] 02/03: Explicitly check that the metadata resolver returns the metadata for expected client

Codeberg noreply at shibboleth.net
Wed Nov 25 12:36:10 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-idp-oidc.

View the commit online:
https://codeberg.org/Shibboleth/java-idp-oidc/commit/91b815340e25793912ad93b554432789354347eb

commit 91b815340e25793912ad93b554432789354347eb
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Wed Nov 25 14:01:34 2026 +0200

    Explicitly check that the metadata resolver returns the metadata for expected client
    
    WARN and ignore if it doesn't
---
 .../idp/plugin/oidc/op/profile/impl/OIDCMetadataLookupHandler.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/OIDCMetadataLookupHandler.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/OIDCMetadataLookupHandler.java
index 23145bff..0c692a8b 100644
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/OIDCMetadataLookupHandler.java
+++ b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/OIDCMetadataLookupHandler.java
@@ -110,6 +110,11 @@ public class OIDCMetadataLookupHandler extends AbstractMessageHandler {
                 log.debug("{} No client information returned for {}", getLogPrefix(), clientId);
                 return;
             }
+            if (!clientId.equals(clientInformation.getID())) {
+                log.warn("{} Unmatching client_id {} in the resolved metadata {}", getLogPrefix(), clientId,
+                        clientInformation.getID());
+                return;
+            }
             final OIDCMetadataContext oidcCtx = new OIDCMetadataContext();
             oidcCtx.setClientInformation(clientInformation);
             messageContext.addSubcontext(oidcCtx);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list