[java-idp-plugin-oidc-rp] branch main updated: Improve log statements and logging levels

Phil Smart philip.smart at jisc.ac.uk
Tue Jan 3 14:40:21 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=b9ad66182c91ac15748fcfbced5cf4c84b65d6bf

The following commit(s) were added to refs/heads/main by this push:
     new b9ad661  Improve log statements and logging levels
b9ad661 is described below

commit b9ad66182c91ac15748fcfbced5cf4c84b65d6bf
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Tue Jan 3 14:40:18 2023 +0000

    Improve log statements and logging levels
---
 .../rp/decoding/impl/DefaultUserInfoResponseDecoder.java    |  4 ++--
 .../plugin/authn/oidc/rp/impl/AuthorizationController.java  |  3 ++-
 .../authn/oidc/rp/impl/ExchangeCodeForAccessToken.java      |  2 +-
 .../authn/oidc/rp/impl/InitializeRelyingPartyContext.java   |  2 +-
 .../oidc/rp/impl/PrepareOIDCInboundMessageContext.java      |  2 +-
 .../idp/plugin/authn/oidc/rp/impl/ProcessEndUserClaims.java |  2 +-
 .../plugin/authn/oidc/rp/impl/UserInfoEndpointLookup.java   |  2 +-
 .../idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java  |  6 +++---
 .../AddAuthenticationContextClassReferencesHandler.java     |  6 ++----
 .../authn/oidc/rp/messaging/impl/AddEndpointURIHandler.java |  4 ++--
 .../messaging/impl/AddForceAuthenticationPromptHandler.java |  6 ++----
 .../authn/oidc/rp/messaging/impl/AddNonceHandler.java       |  4 ++--
 .../oidc/rp/messaging/impl/AddRequestedClaimsHandler.java   |  3 +--
 .../rp/messaging/impl/AddResponseTypeAndModeHandler.java    | 13 ++++++-------
 .../authn/oidc/rp/messaging/impl/AddScopesHandler.java      |  4 ++--
 .../authn/oidc/rp/messaging/impl/EncryptJWTHandler.java     |  4 ++--
 .../plugin/authn/oidc/rp/messaging/impl/SignJWTHandler.java | 13 ++++++-------
 17 files changed, 37 insertions(+), 43 deletions(-)

diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/decoding/impl/DefaultUserInfoResponseDecoder.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/decoding/impl/DefaultUserInfoResponseDecoder.java
index f66bd4a..ddeb3ad 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/decoding/impl/DefaultUserInfoResponseDecoder.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/decoding/impl/DefaultUserInfoResponseDecoder.java
@@ -107,8 +107,8 @@ public class DefaultUserInfoResponseDecoder extends AbstractJSONResponseDecoderF
                 // a concern as parsing a JWT type as a plain object.
                 final JWT parsedJwt = JWTParser.parse(content);
                 
