[java-idp-plugin-totp] branch main updated: JTOTP-15 - Support authn audit logging

Scott Cantor cantor.2 at osu.edu
Thu Mar 27 18:01:20 UTC 2025


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

scantor pushed a commit to branch main
in repository java-idp-plugin-totp.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-totp.git;a=commit;h=616235486e33afa38c689525d38ad6f020c2afbb

The following commit(s) were added to refs/heads/main by this push:
     new 6162354  JTOTP-15 - Support authn audit logging
6162354 is described below

commit 616235486e33afa38c689525d38ad6f020c2afbb
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Mar 27 14:01:17 2025 -0400

    JTOTP-15 - Support authn audit logging
    
    https://shibboleth.atlassian.net/browse/JTOTP-15
---
 pom.xml                                            |  2 +-
 totp-dist/pom.xml                                  |  2 +-
 totp-impl/pom.xml                                  |  2 +-
 .../shibboleth/idp/flows/authn/TOTP/TOTP-beans.xml | 22 +++++++++++++++++++++-
 .../idp/plugin/authn/totp/plugin.properties        |  2 +-
 5 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index faccfd4..9504814 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
     <description>An IdP plugin providing TOTP login support.</description>
     <groupId>net.shibboleth.idp.plugin.authn</groupId>
     <artifactId>idp-plugin-totp-parent</artifactId>
-    <version>2.2.1-SNAPSHOT</version>
+    <version>2.3.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <modules>
diff --git a/totp-dist/pom.xml b/totp-dist/pom.xml
index 5a0f7d7..3181cff 100644
--- a/totp-dist/pom.xml
+++ b/totp-dist/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>net.shibboleth.idp.plugin.authn</groupId>
         <artifactId>idp-plugin-totp-parent</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.3.0-SNAPSHOT</version>
     </parent>
 
     <name>Shibboleth IdP :: Plugins :: TOTP Login Flow Distribution</name>
diff --git a/totp-impl/pom.xml b/totp-impl/pom.xml
index edb2655..972651e 100644
--- a/totp-impl/pom.xml
+++ b/totp-impl/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>net.shibboleth.idp.plugin.authn</groupId>
         <artifactId>idp-plugin-totp-parent</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.3.0-SNAPSHOT</version>
     </parent>
     
     <name>Shibboleth IdP :: Plugins :: TOTP Login Flow Impl</name>
diff --git a/totp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/TOTP/TOTP-beans.xml b/totp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/TOTP/TOTP-beans.xml
index d635674..3ab56a6 100644
--- a/totp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/TOTP/TOTP-beans.xml
+++ b/totp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/TOTP/TOTP-beans.xml
@@ -50,7 +50,9 @@
         p:resultCachingPredicate="#{getObject('shibboleth.authn.TOTP.resultCachingPredicate')}"
         p:addDefaultPrincipals="%{idp.authn.TOTP.addDefaultPrincipals:true}"
         p:classifiedMessages="#{getObject('shibboleth.authn.TOTP.ClassifiedMessageMap')}"
-        p:lockoutManager="#{getObject('shibboleth.authn.TOTP.AccountLockoutManager')}" />
+        p:lockoutManager="#{getObject('shibboleth.authn.TOTP.AccountLockoutManager')}"
+        p:populateAuditContextAction="#{%{idp.authn.TOTP.audit.enabled:%{idp.authn.audit.enabled:false}} ? getObject('shibboleth.authn.TOTP.PopulateAuditContext') : null}"
+        p:writeAuditLogAction="#{%{idp.authn.TOTP.audit.enabled:%{idp.authn.audit.enabled:false}} ? getObject('WriteAuthnAuditLog') : null}" />
     
     <!-- These are singletons acting as default "back-ends". -->
     
@@ -86,4 +88,22 @@
         </constructor-arg>
     </bean>
 
+    <!-- Audit logging beans. -->
+
+    <util:map id="shibboleth.authn.AuditFormattingMap">
+        <entry key="#{'%{idp.authn.TOTP.audit.category:Shibboleth-Audit.TOTP}'.trim()}"
+            value="#{'%{idp.authn.TOTP.audit.format:%a|%T|%SP|%I|%s|%AF|%u|%AR|%UA}'.trim()}" />
+    </util:map>
+
+    <bean id="shibboleth.authn.TOTP.DefaultAuditExtractors" parent="shibboleth.authn.DefaultAuditExtractors" lazy-init="true"
+            class="org.springframework.beans.factory.config.MapFactoryBean">
+        <property name="sourceMap">
+             <map merge="true" />
+        </property>
+    </bean>
+    
+    <bean id="shibboleth.authn.TOTP.PopulateAuditContext" parent="shibboleth.authn.AbstractPopulateAuditContext" lazy-init="true"
+        p:fieldExtractors="#{getObject('shibboleth.authn.TOTP.AuditExtractors') ?: getObject('shibboleth.authn.TOTP.DefaultAuditExtractors')}"
+        p:clearAuditContext="true" />
+
 </beans>
diff --git a/totp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/totp/plugin.properties b/totp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/totp/plugin.properties
index 3ba483d..1376322 100644
--- a/totp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/totp/plugin.properties
+++ b/totp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/totp/plugin.properties
@@ -2,7 +2,7 @@
 
 plugin.id = net.shibboleth.idp.plugin.authn.totp
 # Only used when package manifest is not available
-plugin.version = 2.2.0
+plugin.version = 2.3.0
 plugin.license =/net/shibboleth/idp/plugin/authn/totp/doc/GoogleAuth-LICENSE.txt
 
 # No prereqs

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


More information about the commits mailing list