[java-idp-plugin-oidc-rp] branch main updated: Improve logging

Phil Smart philip.smart at jisc.ac.uk
Fri Nov 17 14:41:59 UTC 2023


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

philsmart pushed a commit to branch main
in repository java-idp-plugin-oidc-rp.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-oidc-rp.git;a=commit;h=669e281e8ca902674bb2425115bc1ec10859c9e5

The following commit(s) were added to refs/heads/main by this push:
     new 669e281  Improve logging
669e281 is described below

commit 669e281e8ca902674bb2425115bc1ec10859c9e5
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Nov 17 14:41:48 2023 +0000

    Improve logging
---
 .../logic/JWTBearerTokenForClientAuthenticationPredicate.java |  2 +-
 .../rp/impl/SimpleOIDCSubjectIdentifierCanonicalization.java  | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/JWTBearerTokenForClientAuthenticationPredicate.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/JWTBearerTokenForClientAuthenticationPredicate.java
index 4a1d715..a33be8e 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/JWTBearerTokenForClientAuthenticationPredicate.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/JWTBearerTokenForClientAuthenticationPredicate.java
@@ -55,7 +55,7 @@ public class JWTBearerTokenForClientAuthenticationPredicate extends AbstractRely
                 final ClientAuthenticationMethod method = new ClientAuthenticationMethod(authMethod);
                 if (method.equals(ClientAuthenticationMethod.CLIENT_SECRET_JWT) || 
                         method.equals(ClientAuthenticationMethod.PRIVATE_KEY_JWT)) {
-                   
+                    log.trace("Client authentication type requires key lookup, is '{}", method);
                     return true;
                 } else {
                     log.trace("Configured client authentication method '{}' does not require a signed JWT bearer token"
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/SimpleOIDCSubjectIdentifierCanonicalization.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/SimpleOIDCSubjectIdentifierCanonicalization.java
index 1e4e64c..6bef924 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/SimpleOIDCSubjectIdentifierCanonicalization.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/SimpleOIDCSubjectIdentifierCanonicalization.java
@@ -87,6 +87,9 @@ public class SimpleOIDCSubjectIdentifierCanonicalization extends AbstractSubject
     /** A predicate that determines if this action can run or not. */
     public static class ActivationCondition implements Predicate<ProfileRequestContext> {
         
+        /** Class logger. */
+        @Nonnull private final Logger log = LoggerFactory.getLogger(ActivationCondition.class);
+        
         /** Disable this C14N no matter how appropriate the context?*/
         private final boolean disabled;
         
@@ -104,16 +107,20 @@ public class SimpleOIDCSubjectIdentifierCanonicalization extends AbstractSubject
         @Override
         public boolean test(@Nullable final ProfileRequestContext input) {
             if (disabled) {
+                log.trace("SimpleOIDCSubjectIdentifierCanonicalization has been disabled by configuration");
                 return false;
             }
             if (input != null) {
                 final SubjectCanonicalizationContext c14nContext =
                         input.getSubcontext(SubjectCanonicalizationContext.class);
                 if (c14nContext != null) {
-                    return apply(input, c14nContext, false);
+                    final boolean shouldRun = apply(input, c14nContext, false);
+                    log.trace("SimpleOIDCSubjectIdentifierCanonicalization is {} for the given context", 
+                            shouldRun ? "active" : "not active");
+                    return shouldRun;
                 }
             }
-            
+            log.trace("SimpleOIDCSubjectIdentifierCanonicalization is not active for the given context");
             return false;
         }
 

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


More information about the commits mailing list