-                if (log.isTraceEnabled()) {
-                    log.trace("UserInfo response decoder parsed an {} JWT type", 
+                if (log.isDebugEnabled()) {
+                    log.debug("UserInfo response decoder parsed an {} JWT type", 
                             parsedJwt instanceof SignedJWT ? "Signed" : 
                                 (parsedJwt instanceof EncryptedJWT ? "Encrypted" : "plain"));
                 }
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java
index b3e5b0b..ff3df3b 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java
@@ -204,7 +204,8 @@ public class AuthorizationController extends AbstractInitializableComponent {
             if (oidcContext.getOutboundMessageHandler() != null) {
                 oidcContext.getOutboundMessageHandler().invoke(nestedPRC.getOutboundMessageContext());            
             }
-            
+            log.debug("OIDC Relying Party Proxy executing message encoders to make upstream request "
+                    + "to OpenID Provider");
             oidcContext.getEncodeMessageAction().execute(nestedPRC);
             // Handle error added by the EncodeMessage action. 
             final EventContext eventCtx = nestedPRC.getSubcontext(EventContext.class);
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java
index 6859311..32bbb7a 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java
@@ -83,7 +83,7 @@ public class ExchangeCodeForAccessToken extends AbstractHttpOIDCAuthenticationAc
     @Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
             @Nonnull final AuthenticationContext authenticationContext) { 
         
-          log.debug("{} Exchanging auth_code '{}' for id_token from upstream OP '{}'", getLogPrefix(), 
+          log.debug("{} Exchanging auth_code '{}' for id_token from provider '{}'", getLogPrefix(), 
                   getAuthenticationResponse().getAuthorizationCode(),
                   authenticationContext.getAuthenticatingAuthority());
           
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java
index 93d9289..6b835d1 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java
@@ -150,7 +150,7 @@ public class InitializeRelyingPartyContext extends AbstractProfileAction {
             ActionSupport.buildEvent(profileRequestContext, IdPEventIds.INVALID_RELYING_PARTY_CTX);
             return;
         }
-        log.debug("Attaching RelyingPartyContext for OP {}", peerEntityCtx.getIdentifier());
+        log.debug("Attaching RelyingPartyContext for OP '{}'", peerEntityCtx.getIdentifier());
         rpContext.setRelyingPartyId(peerEntityCtx.getIdentifier());
         rpContext.setRelyingPartyIdContextTree(peerEntityCtx);
         final OIDCProviderMetadataContext oidcContext = 
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/PrepareOIDCInboundMessageContext.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/PrepareOIDCInboundMessageContext.java
index fd30a30..ac23952 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/PrepareOIDCInboundMessageContext.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/PrepareOIDCInboundMessageContext.java
@@ -152,7 +152,7 @@ public class PrepareOIDCInboundMessageContext extends AbstractProfileAction {
         final OIDCPeerEntityContext peerContext = msgCtx.getSubcontext(OIDCPeerEntityContext.class, true);
         peerContext.setIdentifier(identifier);
 
-        log.debug("{} Initialized inbound context for message to {}", getLogPrefix(), identifier);
+        log.debug("{} Initialized inbound context for OIDC authentication message to {}", getLogPrefix(), identifier);
     }
 
 }
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ProcessEndUserClaims.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ProcessEndUserClaims.java
index bbcbdb9..2b04d9e 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ProcessEndUserClaims.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ProcessEndUserClaims.java
@@ -244,7 +244,7 @@ public class ProcessEndUserClaims extends AbstractOIDCAuthenticationResponseActi
         
           if (log.isTraceEnabled()) {
               log.trace("{} Processing {} claims", getLogPrefix(),
-                      userInfoClaims.toJSONObject().size() > 0 ? "UserInfo and id_token" : "id_token");
+                      userInfoClaims.toJSONObject().size() > 0 ? "UserInfo and ID Token" : "ID Token");
           }
           
           final ClaimsSet idToken = new ClaimsSet();
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UserInfoEndpointLookup.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UserInfoEndpointLookup.java
index 74a9cc4..d6d36e2 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UserInfoEndpointLookup.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UserInfoEndpointLookup.java
@@ -80,7 +80,7 @@ public class UserInfoEndpointLookup extends AbstractHttpOIDCAuthenticationAction
     @Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
             @Nonnull final AuthenticationContext authenticationContext) { 
         
-          log.debug("{} Requesting claims from UserInfo endpoint from upstream OP '{}'", getLogPrefix(), 
+          log.debug("{} Requesting claims from UserInfo endpoint from provider '{}'", getLogPrefix(), 
                   authenticationContext.getAuthenticatingAuthority());
           
           final UserInfoResponseContext userInfoCtx = 
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java
index 3f7acd9..8242787 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java
@@ -154,8 +154,8 @@ public class ValidateTokenClaims extends AbstractOIDCAuthenticationResponseActio
     protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
             @Nonnull final AuthenticationContext authenticationContext) {
 
-        log.debug("{} Validating JWT claims for subject '{}'",getLogPrefix(),
-                claimsSet.getSubject() != null ? claimsSet.getSubject() : "unknown subject");
+        final String subject = claimsSet.getSubject() != null ? claimsSet.getSubject() : "unknown subject";
+        log.debug("{} Validating JWT claims for subject '{}'",getLogPrefix(), subject);
          
         try {
             claimsValidator.validate(claimsSet,profileRequestContext);
@@ -163,7 +163,7 @@ public class ValidateTokenClaims extends AbstractOIDCAuthenticationResponseActio
                 cleanupHook.accept(profileRequestContext);
             }
         } catch (final JWTValidationException e) {
-            log.error("{} JWT verification failed for subject '{}'", getLogPrefix(),claimsSet.getSubject(),e);
+            log.error("{} JWT claims verification failed for subject '{}'", getLogPrefix(), subject, e);
             ActionSupport.buildEvent(profileRequestContext, OidcEventIds.INVALID_TOKEN);
             if (cleanupHook != null) {
                 cleanupHook.accept(profileRequestContext);
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java
index 5600356..bf8a893 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java
@@ -50,12 +50,10 @@ public class AddAuthenticationContextClassReferencesHandler
         
         final List<ACR> acrs = buildRequestedAuthnContext(lookupProfileRequestContext(messageContext));  
         if (acrs != null) {
-            log.debug("{} setting ACRs to '{}' for client '{}'", getLogPrefix(), acrs,
-                    getAuthenticationRequest().getClientID());
+            log.trace("{} setting ACRs to '{}' ", getLogPrefix(), acrs);
             getAuthenticationRequest().setAcrs(acrs);
         } else {
-            log.debug("{} no ACRs requested for client '{}'", getLogPrefix(), 
-                    getAuthenticationRequest().getClientID());
+            log.trace("{} no ACRs requested", getLogPrefix());
         }
     }
     
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddEndpointURIHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddEndpointURIHandler.java
index e95b271..d875899 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddEndpointURIHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddEndpointURIHandler.java
@@ -42,7 +42,7 @@ public class AddEndpointURIHandler extends AbstractOIDCAuthenticationRequestActi
         }
         
         getAuthenticationRequest().setEndpointURI(getProviderMetadata().getAuthorizationEndpointURI());
-        log.trace("{} Added authorization endpoint '{}' to authentication request for client '{}'",getLogPrefix(),
-                getAuthenticationRequest().getEndpointURI(), getAuthenticationRequest().getClientID());
+        log.trace("{} Added authorization endpoint '{}' to authentication request",getLogPrefix(),
+                getAuthenticationRequest().getEndpointURI());
     }
 }
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddForceAuthenticationPromptHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddForceAuthenticationPromptHandler.java
index 87fefdd..1078165 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddForceAuthenticationPromptHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddForceAuthenticationPromptHandler.java
@@ -40,8 +40,7 @@ public class AddForceAuthenticationPromptHandler extends AbstractOIDCAuthenticat
             throws MessageHandlerException {
         
         if (getProfileConfiguration().isForceAuthn(lookupProfileRequestContext(messageContext))) {
-            log.debug("{} Setting prompt=login (ForceAuthn) for OIDC AuthnRequest for client '{}'", getLogPrefix(),
-                    getAuthenticationRequest().getClientID());
+            log.trace("{} Setting prompt=login (ForceAuthn) for OIDC AuthnRequest", getLogPrefix());
             try {
                 getAuthenticationRequest().setPrompt(Prompt.parse(Prompt.Type.LOGIN.toString()));
             } catch (final ParseException e) {
@@ -49,8 +48,7 @@ public class AddForceAuthenticationPromptHandler extends AbstractOIDCAuthenticat
                 throw new MessageHandlerException("Unable to honour force-authn, setting prompt to 'login' failed", e);
             }
         } else {
-            log.debug("{} No ForceAuthn requirement, so no prompt set for client '{}'", getLogPrefix(),
-                    getAuthenticationRequest().getClientID());
+            log.trace("{} No ForceAuthn requirement, so no prompt set", getLogPrefix());
         }
     }
     
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddNonceHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddNonceHandler.java
index af40a5c..3e107ab 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddNonceHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddNonceHandler.java
@@ -70,8 +70,8 @@ public class AddNonceHandler extends AbstractOIDCAuthenticationRequestActionMess
         getAuthenticationRequest().setNonce(
                 nonceGenerationStrategy.apply(lookupProfileRequestContext(messageContext)));
         
