[java-plugin-shibd] branch main updated: Migrate audit logging changes back to IdP.
Codeberg
noreply at shibboleth.net
Tue Nov 17 16:11:45 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-plugin-shibd.
View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd/commit/6ffe2ce4e6543826c3dd6ba85531ddff2314f84f
The following commit(s) were added to refs/heads/main by this push:
new 6ffe2ce Migrate audit logging changes back to IdP.
6ffe2ce is described below
commit 6ffe2ce4e6543826c3dd6ba85531ddff2314f84f
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Tue Nov 17 11:11:01 2026 -0500
Migrate audit logging changes back to IdP.
---
.../idp/flows/sp/abstract/sp-abstract-beans.xml | 2 +-
.../shibboleth/sp/profile/impl/WriteAuditLog.java | 85 ----------------------
2 files changed, 1 insertion(+), 86 deletions(-)
diff --git a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/abstract/sp-abstract-beans.xml b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/abstract/sp-abstract-beans.xml
index 6daf6bf..717429d 100644
--- a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/abstract/sp-abstract-beans.xml
+++ b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/abstract/sp-abstract-beans.xml
@@ -74,7 +74,7 @@
p:fieldExtractors="#{getObject('shibboleth.sp.PostAgentDecodeAuditExtractors') ?: getObject('shibboleth.sp.DefaultPostAgentDecodeAuditExtractors')}" />
<bean id="WriteAuditLog"
- class="net.shibboleth.sp.profile.impl.WriteAuditLog" scope="prototype" lazy-init="true"
+ class="net.shibboleth.idp.profile.audit.impl.WriteAuditLog" scope="prototype" lazy-init="true"
p:formattingMap="#{getObject('shibboleth.sp.AuditFormattingMap') ?: getObject('shibboleth.sp.DefaultAuditFormattingMap')}"
p:dateTimeFormat="#{getObject('shibboleth.AuditDateTimeFormat')}"
p:useDefaultTimeZone="#{getObject('shibboleth.AuditDefaultTimeZone') ?: false}"
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/WriteAuditLog.java b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/WriteAuditLog.java
deleted file mode 100644
index e96ee92..0000000
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/WriteAuditLog.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.shibboleth.sp.profile.impl;
-
-import java.util.function.Function;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.profile.context.EventContext;
-import org.opensaml.profile.context.ProfileRequestContext;
-import org.opensaml.profile.context.navigate.CurrentOrPreviousEventLookup;
-
-import jakarta.servlet.http.HttpServletRequest;
-import net.shibboleth.shared.logic.Constraint;
-
-/**
- * Subclass of IdP auditing action that overrides the {@link HttpServletRequest} accessor
- * to bypass the "non-null" assumptions built into our profile action classes.
- *
- * This is an "alternative" means of getting the remoted request into the execution code
- * and is necessary when the object may be absent.
- */
-public class WriteAuditLog extends net.shibboleth.idp.profile.audit.impl.WriteAuditLog {
-
- /** Strategy function for access to {@link EventContext} to check. */
- @Nonnull private Function<ProfileRequestContext,EventContext> eventContextLookupStrategy;
-
- /** Constructor. */
- public WriteAuditLog() {
- eventContextLookupStrategy = new CurrentOrPreviousEventLookup();
- }
-
- /**
- * Set lookup strategy for {@link EventContext} to check.
- *
- * @param strategy lookup strategy
- */
- public void setEventContextLookupStrategy(@Nonnull final Function<ProfileRequestContext,EventContext> strategy) {
- checkSetterPreconditions();
-
- eventContextLookupStrategy = Constraint.isNotNull(strategy, "EventContext lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
- @Override
- @Nullable public HttpServletRequest getHttpServletRequest() {
- try {
- return super.getHttpServletRequest();
- } catch (final IllegalStateException e) {
- return null;
- }
- }
-
- /**
- * This is a "new" method intended to override something that the base class in 5.2 doesn't call
- * but the base class in 5.3 will.
- *
- * @param profileRequestContext profile request context
- *
- * @return event to log
- */
- @Nullable protected String getEvent(@Nonnull final ProfileRequestContext profileRequestContext) {
- final EventContext eventCtx = eventContextLookupStrategy.apply(profileRequestContext);
- final Object event = eventCtx != null ? eventCtx.getEvent() : null;
- if (event != null) {
- return event.toString();
- }
-
- return null;
- }
-
-}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list