[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml id...

noreply at shibboleth.net noreply at shibboleth.net
Tue Dec 2 16:05:21 EST 2014


Author: tzeller
Date: Tue Dec  2 16:05:21 2014
New Revision: 7034

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7034&view=rev
Log:
IDP-523 First attempt at terms-of-use audit logging.

Added:
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/audit/
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/audit/ConsentAuditFields.java   (with props)
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/audit/CurrentConsentIdsAuditExtractor.java   (with props)
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/audit/CurrentConsentIsApprovedAuditExtractor.java   (with props)
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/audit/CurrentConsentValuesAuditExtractor.java   (with props)
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/audit/package-info.java   (with props)
    trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/audit/
    trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/audit/AbstractConsentAuditExtractorTest.java   (with props)
    trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/audit/CurrentConsentIdsAuditExtractorTest.java   (with props)
    trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/audit/CurrentConsentIsApprovedAuditExtractorTest.java   (with props)
    trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/audit/CurrentConsentValuesAuditExtractorTest.java   (with props)
Modified:
    trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml
    trunk/idp-conf/src/main/resources/conf/logback.xml
    trunk/idp-conf/src/main/resources/system/conf/profile-intercept-system.xml
    trunk/idp-conf/src/main/resources/system/flows/intercept/terms-of-use-beans.xml
    trunk/idp-conf/src/main/resources/system/flows/intercept/terms-of-use-flow.xml

Modified: trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml?rev=7034&r1=7033&r2=7034&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml (original)
+++ trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml Tue Dec  2 16:05:21 2014
@@ -65,4 +65,32 @@
         c:regex="^exampleAttribute.*$" />
     -->
 
+    <!--
+    This bean defines a mapping between audit log categories and formatting strings.
+
+    For terms-of-use acceptance, the default entry is :
+     'YYYYMMDDTHHMMSSZ|TermsAccepted|jdoe|example-tou-1|rHo...rrw=|true'
+
+    For terms-of-use refusal, the default entry is :
+     'YYYYMMDDTHHMMSSZ|TermsRejected|jdoe|example-tou-1|rHo...rrw=|false'
+
+    -->
+    <util:map id="shibboleth.ConsentAuditFormattingMap">
+        <entry key="Shibboleth-Consent-Audit" value="%T|%e|%u|%CCI|%CCV|%CCA" />
+    </util:map>
+
+    <!--
+    The beans below need to be defined, even if left empty. They can be ignored in most cases.
+    
+    If you write your own function to extract a new piece of data for auditing, you can install it into one or more
+    of the maps below to add it to the auditing framework, keyed by an audit field label to be used in formatting.
+    -->
+
+    <bean id="shibboleth.ConsentAuditExtractors" parent="shibboleth.DefaultConsentAuditExtractors" lazy-init="true">
+        <property name="sourceMap">
+            <map merge="true">
+            </map>
+        </property>
+    </bean>
+
 </beans>

Modified: trunk/idp-conf/src/main/resources/conf/logback.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/logback.xml?rev=7034&r1=7033&r2=7034&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/logback.xml (original)
+++ trunk/idp-conf/src/main/resources/conf/logback.xml Tue Dec  2 16:05:21 2014
@@ -15,7 +15,7 @@
     <logger name="PROTOCOL_MESSAGE" level="DEBUG" />
     -->
 
-    <!-- Especially chatty. -->    
+    <!-- Especially chatty. -->
     <logger name="net.shibboleth.idp.saml.attribute.mapping" level="INFO" />
     <logger name="org.opensaml.saml.metadata.resolver.filter.impl.EntitiesDescriptorNameProcessor" level="INFO" />
    
@@ -58,8 +58,26 @@
     
     <logger name="Shibboleth-Audit" level="ALL">
         <appender-ref ref="IDP_AUDIT"/>
-    </logger>    
+    </logger>
 
+    <!-- Consent audit log. -->
+    <appender name="IDP_CONSENT_AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <File>${idp.home}/logs/idp-consent-audit.log</File>
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <FileNamePattern>${idp.home}/logs/idp-consent-audit-%d{yyyy-MM-dd}.log</FileNamePattern>
+        </rollingPolicy>
+
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <charset>UTF-8</charset>
+            <Pattern>%msg%n</Pattern>
+        </encoder>

[... 126 lines stripped ...]


More information about the commits mailing list