-        log.debug("{} Added nonce '{}' to authentication request for client '{}'",getLogPrefix(),
-                getAuthenticationRequest().getNonce(), getAuthenticationRequest().getClientID());
+        log.trace("{} Added nonce '{}' to authentication request",getLogPrefix(),
+                getAuthenticationRequest().getNonce());
     }
     
     
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddRequestedClaimsHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddRequestedClaimsHandler.java
index 21dc7d8..4ff01ac 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddRequestedClaimsHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddRequestedClaimsHandler.java
@@ -83,8 +83,7 @@ public class AddRequestedClaimsHandler extends AbstractOIDCAuthenticationRequest
                 requestedClaimsHook.apply(lookupProfileRequestContext(messageContext));
         if (requestedClaims != null) {
             getAuthenticationRequest().setRequestedClaims(requestedClaims);
-            log.trace("{} Added requested claims '{}' to the authentication request for client '{}'",getLogPrefix(),
-                    requestedClaims, getAuthenticationRequest().getClientID());
+            log.trace("{} Added requested claims '{}' to the authentication request",getLogPrefix(), requestedClaims);
         } else {
             log.trace("{} No individual claims requested", getLogPrefix());
         }
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddResponseTypeAndModeHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddResponseTypeAndModeHandler.java
index 0a8091a..193f723 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddResponseTypeAndModeHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddResponseTypeAndModeHandler.java
@@ -50,7 +50,7 @@ public class AddResponseTypeAndModeHandler extends AbstractOIDCAuthenticationReq
                 getProfileConfiguration().getResponseType(lookupProfileRequestContext(messageContext)); 
         final ResponseType responseType = parseResponseType(responseTypeFromProfile);
         if (responseType == null){
-            throw new MessageHandlerException("Response_type '"+responseTypeFromProfile+"' is not supported");
+            throw new MessageHandlerException("response_type '"+responseTypeFromProfile+"' is not supported");
         }
        
         final String responseModeFromProfile = 
