[java-plugin-shibd] branch main updated: Finish re-wiring cookie-backed state tokens.
Scott Cantor
cantor.2 at osu.edu
Thu Apr 10 16:49:30 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-plugin-shibd.
View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd.git;a=commit;h=d7e47c510916b5961d1aedc01ffe02700cca12c3
The following commit(s) were added to refs/heads/main by this push:
new d7e47c5 Finish re-wiring cookie-backed state tokens.
d7e47c5 is described below
commit d7e47c510916b5961d1aedc01ffe02700cca12c3
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Apr 10 12:49:28 2025 -0400
Finish re-wiring cookie-backed state tokens.
---
.../META-INF/net.shibboleth.idp/postconfig.xml | 3 +-
.../net/shibboleth/sp/conf/agents-system.xml | 3 +-
.../sp/messaging/RemotedHttpServletRequest.java | 48 +++++++++++-----------
.../sp/profile/impl/DecodeAgentRequest.java | 2 +-
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml b/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
index 4dfe682..73798ac 100644
--- a/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
+++ b/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
@@ -46,7 +46,8 @@
class="net.shibboleth.sp.profile.impl.TokenConsumerFlowDescriptorManager"
p:components="#{getObject('shibboleth.AvailableTokenConsumerFlows')}" />
- <bean id="shibboleth.SP.CookieManager" class="net.shibboleth.shared.net.CookieManager" lazy-init="true"
+ <bean id="shibboleth.RemotedCookieManager" class="net.shibboleth.shared.net.CookieManager" lazy-init="true"
+ p:guardSetAttribute="false"
p:httpServletRequestSupplier-ref="shibboleth.RemotedHttpServletRequestSupplier"
p:httpServletResponseSupplier-ref="shibboleth.RemotedHttpServletResponseSupplier"
p:cookieLimit="%{sp.cookie.limit:10}"
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/agents-system.xml b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/agents-system.xml
index 6a9fad1..b8e9b30 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/agents-system.xml
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/agents-system.xml
@@ -52,8 +52,7 @@
p:storageService-ref="#{'%{sp.stateToken.StorageService:shibboleth.StorageService}'.trim()}" />
<bean id="shibboleth.CookieStateTokenManager" class="net.shibboleth.sp.impl.CookieStateTokenManager" lazy-init="true"
- p:httpServletRequestSupplier-ref="shibboleth.RemotedHttpServletRequestSupplier"
- p:httpServletResponseSupplier-ref="shibboleth.RemotedHttpServletResponseSupplier" />
+ p:cookieManager-ref="shibboleth.RemotedCookieManager" />
<!-- Wildcard import hook for plugins. -->
<import resource="classpath*:/META-INF/net/shibboleth/sp/service/agent/postconfig.xml" />
diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/messaging/RemotedHttpServletRequest.java b/sp-server-api/src/main/java/net/shibboleth/sp/messaging/RemotedHttpServletRequest.java
index b6e31e0..2e05328 100644
--- a/sp-server-api/src/main/java/net/shibboleth/sp/messaging/RemotedHttpServletRequest.java
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/messaging/RemotedHttpServletRequest.java
@@ -163,12 +163,12 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public String getCharacterEncoding() {
- return "UTF-8";
+ return StandardCharsets.UTF_8.name();
}
/** {@inheritDoc} */
public void setCharacterEncoding(final String env) throws UnsupportedEncodingException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("setCharacterEncoding");
}
/** {@inheritDoc} */
@@ -262,7 +262,7 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public ServletConnection getServletConnection() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getServletConnection");
}
/** {@inheritDoc} */
@@ -307,22 +307,22 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public void setAttribute(final String name, final Object o) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("setAttribute");
}
/** {@inheritDoc} */
public void removeAttribute(final String name) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("removeAttribute");
}
/** {@inheritDoc} */
public Locale getLocale() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getLocale");
}
/** {@inheritDoc} */
public Enumeration<Locale> getLocales() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getLocales");
}
/** {@inheritDoc} */
@@ -332,24 +332,24 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public RequestDispatcher getRequestDispatcher(final String path) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getRequestDispatcher");
}
/** {@inheritDoc} */
public int getRemotePort() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getRemotePort");
}
/** {@inheritDoc} */
public String getLocalName() {
// TODO: If we need this, should be configurable via the c'tor.
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getLocalName");
}
/** {@inheritDoc} */
public String getLocalAddr() {
// TODO: If we need this, should be configurable via the c'tor.
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getLocalAddr");
}
/** {@inheritDoc} */
@@ -359,18 +359,18 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public ServletContext getServletContext() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getServletContext");
}
/** {@inheritDoc} */
public AsyncContext startAsync() throws IllegalStateException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("startAsync");
}
/** {@inheritDoc} */
public AsyncContext startAsync(final ServletRequest servletRequest, final ServletResponse servletResponse)
throws IllegalStateException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("startAsync");
}
/** {@inheritDoc} */
@@ -385,12 +385,12 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public AsyncContext getAsyncContext() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getAsyncContext");
}
/** {@inheritDoc} */
public DispatcherType getDispatcherType() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getDispatcherType");
}
/** {@inheritDoc} */
@@ -498,7 +498,7 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public String getPathInfo() {
// TODO: If we need this, should be configurable via the c'tor.
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getPathInfo");
}
/** {@inheritDoc} */
@@ -508,8 +508,8 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public String getContextPath() {
- // TODO: If we need this, should be configurable via the c'tor.
- throw new UnsupportedOperationException();
+ // Empty seems the most logical value here.
+ return "";
}
/** {@inheritDoc} */
@@ -557,7 +557,7 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public HttpSession getSession(final boolean create) {
if (create) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("getSession");
}
return null;
}
@@ -569,7 +569,7 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public String changeSessionId() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("changeSessionId");
}
/** {@inheritDoc} */
@@ -589,12 +589,12 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public boolean authenticate(final HttpServletResponse response) throws IOException, ServletException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("authenticate");
}
/** {@inheritDoc} */
public void login(final String username, final String password) throws ServletException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("login");
}
/** {@inheritDoc} */
@@ -614,7 +614,7 @@ public class RemotedHttpServletRequest implements HttpServletRequest {
/** {@inheritDoc} */
public <T extends HttpUpgradeHandler> T upgrade(final Class<T> handlerClass) throws IOException, ServletException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("upgrade");
}
/**
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java
index 99e645d..82e6a76 100644
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java
@@ -81,7 +81,7 @@ public class DecodeAgentRequest extends AbstractAgentRequestAction {
agentContext.setInput(msg);
if (msg.isstruct()) {
- final DDF httpreq = msg.getmember("http");
+ final DDF httpreq = msg.getmember(RemotedHttpServletRequest.STRUCTURE_NAME);
if (httpreq.isstruct()) {
log.debug("{} Wrapping tunnelled HTTP request", getLogPrefix());
agentContext.setRemotedHttpServletRequest(new RemotedHttpServletRequest(httpreq));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list