cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbernha...@apache.org
Subject cxf git commit: [CXF-6141] Adding KeyType to STS Audit Events
Date Mon, 08 Dec 2014 16:41:53 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 5c8645a4d -> 4b44512d8


[CXF-6141] Adding KeyType to STS Audit Events


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4b44512d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4b44512d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4b44512d

Branch: refs/heads/master
Commit: 4b44512d8c3fe76620dbac37d220038435c75ba5
Parents: 5c8645a
Author: Jan Bernhardt <jbernhardt@talend.com>
Authored: Mon Dec 8 17:10:58 2014 +0100
Committer: Jan Bernhardt <jbernhardt@talend.com>
Committed: Mon Dec 8 17:40:46 2014 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/sts/event/map/EventMapper.java     | 14 ++++++++++++--
 .../main/java/org/apache/cxf/sts/event/map/KEYS.java  |  3 ++-
 .../org/apache/cxf/sts/event/map/MapEventLogger.java  |  1 +
 3 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4b44512d/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
index d8eea08..ffe23a3 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
@@ -105,8 +105,9 @@ public class EventMapper implements STSEventListener {
             if (params.getTokenRequirements().getActAs() != null) {
                 map.put(KEYS.ACTAS_PRINCIPAL.name(), params.getTokenRequirements().getActAs().getPrincipal().getName());
             }
-        } else {
-            map.put(KEYS.TOKENTYPE.name(), "N.A.");
+        }
+        if(params.getKeyRequirements() != null) {
+            map.put(KEYS.KEYTYPE.name(), params.getKeyRequirements().getKeyType());
         }
         if (params.getPrincipal() != null) {
             map.put(KEYS.WS_SEC_PRINCIPAL.name(), params.getPrincipal().getName());
@@ -143,6 +144,9 @@ public class EventMapper implements STSEventListener {
             map.put(KEYS.VALIDATE_PRINCIPAL.name(), params.getTokenRequirements().getValidateTarget().getPrincipal()
                     .getName());
         }
+        if(params.getKeyRequirements() != null) {
+            map.put(KEYS.KEYTYPE.name(), params.getKeyRequirements().getKeyType());
+        }
         if (params.getPrincipal() != null) {
             map.put(KEYS.WS_SEC_PRINCIPAL.name(), params.getPrincipal().getName());
         }
@@ -162,6 +166,9 @@ public class EventMapper implements STSEventListener {
             map.put(KEYS.CANCEL_PRINCIPAL.name(), params.getTokenRequirements().getCancelTarget().getPrincipal()
                     .getName());
         }
+        if(params.getKeyRequirements() != null) {
+            map.put(KEYS.KEYTYPE.name(), params.getKeyRequirements().getKeyType());
+        }
         if (params.getPrincipal() != null) {
             map.put(KEYS.WS_SEC_PRINCIPAL.name(), params.getPrincipal().getName());
         }
@@ -183,6 +190,9 @@ public class EventMapper implements STSEventListener {
         if (params.getPrincipal() != null) {
             map.put(KEYS.WS_SEC_PRINCIPAL.name(), params.getPrincipal().getName());
         }
+        if(params.getKeyRequirements() != null) {
+            map.put(KEYS.KEYTYPE.name(), params.getKeyRequirements().getKeyType());
+        }
         map.put(KEYS.REALM.name(), params.getRealm());
         map.put(KEYS.APPLIESTO.name(), params.getAppliesToAddress());
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4b44512d/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/KEYS.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/KEYS.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/KEYS.java
index edc26b7..cf5ae39 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/KEYS.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/KEYS.java
@@ -38,5 +38,6 @@ public enum KEYS {
     REMOTE_HOST,
     REMOTE_PORT,
     URL,
-    STACKTRACE
+    STACKTRACE,
+    KEYTYPE
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/4b44512d/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/MapEventLogger.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/MapEventLogger.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/MapEventLogger.java
index d54ab14..958d1d6 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/MapEventLogger.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/MapEventLogger.java
@@ -55,6 +55,7 @@ public class MapEventLogger implements MapEventListener {
         fieldOrder.add(KEYS.CANCEL_PRINCIPAL.name());
         fieldOrder.add(KEYS.RENEW_PRINCIPAL.name());
         fieldOrder.add(KEYS.TOKENTYPE.name());
+        fieldOrder.add(KEYS.KEYTYPE.name());
         fieldOrder.add(KEYS.APPLIESTO.name());
         fieldOrder.add(KEYS.CLAIMS_PRIMARY.name());
         fieldOrder.add(KEYS.CLAIMS_SECONDARY.name());


Mime
View raw message