@@ -58,15 +58,14 @@ public class AddResponseTypeAndModeHandler extends AbstractOIDCAuthenticationReq
         final ResponseMode responseModeOverride = parseResponseMode(responseModeFromProfile);
                 
         final ResponseMode compatibleMode = ResponseMode.resolve(null, responseType);
-        log.trace("{} Compatible response mode '{}' resolved from response type '{}'", getLogPrefix(), compatibleMode, 
+        log.trace("{} Compatible response_mode '{}' resolved from response_type '{}'", getLogPrefix(), compatibleMode, 
                 responseTypeFromProfile);    
         getAuthenticationRequest().setDefaultResponseMode(compatibleMode);
             
         if (responseModeOverride != null && !responseModeOverride.equals(compatibleMode)) {
-            log.debug("{} Response_mode override '{}' exists in the profile configuration and is different than the"
+            log.debug("{} response_mode override '{}' exists in the profile configuration and is different than the"
                     + " default mode '{}' for response_type '{}'",
-                    getLogPrefix(), responseModeFromProfile, compatibleMode, responseType);
-            
+                    getLogPrefix(), responseModeFromProfile, compatibleMode, responseType);            
             getAuthenticationRequest().setResponseMode(responseModeOverride);
             
         } else {
@@ -74,8 +73,8 @@ public class AddResponseTypeAndModeHandler extends AbstractOIDCAuthenticationReq
         }
         
         getAuthenticationRequest().setResponseType(responseType); 
-        log.debug("{} Response_type '{}' selected", getLogPrefix(), getAuthenticationRequest().getResponseType());
-        log.debug("{} Response_mode '{}' selected", getLogPrefix(), getAuthenticationRequest().getResponseMode());
+        log.trace("{} response_type '{}' selected", getLogPrefix(), getAuthenticationRequest().getResponseType());
+        log.trace("{} response_mode '{}' selected", getLogPrefix(), getAuthenticationRequest().getResponseMode());
             
     }
     
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddScopesHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddScopesHandler.java
index c6fb212..3cc5b9a 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddScopesHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddScopesHandler.java
@@ -42,8 +42,8 @@ public class AddScopesHandler extends AbstractOIDCAuthenticationRequestActionMes
         if (scopes != null && !scopes.isEmpty()) {
             scopes.forEach(s -> getAuthenticationRequest().getScope().add(s));
         }
