[java-idp-oidc] branch main updated: JOIDC-33 Remove the skeleton WebFinger-support
Henri Mikkonen
henri.mikkonen at iki.fi
Thu Feb 18 16:30:56 UTC 2021
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-idp-oidc.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=8099090a0e0f7904407c6dccdf05a21d6a6381b3
The following commit(s) were added to refs/heads/main by this push:
new 8099090a JOIDC-33 Remove the skeleton WebFinger-support
8099090a is described below
commit 8099090a0e0f7904407c6dccdf05a21d6a6381b3
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Thu Feb 18 18:30:40 2021 +0200
JOIDC-33 Remove the skeleton WebFinger-support
https://issues.shibboleth.net/jira/browse/JOIDC-33
---
.../oidc/op/messaging/OIDCWebFingerRequest.java | 37 ------
.../oidc/op/messaging/OIDCWebFingerResponse.java | 56 ---------
.../idp/plugin/oidc/op/profile/OidcEventIds.java | 5 -
.../decoding/impl/OIDCWebFingerRequestDecoder.java | 63 -----------
.../messaging/impl/OIDCWebFingerRequestImpl.java | 53 ---------
.../messaging/impl/OIDCWebFingerResponseImpl.java | 57 ----------
.../impl/OIDCWebFingerResponseLinkImpl.java | 56 ---------
.../oidc/op/messaging/impl/package-info.java | 21 ----
.../op/profile/impl/BuildWebFingerResponse.java | 125 ---------------------
.../oidc/op/profile/impl/CheckWebFingerRel.java | 78 -------------
.../op/profile/impl/CheckWebFingerResource.java | 71 ------------
.../idp/flows/oidc/webfinger/webfinger-beans.xml | 65 -----------
.../idp/flows/oidc/webfinger/webfinger-flow.xml | 45 --------
13 files changed, 732 deletions(-)
diff --git a/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/OIDCWebFingerRequest.java b/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/OIDCWebFingerRequest.java
deleted file mode 100644
index c5c261d8..00000000
--- a/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/OIDCWebFingerRequest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.messaging;
-
-/**
- * An interface for Web Finger requests related to OIDC.
- */
-public interface OIDCWebFingerRequest {
-
- /**
- * Get the identifier for the target End-User that is the subject of the discovery request.
- * @return The identifier for the target End-User that is the subject of the discovery request.
- */
- public String getResource();
-
- /**
- * Get the URI identifying the type of service whose location is being requested.
- * @return The URI identifying the type of service whose location is being requested.
- */
- public String getRel();
-
-}
diff --git a/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/OIDCWebFingerResponse.java b/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/OIDCWebFingerResponse.java
deleted file mode 100644
index 6b2c80e2..00000000
--- a/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/OIDCWebFingerResponse.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.messaging;
-
-import java.util.List;
-
-/**
- * An interface for Web Finger responses related to OIDC.
- */
-public interface OIDCWebFingerResponse {
-
- /**
- * Get the identifier for the target End-User that is the subject of the discovery links.
- * @return The identifier for the target End-User that is the subject of the discovery links.
- */
- public String getSubject();
-
- /**
- * Get the links for services being able to authenticate the target End-User.
- * @return The links for services being able to authenticate the target End-User.
- */
- public List<Link> getLinks();
-
- /**
- * An interface for a link in a Web Finger response related to OIDC.
- */
- public interface Link {
-
- /**
- * Get the URI identifying the type of service.
- * @return The URI identifying the type of service.
- */
- public String getRel();
-
- /**
- * Get the link to the service.
- * @return The link to the service.
- */
- public String getHref();
- }
-}
diff --git a/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/OidcEventIds.java b/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/OidcEventIds.java
index b8ea0ca5..631ff895 100644
--- a/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/OidcEventIds.java
+++ b/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/OidcEventIds.java
@@ -37,11 +37,6 @@ public final class OidcEventIds {
*/
@Nonnull @NotEmpty public static final String INVALID_REDIRECT_URIS = "InvalidRedirectionURIs";
- /**
- * ID of event returned if the WebFinger rel is invalid / not supported.
- */
- @Nonnull @NotEmpty public static final String INVALID_WEBFINGER_REL = "InvalidWebFingerRel";
-
/**
* The provided authorization grant is invalid.
*/
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/decoding/impl/OIDCWebFingerRequestDecoder.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/decoding/impl/OIDCWebFingerRequestDecoder.java
deleted file mode 100644
index eb7d57fa..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/decoding/impl/OIDCWebFingerRequestDecoder.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.decoding.impl;
-
-import javax.annotation.Nonnull;
-import javax.servlet.http.HttpServletRequest;
-
-import org.opensaml.messaging.context.MessageContext;
-import org.opensaml.messaging.decoder.MessageDecodingException;
-import org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerRequest;
-import net.shibboleth.idp.plugin.oidc.op.messaging.impl.OIDCWebFingerRequestImpl;
-import net.shibboleth.utilities.java.support.primitive.StringSupport;
-
-/**
- * A message decoder for {@link OIDCWebFingerRequest}.
- */
-public class OIDCWebFingerRequestDecoder extends AbstractHttpServletRequestMessageDecoder {
-
- /** Class logger. */
- @Nonnull
- private final Logger log = LoggerFactory.getLogger(OIDCWebFingerRequestDecoder.class);
-
- /** {@inheritDoc} */
- @Override
- protected void doDecode() throws MessageDecodingException {
- final MessageContext messageContext = new MessageContext();
- final HttpServletRequest httpRequest = getHttpServletRequest();
- final String resource = StringSupport.trimOrNull(httpRequest.getParameter("resource"));
- if (resource == null) {
- log.error("No resource parameter value found from the request");
- throw new MessageDecodingException("Mandatory value for resource is missing");
- }
- final String rel = StringSupport.trim(httpRequest.getParameter("rel"));
- if (rel == null) {
- log.error("No rel parameter value found from the request");
- throw new MessageDecodingException("Mandatory value for rel is missing");
- }
- final OIDCWebFingerRequestImpl request = new OIDCWebFingerRequestImpl(resource, rel);
- log.debug("Decoded Web Finger request with resource = {} and rel = {}", resource, rel);
- messageContext.setMessage(request);
- setMessageContext(messageContext);
- }
-
-}
\ No newline at end of file
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerRequestImpl.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerRequestImpl.java
deleted file mode 100644
index 846e769d..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerRequestImpl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.messaging.impl;
-
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerRequest;
-
-/**
- * A simple implementation for {@link OIDCWebFingerRequest}.
- */
-public class OIDCWebFingerRequestImpl implements OIDCWebFingerRequest {
-
- /** The identifier for the target End-User that is the subject of the discovery request. */
- private String resource;
-
- /** The URI identifying the type of service whose location is being requested. */
- private String rel;
-
- /**
- * Constructor.
- *
- * @param resrc The identifier for the target End-User that is the subject of the discovery request.
- * @param rl The URI identifying the type of service whose location is being requested.
- */
- public OIDCWebFingerRequestImpl(final String resrc, final String rl) {
- resource = resrc;
- rel = rl;
- }
-
- /** {@inheritDoc} */
- public String getResource() {
- return resource;
- }
-
- /** {@inheritDoc} */
- public String getRel() {
- return rel;
- }
-}
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerResponseImpl.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerResponseImpl.java
deleted file mode 100644
index c5d36845..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerResponseImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.messaging.impl;
-
-import java.util.List;
-
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerResponse;
-
-/**
- * A simple implementation for {@link OIDCWebFingerResponse}.
- */
-public class OIDCWebFingerResponseImpl implements OIDCWebFingerResponse {
-
- /** The identifier for the target End-User that is the subject of the discovery links. */
- private String subject;
-
- /** The links for services being able to authenticate the target End-User. */
- private List<Link> links;
-
- /**
- * Constructor.
- *
- * @param sub The identifier for the target End-User that is the subject of the discovery links.
- * @param lnks The links for services being able to authenticate the target End-User.
- */
- public OIDCWebFingerResponseImpl(final String sub, final List<Link> lnks) {
- subject = sub;
- links = lnks;
- }
-
- /** {@inheritDoc} */
- @Override
- public String getSubject() {
- return subject;
- }
-
- /** {@inheritDoc} */
- @Override
- public List<Link> getLinks() {
- return links;
- }
-}
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerResponseLinkImpl.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerResponseLinkImpl.java
deleted file mode 100644
index aaa06614..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/OIDCWebFingerResponseLinkImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.messaging.impl;
-
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerResponse.Link;
-
-/**
- * A simple implementation for {@link Link}.
- */
-public class OIDCWebFingerResponseLinkImpl implements Link {
-
-
- /** The URI identifying the type of service. */
- private String rel;
-
- /** The link to the service. */
- private String href;
-
- /**
- * Constructor.
- *
- * @param rl The URI identifying the type of service.
- * @param ref The link to the service.
- */
- public OIDCWebFingerResponseLinkImpl(final String rl, final String ref) {
- rel = rl;
- href = ref;
- }
-
- /** {@inheritDoc} */
- @Override
- public String getRel() {
- return rel;
- }
-
- /** {@inheritDoc} */
- @Override
- public String getHref() {
- return href;
- }
-}
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/package-info.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/package-info.java
deleted file mode 100644
index 52a33323..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/messaging/impl/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.
- */
-
-/**
- * Message implementations related to OIDC messaging.
- */
-package net.shibboleth.idp.plugin.oidc.op.messaging.impl;
\ No newline at end of file
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/BuildWebFingerResponse.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/BuildWebFingerResponse.java
deleted file mode 100644
index 7862d389..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/BuildWebFingerResponse.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.profile.impl;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import javax.servlet.http.HttpServletResponse;
-
-import org.opensaml.profile.action.ActionSupport;
-import org.opensaml.profile.action.EventIds;
-import org.opensaml.profile.context.ProfileRequestContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.gson.Gson;
-
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerRequest;
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerResponse;
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerResponse.Link;
-import net.shibboleth.idp.plugin.oidc.op.messaging.impl.OIDCWebFingerResponseImpl;
-import net.shibboleth.idp.plugin.oidc.op.messaging.impl.OIDCWebFingerResponseLinkImpl;
-import net.shibboleth.idp.profile.AbstractProfileAction;
-import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
-import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-import net.shibboleth.utilities.java.support.component.ComponentSupport;
-import net.shibboleth.utilities.java.support.logic.Constraint;
-
-/**
- * This action builds a response for the OIDC Web Finger. The resource value from the request is directly used as
- * a subject. The issuer link value must be configured.
- */
-public class BuildWebFingerResponse extends AbstractProfileAction {
-
- /** Class logger. */
- @Nonnull private final Logger log = LoggerFactory.getLogger(BuildWebFingerResponse.class);
-
- /** The OIDC issuer name to be used in the responses. */
- @NonnullAfterInit private String oidcIssuer;
-
- /** The OIDC WebFinger request. */
- @Nullable private OIDCWebFingerRequest request;
-
- /**
- * Set the OIDC issuer name to be used in the responses.
- * @param issuer The OIDC issuer name to be used in the responses.
- */
- public void setIssuer(@Nonnull @NotEmpty final String issuer) {
- ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
- oidcIssuer = Constraint.isNotEmpty(issuer, "Issuer cannot be null!");
- }
-
- /** {@inheritDoc} */
- @Override
- protected void doInitialize() throws ComponentInitializationException {
- super.doInitialize();
-
- if (oidcIssuer == null) {
- throw new ComponentInitializationException("Issuer cannot be null");
- }
- }
-
- /** {@inheritDoc} */
- @Override
- protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
-
- if (!super.doPreExecute(profileRequestContext)) {
- return false;
- }
- if (profileRequestContext.getInboundMessageContext() == null) {
- log.debug("{} No inbound message context associated with this profile request", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX);
- return false;
- }
- final Object message = profileRequestContext.getInboundMessageContext().getMessage();
- if (message == null || !(message instanceof OIDCWebFingerRequest)) {
- log.debug("{} No inbound message associated with this profile request", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_MSG_CTX);
- return false;
- }
- request = (OIDCWebFingerRequest) message;
- return true;
- }
-
- /** {@inheritDoc} */
- @Override
- protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
- final HttpServletResponse servletResponse = getHttpServletResponse();
- final Link link = new OIDCWebFingerResponseLinkImpl(request.getRel(), oidcIssuer);
- final List<Link> links = new ArrayList<>();
- links.add(link);
- final OIDCWebFingerResponse response = new OIDCWebFingerResponseImpl(request.getResource(), links);
- servletResponse.setContentType("application/jrd+json");
- servletResponse.setCharacterEncoding("UTF-8");
- final Gson gson = new Gson();
- try {
- gson.toJson(gson.toJsonTree(response), gson.newJsonWriter(servletResponse.getWriter()));
- } catch (final IOException e) {
- log.error("{} Could not encode the JSON response to the servlet response", getLogPrefix(), e);
- return;
- }
-
- log.debug("{} WebFinger response successfully applied to the HTTP response", getLogPrefix());
- }
-}
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckWebFingerRel.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckWebFingerRel.java
deleted file mode 100644
index 23803d02..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckWebFingerRel.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.profile.impl;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.profile.action.ActionSupport;
-import org.opensaml.profile.action.EventIds;
-import org.opensaml.profile.context.ProfileRequestContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerRequest;
-import net.shibboleth.idp.plugin.oidc.op.profile.OidcEventIds;
-import net.shibboleth.idp.profile.AbstractProfileAction;
-import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
-
-/**
- * An action that verifies that the rel-parameter of the OIDC web finger request is as expected.
- */
-public class CheckWebFingerRel extends AbstractProfileAction {
-
- /** The OIDC-standard compliant value for 'rel'. */
- @Nonnull @NotEmpty public static final String OPENID_REL = "http://openid.net/specs/connect/1.0/issuer";
-
- /** Class logger. */
- @Nonnull private final Logger log = LoggerFactory.getLogger(CheckWebFingerRel.class);
-
- /** The OIDC WebFinger request. */
- @Nullable private OIDCWebFingerRequest request;
-
- /** {@inheritDoc} */
- @Override
- protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
-
- if (!super.doPreExecute(profileRequestContext)) {
- return false;
- }
- if (profileRequestContext.getInboundMessageContext() == null) {
- log.debug("{} No inbound message context associated with this profile request", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX);
- return false;
- }
- final Object message = profileRequestContext.getInboundMessageContext().getMessage();
- if (message == null || !(message instanceof OIDCWebFingerRequest)) {
- log.debug("{} No inbound message associated with this profile request", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_MSG_CTX);
- return false;
- }
- request = (OIDCWebFingerRequest) message;
- return true;
- }
-
- /** {@inheritDoc} */
- @Override
- protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
- if (!OPENID_REL.equals(request.getRel())) {
- log.warn("{} Unsupported rel in the WebFinger request message: {}", getLogPrefix(), request.getRel());
- ActionSupport.buildEvent(profileRequestContext, OidcEventIds.INVALID_WEBFINGER_REL);
- }
- }
-}
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckWebFingerResource.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckWebFingerResource.java
deleted file mode 100644
index 81e0241d..00000000
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckWebFingerResource.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You 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.idp.plugin.oidc.op.profile.impl;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.profile.action.ActionSupport;
-import org.opensaml.profile.action.EventIds;
-import org.opensaml.profile.context.ProfileRequestContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import net.shibboleth.idp.plugin.oidc.op.messaging.OIDCWebFingerRequest;
-import net.shibboleth.idp.profile.AbstractProfileAction;
-
-/**
- * A template for checking the OIDC web finger resource input. Currently no checks are performed.
- */
-public class CheckWebFingerResource extends AbstractProfileAction {
-
- /** Class logger. */
- @Nonnull private final Logger log = LoggerFactory.getLogger(CheckWebFingerResource.class);
-
- /** The OIDC WebFinger request. */
- @Nullable private OIDCWebFingerRequest request;
-
- /** {@inheritDoc} */
- @Override
- protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
-
- if (!super.doPreExecute(profileRequestContext)) {
- return false;
- }
- if (profileRequestContext.getInboundMessageContext() == null) {
- log.debug("{} No inbound message context associated with this profile request", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX);
- return false;
- }
- final Object message = profileRequestContext.getInboundMessageContext().getMessage();
- if (message == null || !(message instanceof OIDCWebFingerRequest)) {
- log.debug("{} No inbound message associated with this profile request", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_MSG_CTX);
- return false;
- }
- request = (OIDCWebFingerRequest) message;
- return true;
- }
-
- /** {@inheritDoc} */
- @Override
- protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
- final String resource = request.getResource();
- //TODO: check
- }
-}
diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/webfinger/webfinger-beans.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/webfinger/webfinger-beans.xml
deleted file mode 100644
index 439db226..00000000
--- a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/webfinger/webfinger-beans.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:c="http://www.springframework.org/schema/c" xmlns:context="http://www.springframework.org/schema/context"
- xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
- default-init-method="initialize" default-destroy-method="destroy">
-
- <!-- Name of the publish flow for audit -->
- <bean id="FlowAuditName" class="java.lang.String" c:_0="Webfinger" />
-
- <bean id="shibboleth.oidc.profileId" class="java.lang.String" c:_0="http://shibboleth.net/ns/profiles/oidc/webfinger" />
- <bean id="shibboleth.oidc.browserProfile" class="java.lang.Boolean" c:_0="false" />
-
- <bean id="DecodeMessage" class="org.opensaml.profile.action.impl.DecodeMessage"
- scope="prototype">
- <constructor-arg>
- <bean
- class="net.shibboleth.idp.plugin.oidc.op.decoding.impl.OIDCWebFingerRequestDecoder"
- scope="prototype" p:httpServletRequest-ref="shibboleth.HttpServletRequest" />
- </constructor-arg>
- </bean>
-
- <bean id="CheckWebFingerRel"
- class="net.shibboleth.idp.plugin.oidc.op.profile.impl.CheckWebFingerRel"
- scope="prototype" />
-
- <bean id="CheckWebFingerResource"
- class="net.shibboleth.idp.plugin.oidc.op.profile.impl.CheckWebFingerResource"
- scope="prototype" />
-
- <bean id="SetResponseStatusCodeFromEvent" class="net.shibboleth.idp.plugin.oidc.op.profile.impl.SetResponseStatusCodeFromEvent"
- scope="prototype" p:httpServletResponse-ref="shibboleth.HttpServletResponse">
- <property name="eventContextLookupStrategy">
- <bean class="net.shibboleth.idp.profile.context.navigate.WebFlowCurrentEventLookupFunction" />
- </property>
- <property name="mappedErrors">
- <map value-type="java.lang.Integer">
- <entry key="#{T(org.opensaml.profile.action.EventIds).UNABLE_TO_DECODE}" value="400" />
- </map>
- </property>
- </bean>
-
- <bean id="FormOutboundMessage" class="net.shibboleth.idp.plugin.oidc.op.profile.impl.BuildWebFingerResponse"
- scope="prototype" p:httpServletResponse-ref="shibboleth.HttpServletResponse"
- p:issuer="%{idp.oidc.issuer:%{idp.entityID}}"/>
-
- <bean id="shibboleth.oidc.PostResponseAuditExtractors"
- class="org.springframework.beans.factory.config.MapFactoryBean">
- <property name="sourceMap">
- <map>
- <entry>
- <key>
- <util:constant
- static-field="net.shibboleth.idp.plugin.oidc.op.audit.AuditFields.INBOUND_MESSAGE_CLASS" />
- </key>
- <bean parent="shibboleth.Functions.Constant" c:value="#{getObject('FlowAuditName')}" />
- </entry>
- </map>
- </property>
- </bean>
-
-</beans>
diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/webfinger/webfinger-flow.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/webfinger/webfinger-flow.xml
deleted file mode 100644
index 82ec7146..00000000
--- a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/webfinger/webfinger-flow.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<flow xmlns="http://www.springframework.org/schema/webflow"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
- parent="oidc/abstract">
-
- <action-state id="InitializeMandatoryContexts">
- <evaluate expression="InitializeProfileRequestContext" />
- <evaluate expression="'proceed'" />
- <transition on="proceed" to="DecodeMessage" />
- </action-state>
-
- <action-state id="DecodeMessage">
- <evaluate expression="DecodeMessage" />
- <evaluate expression="'proceed'" />
- <transition on="proceed" to="CheckRequestMessage" />
- </action-state>
-
- <action-state id="CheckRequestMessage">
- <evaluate expression="CheckWebFingerRel" />
- <evaluate expression="CheckWebFingerResource" />
- <evaluate expression="'proceed'" />
- <transition on="proceed" to="BuildResponseMessage" />
- </action-state>
-
- <action-state id="HandleError">
- <on-entry>
- <evaluate
- expression="opensamlProfileRequestContext.getSubcontext(T(net.shibboleth.idp.profile.context.SpringRequestContext), true).setRequestContext(flowRequestContext)" />
- <evaluate expression="LogEvent" />
- </on-entry>
- <evaluate expression="SetResponseStatusCodeFromEvent" />
- <evaluate expression="'proceed'" />
- <transition on="proceed" to="CommitResponse" />
- </action-state>
-
- <!-- end state after error display -->
- <end-state id="CommitResponse">
- <on-entry>
- <evaluate expression="RecordResponseComplete" />
- </on-entry>
- </end-state>
-
- <bean-import resource="webfinger-beans.xml" />
-
-</flow>
\ 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