[java-support] branch maint-7 updated: Add logging.

Scott Cantor cantor.2 at osu.edu
Wed Aug 15 15:50:46 EDT 2018


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

scantor pushed a commit to branch maint-7
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=73c18c2a11580f52596596093604b47e72114a0f

The following commit(s) were added to refs/heads/maint-7 by this push:
       new  73c18c2   Add logging.
73c18c2 is described below

commit 73c18c2a11580f52596596093604b47e72114a0f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Aug 15 15:50:43 2018 -0400

    Add logging.
---
 .../utilities/java/support/security/IPRangeAccessControl.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main/java/net/shibboleth/utilities/java/support/security/IPRangeAccessControl.java b/src/main/java/net/shibboleth/utilities/java/support/security/IPRangeAccessControl.java
index c4709e7..8db135e 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/security/IPRangeAccessControl.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/security/IPRangeAccessControl.java
@@ -84,16 +84,20 @@ public class IPRangeAccessControl extends AbstractIdentifiableInitializableCompo
                 final byte[] resolvedAddress = InetAddresses.forString(addr).getAddress();
                 for (final IPRange range : allowedRanges) {
                     if (range.contains(resolvedAddress)) {
+                        log.debug("{} Granted access to client address '{}' (Operation: {}, Resource: {})",
+                                new Object[] {getLogPrefix(), addr, operation, resource});
                         return true;
                     }
                 }
             } catch (final IllegalArgumentException e) {
-                log.warn(getLogPrefix() + " Error translating client address", e);
+                log.warn("{} Error translating client address", getLogPrefix(), e);
             }
             
-            log.warn("{} Denied request from client address '{}'", getLogPrefix(), addr);
+            log.warn("{} Denied request from client address '{}' (Operation: {}, Resource: {})",
+                    new Object[] {getLogPrefix(), addr, operation, resource});
         } else {
-            log.warn("{} No client address, access denied", getLogPrefix());
+            log.warn("{} Denied request from client address 'unknown' (Operation: {}, Resource: {})",
+                    new Object[] {getLogPrefix(), operation, resource});
         }
         
         return false;

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


More information about the commits mailing list