-        log.trace("{} Added scopes '{}' to authentication request for client '{}'",getLogPrefix(),
-                getAuthenticationRequest().getScope(), getAuthenticationRequest().getClientID());
+        log.trace("{} Added scopes '{}' to authentication request",getLogPrefix(), 
+                getAuthenticationRequest().getScope());
     }
     
     
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/EncryptJWTHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/EncryptJWTHandler.java
index 8d0a452..392bef0 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/EncryptJWTHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/EncryptJWTHandler.java
@@ -164,7 +164,7 @@ public class EncryptJWTHandler extends AbstractMessageHandler {
         final JWTSecurityParametersContext secParamCtx = 
                 securityParametersLookupStrategy.apply(messageContext);
         if (secParamCtx == null) {
-            log.debug("{} Message context did not contain encryption parameters context, "
+            log.trace("{} Message context did not contain encryption parameters context, "
                     + "request object will not be encrypted", getLogPrefix());
             return false;
         }
@@ -198,7 +198,7 @@ public class EncryptJWTHandler extends AbstractMessageHandler {
         
         final Payload payload = payloadToEncryptLookupStrategy.apply(messageContext);
         if (payload == null) {
-            log.debug("{} No plain text source provided to encrypt", getLogPrefix());
+            log.trace("{} No plain text source provided to encrypt", getLogPrefix());
             return;
         }
         
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/SignJWTHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/SignJWTHandler.java
index 147fdd1..c20e288 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/SignJWTHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/SignJWTHandler.java
@@ -220,7 +220,7 @@ public class SignJWTHandler extends AbstractMessageHandler {
             if (log.isDebugEnabled() && !log.isTraceEnabled()) {
                 log.debug("{} Signed JWT '{}'", getLogPrefix(), logName);
             } else if (log.isTraceEnabled()) {
-                log.debug("{} Signed JWT '{}': {}", getLogPrefix(), logName, jwt.serialize());
+                log.trace("{} Signed JWT '{}': {}", getLogPrefix(), logName, jwt.serialize());
             }            
             
             if (jwt.getState() != State.SIGNED) {
@@ -268,13 +268,12 @@ public class SignJWTHandler extends AbstractMessageHandler {
     protected JWSAlgorithm resolveAlgorithm() {
 
         final JWSAlgorithm algorithm = new JWSAlgorithm(signatureSigningParameters.getSignatureAlgorithm());
-        if (credential instanceof JWKCredential) {
-            if (!algorithm.equals(((JWKCredential) credential).getAlgorithm())) {
-                log.debug("{} Signature signing algorithm {} differs from JWK algorithm {}", getLogPrefix(),
-                        algorithm.getName(), ((JWKCredential) credential).getAlgorithm());
-            }
+        if (credential instanceof JWKCredential && !algorithm.equals(((JWKCredential) credential).getAlgorithm())) {
+            log.debug("{} Signature signing algorithm {} differs from JWK algorithm {}", getLogPrefix(),
+                    algorithm.getName(), (((JWKCredential) credential).getAlgorithm() != null ? 
+                            ((JWKCredential) credential).getAlgorithm() : "not specified"));            
         }
-        log.debug("{} Algorithm resolved {}", getLogPrefix(), algorithm.getName());
+        log.trace("{} Algorithm resolved {}", getLogPrefix(), algorithm.getName());
         return algorithm;
     }
 

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


More information about the commits mailing list