[java-oidc-common] branch dev/JCOMOIDC-66 updated: Seperate OIDCSSO profile into a provider and relying party
Phil Smart
philip.smart at jisc.ac.uk
Fri Mar 24 16:56:38 UTC 2023
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch dev/JCOMOIDC-66
in repository java-oidc-common.
View the commit online:
http://git.shibboleth.net/view/?p=java-oidc-common.git;a=commit;h=eb974e69217d3efef0c4d862f88c42c2aa433b72
The following commit(s) were added to refs/heads/dev/JCOMOIDC-66 by this push:
new eb974e6 Seperate OIDCSSO profile into a provider and relying party
eb974e6 is described below
commit eb974e69217d3efef0c4d862f88c42c2aa433b72
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Mar 24 16:56:32 2023 +0000
Seperate OIDCSSO profile into a provider and relying party
---
...AuthenticationProviderProfileConfiguration.java | 3 +-
...enticationRelyingPartyProfileConfiguration.java | 3 +-
.../config/OIDCSSOProfileConfiguration.java | 11 +------
.../config/OIDCSSOProviderConfiguration.java | 34 ++++++++++++++++++++++
.../config/OIDCSSORelyingPartyConfiguration.java | 30 +++++++++++++++++++
.../OAuth2AuthorizationProfileConfiguration.java | 3 +-
.../config/OAuth2TokenProfileConfiguration.java | 4 +--
.../config/impl/AbstractOIDCSSOConfiguration.java | 5 ++--
.../oidc/profile/config/impl/TestInterfaces.java | 6 ++--
9 files changed, 78 insertions(+), 21 deletions(-)
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationProviderProfileConfiguration.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationProviderProfileConfiguration.java
index d82c31c..aa1daf9 100644
--- a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationProviderProfileConfiguration.java
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationProviderProfileConfiguration.java
@@ -38,7 +38,8 @@ import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
*/
public interface OIDCAuthenticationProviderProfileConfiguration extends OIDCAuthenticationProfileConfiguration,
OAuth2AuthorizationCodeProducingProfileConfiguration, AuthenticationProfileConfiguration,
- OverriddenIssuerProfileConfiguration, OAuth2TokenEndpointProfileConfiguration {
+ OverriddenIssuerProfileConfiguration, OAuth2TokenEndpointProfileConfiguration,
+ OIDCSSOProviderConfiguration {
/**
* Get whether all acr claim requests should be treated as Essential.
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationRelyingPartyProfileConfiguration.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationRelyingPartyProfileConfiguration.java
index 4240413..117416f 100644
--- a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationRelyingPartyProfileConfiguration.java
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCAuthenticationRelyingPartyProfileConfiguration.java
@@ -29,7 +29,8 @@ import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
*
* <p>This is specific to the role of the RelyingParty (RP).</p>
*/
-public interface OIDCAuthenticationRelyingPartyProfileConfiguration extends OIDCAuthenticationProfileConfiguration {
+public interface OIDCAuthenticationRelyingPartyProfileConfiguration extends OIDCAuthenticationProfileConfiguration,
+ OIDCSSORelyingPartyConfiguration {
/**
* Get the HTTP request method for the UserInfo request. Both GET and POST are supported.
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSOProfileConfiguration.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSOProfileConfiguration.java
index a6d4b5c..834cdc6 100644
--- a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSOProfileConfiguration.java
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSOProfileConfiguration.java
@@ -22,19 +22,10 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
-import net.shibboleth.idp.profile.config.AttributeResolvingProfileConfiguration;
-import net.shibboleth.idp.profile.config.OverriddenIssuerProfileConfiguration;
-import net.shibboleth.oidc.profile.oauth2.config.OAuth2AccessTokenProducingProfileConfiguration;
-import net.shibboleth.oidc.profile.oauth2.config.OAuth2ClientAuthenticableProfileConfiguration;
-import net.shibboleth.oidc.profile.oauth2.config.OAuth2RefreshTokenProducingProfileConfiguration;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
/** Profile configuration generic to all OIDC SSO profiles.*/
-public interface OIDCSSOProfileConfiguration extends OIDCTokenEncryptionProfileConfiguration,
- OIDCIDTokenProducingProfileConfiguration, OverriddenIssuerProfileConfiguration,
- OAuth2AccessTokenProducingProfileConfiguration,
- OAuth2RefreshTokenProducingProfileConfiguration, AttributeResolvingProfileConfiguration,
- OIDCFlowAwareProfileConfiguration, OAuth2ClientAuthenticableProfileConfiguration {
+public interface OIDCSSOProfileConfiguration extends OIDCProfileConfiguration {
/** ID for this profile configuration. */
@Nonnull @NotEmpty public static final String PROFILE_ID = "http://shibboleth.net/ns/profiles/oidc/sso/browser";
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSOProviderConfiguration.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSOProviderConfiguration.java
new file mode 100644
index 0000000..7880669
--- /dev/null
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSOProviderConfiguration.java
@@ -0,0 +1,34 @@
+/*
+ * 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.oidc.profile.config;
+
+import net.shibboleth.idp.profile.config.AttributeResolvingProfileConfiguration;
+import net.shibboleth.oidc.profile.oauth2.config.OAuth2AccessTokenProducingProfileConfiguration;
+import net.shibboleth.oidc.profile.oauth2.config.OAuth2ClientAuthenticableProfileConfiguration;
+import net.shibboleth.oidc.profile.oauth2.config.OAuth2RefreshTokenProducingProfileConfiguration;
+
+/**
+ * Profile configuration for an OIDC SSO Provider.
+ */
+public interface OIDCSSOProviderConfiguration extends OIDCTokenEncryptionProfileConfiguration,
+ OIDCIDTokenProducingProfileConfiguration, OAuth2AccessTokenProducingProfileConfiguration,
+ OAuth2RefreshTokenProducingProfileConfiguration, OIDCSSOProfileConfiguration,
+ AttributeResolvingProfileConfiguration, OIDCFlowAwareProfileConfiguration,
+ OAuth2ClientAuthenticableProfileConfiguration{
+
+}
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSORelyingPartyConfiguration.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSORelyingPartyConfiguration.java
new file mode 100644
index 0000000..e17d9f4
--- /dev/null
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/OIDCSSORelyingPartyConfiguration.java
@@ -0,0 +1,30 @@
+/*
+ * 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.oidc.profile.config;
+
+import net.shibboleth.idp.profile.config.OverriddenIssuerProfileConfiguration;
+import net.shibboleth.oidc.profile.oauth2.config.OAuth2ClientAuthenticableProfileConfiguration;
+
+/**
+ * Profile configuration for an OIDC SSO Client or Relying Party.
+ */
+public interface OIDCSSORelyingPartyConfiguration extends OIDCTokenEncryptionProfileConfiguration,
+ OverriddenIssuerProfileConfiguration, OIDCFlowAwareProfileConfiguration,
+ OAuth2ClientAuthenticableProfileConfiguration {
+
+}
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2AuthorizationProfileConfiguration.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2AuthorizationProfileConfiguration.java
index 388e980..cc46f73 100644
--- a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2AuthorizationProfileConfiguration.java
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2AuthorizationProfileConfiguration.java
@@ -24,7 +24,6 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
-import net.shibboleth.oidc.profile.config.OIDCSSOProfileConfiguration;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
@@ -36,7 +35,7 @@ import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
* <p>This is common to both Authorization Server and Client roles.</p>
*
*/
-public interface OAuth2AuthorizationProfileConfiguration extends OIDCSSOProfileConfiguration {
+public interface OAuth2AuthorizationProfileConfiguration {
/** ID for this profile configuration. */
@Nonnull @NotEmpty public static final String PROFILE_ID = "http://shibboleth.net/ns/profiles/oidc/sso/browser";
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2TokenProfileConfiguration.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2TokenProfileConfiguration.java
index 3808ce8..18f9e5f 100644
--- a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2TokenProfileConfiguration.java
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/oauth2/config/OAuth2TokenProfileConfiguration.java
@@ -26,7 +26,7 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
-import net.shibboleth.oidc.profile.config.OIDCSSOProfileConfiguration;
+import net.shibboleth.oidc.profile.config.OIDCSSOProviderConfiguration;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
@@ -35,7 +35,7 @@ import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
/**
* OIDC-aware OAuth 2.0 token endpoint profile configuration.
*/
-public interface OAuth2TokenProfileConfiguration extends OIDCSSOProfileConfiguration {
+public interface OAuth2TokenProfileConfiguration extends OIDCSSOProviderConfiguration {
/** ID for this profile configuration. */
@Nonnull @NotEmpty public static final String PROFILE_ID = "http://shibboleth.net/ns/profiles/oauth2/token";
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
index 10e774e..8c7dfd0 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
@@ -33,7 +33,8 @@ import org.opensaml.profile.context.ProfileRequestContext;
import com.google.common.base.Predicates;
-import net.shibboleth.oidc.profile.config.OIDCSSOProfileConfiguration;
+import net.shibboleth.oidc.profile.config.OIDCSSOProviderConfiguration;
+import net.shibboleth.oidc.profile.config.OIDCSSORelyingPartyConfiguration;
import net.shibboleth.oidc.profile.oauth2.config.impl.AbstractOAuth2FlowAwareProfileConfiguration;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
@@ -47,7 +48,7 @@ import net.shibboleth.utilities.java.support.primitive.StringSupport;
* Base class for profiles that support OIDC's concept of SSO, which spans multiple endpoints.
*/
public abstract class AbstractOIDCSSOConfiguration extends AbstractOAuth2FlowAwareProfileConfiguration
- implements OIDCSSOProfileConfiguration {
+ implements OIDCSSORelyingPartyConfiguration, OIDCSSOProviderConfiguration {
/** Lookup function to override issuer value. */
@Nonnull private Function<ProfileRequestContext,String> issuerLookupStrategy;
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/TestInterfaces.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/TestInterfaces.java
index 35d5fdf..67a1f46 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/TestInterfaces.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/TestInterfaces.java
@@ -7,12 +7,12 @@ import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
-import net.shibboleth.oidc.profile.config.OIDCAuthenticationProviderProfileConfiguration;
+import net.shibboleth.oidc.profile.config.OIDCUserInfoProfileConfiguration;
public class TestInterfaces {
public static void main(final String args[]) {
- final var concreteClass = new OIDCAuthorizationConfiguration();
+ final var concreteClass = new OIDCUserInfoConfiguration();
final Set<String> concreteNames = new HashSet<>();
for (final Method m: concreteClass.getClass().getMethods()) {
if (m.getName().startsWith("is") || m.getName().startsWith("get")) {
@@ -21,7 +21,7 @@ public class TestInterfaces {
}
}
final Set<String> interfaceNames = new HashSet<>();
- for (final Method m: OIDCAuthenticationProviderProfileConfiguration.class.getMethods()) {
+ for (final Method m: OIDCUserInfoProfileConfiguration.class.getMethods()) {
if (m.getName().startsWith("is") || m.getName().startsWith("get")) {
System.out.println("INT: "+m.getName());
interfaceNames.add(m.getName());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list