[java-identity-provider] branch main updated: Remove "legacy" CredentialResolvers unused by IdP.
Scott Cantor
cantor.2 at osu.edu
Tue Feb 14 16:38:25 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=4ff0b73ecd9ba8af2ee3e5fc76175ff2be96e99f
The following commit(s) were added to refs/heads/main by this push:
new 4ff0b73ec Remove "legacy" CredentialResolvers unused by IdP.
4ff0b73ec is described below
commit 4ff0b73ecd9ba8af2ee3e5fc76175ff2be96e99f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 14 11:38:21 2023 -0500
Remove "legacy" CredentialResolvers unused by IdP.
---
.../impl/EncryptionCredentialsResolver.java | 98 ----------------------
.../impl/SigningCredentialsResolver.java | 98 ----------------------
2 files changed, 196 deletions(-)
diff --git a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/relyingparty/impl/EncryptionCredentialsResolver.java b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/relyingparty/impl/EncryptionCredentialsResolver.java
deleted file mode 100644
index 98748ed3d..000000000
--- a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/relyingparty/impl/EncryptionCredentialsResolver.java
+++ /dev/null
@@ -1,98 +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.profile.relyingparty.impl;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.security.credential.Credential;
-import org.opensaml.security.credential.CredentialResolver;
-import org.slf4j.Logger;
-
-import net.shibboleth.profile.relyingparty.RelyingPartyConfigurationResolver;
-import net.shibboleth.shared.annotation.constraint.NotEmpty;
-import net.shibboleth.shared.collection.CollectionSupport;
-import net.shibboleth.shared.component.IdentifiableComponent;
-import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.primitive.LoggerFactory;
-import net.shibboleth.shared.primitive.StringSupport;
-import net.shibboleth.shared.resolver.CriteriaSet;
-import net.shibboleth.shared.resolver.ResolverException;
-import net.shibboleth.shared.service.ServiceException;
-import net.shibboleth.shared.service.ServiceableComponent;
-import net.shibboleth.shared.spring.service.ReloadableSpringService;
-
-/**
- * Credential resolver whose purpose is to resolve configured IdP encryption credentials.
- */
-public class EncryptionCredentialsResolver implements CredentialResolver, IdentifiableComponent {
-
- /** Logger. */
- @Nonnull private Logger log = LoggerFactory.getLogger(EncryptionCredentialsResolver.class);
-
- /** The reloading resolver which is the source of the credentials. */
- @Nonnull private ReloadableSpringService<RelyingPartyConfigurationResolver> service;
-
- /** Component ID. */
- @Nullable private String id;
-
- /**
- * Constructor.
- *
- * @param resolverService the Spring service exposing the relying party configuration service
- */
- public EncryptionCredentialsResolver(
- @Nonnull final ReloadableSpringService<RelyingPartyConfigurationResolver> resolverService) {
- service = Constraint.isNotNull(resolverService,
- "ReloadableSpringService for RelyingPartyConfigurationResolver cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nullable public String getId() {
- return id;
- }
-
- /** {@inheritDoc} */
- public void setId(@Nonnull @NotEmpty final String componentId) {
- id = Constraint.isNotNull(StringSupport.trimOrNull(componentId), "Component ID can not be null or empty");
- }
-
- /** {@inheritDoc} */
- @Nullable public Credential resolveSingle(@Nullable final CriteriaSet criteriaSet) throws ResolverException {
- final Iterable<Credential> creds = resolve(criteriaSet);
- if (creds.iterator().hasNext()) {
- return creds.iterator().next();
- }
- return null;
- }
-
- /** {@inheritDoc} */
- @Nonnull public Iterable<Credential> resolve(@Nullable final CriteriaSet criteria)
- throws ResolverException {
- try(final ServiceableComponent<RelyingPartyConfigurationResolver> component = service.getServiceableComponent()) {
- final RelyingPartyConfigurationResolver resolver = component.getComponent();
- log.trace("Saw expected instance of DefaultRelyingPartyConfigurationResolver");
- return resolver.getEncryptionCredentials();
- } catch (final ServiceException e) {
- log.error("EncryptionCredentialsResolver '{}': Invalid RelyingPartyResolver configuration", getId(), e);
- }
-
- return CollectionSupport.emptyList();
- }
-
-}
\ No newline at end of file
diff --git a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/relyingparty/impl/SigningCredentialsResolver.java b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/relyingparty/impl/SigningCredentialsResolver.java
deleted file mode 100644
index 5ce898c5e..000000000
--- a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/relyingparty/impl/SigningCredentialsResolver.java
+++ /dev/null
@@ -1,98 +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.profile.relyingparty.impl;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.security.credential.Credential;
-import org.opensaml.security.credential.CredentialResolver;
-import org.slf4j.Logger;
-
-import net.shibboleth.profile.relyingparty.RelyingPartyConfigurationResolver;
-import net.shibboleth.shared.annotation.constraint.NotEmpty;
-import net.shibboleth.shared.collection.CollectionSupport;
-import net.shibboleth.shared.component.IdentifiableComponent;
-import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.primitive.LoggerFactory;
-import net.shibboleth.shared.primitive.StringSupport;
-import net.shibboleth.shared.resolver.CriteriaSet;
-import net.shibboleth.shared.resolver.ResolverException;
-import net.shibboleth.shared.service.ServiceException;
-import net.shibboleth.shared.service.ServiceableComponent;
-import net.shibboleth.shared.spring.service.ReloadableSpringService;
-
-/**
- * Credential resolver whose purpose is to resolve configured IdP signing credentials.
- */
-public class SigningCredentialsResolver implements CredentialResolver, IdentifiableComponent {
-
- /** Logger. */
- @Nonnull private Logger log = LoggerFactory.getLogger(SigningCredentialsResolver.class);
-
- /** The reloading resolver which is the source of the credentials. */
- @Nonnull private ReloadableSpringService<RelyingPartyConfigurationResolver> service;
-
- /** Component ID. */
- @Nullable private String id;
-
- /**
- * Constructor.
- *
- * @param resolverService the Spring service exposing the relying party configuration service
- */
- public SigningCredentialsResolver(
- @Nonnull final ReloadableSpringService<RelyingPartyConfigurationResolver> resolverService) {
- service = Constraint.isNotNull(resolverService,
- "ReloadableSpringService for RelyingPartyConfigurationResolver cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nullable public String getId() {
- return id;
- }
-
- /** {@inheritDoc} */
- public void setId(@Nonnull @NotEmpty final String componentId) {
- id = Constraint.isNotNull(StringSupport.trimOrNull(componentId), "Component ID can not be null or empty");
- }
-
- /** {@inheritDoc} */
- @Nullable public Credential resolveSingle(@Nullable final CriteriaSet criteriaSet) throws ResolverException {
- final Iterable<Credential> creds = resolve(criteriaSet);
- if (creds.iterator().hasNext()) {
- return creds.iterator().next();
- }
- return null;
- }
-
- /** {@inheritDoc} */
- @Nonnull public Iterable<Credential> resolve(@Nullable final CriteriaSet criteria)
- throws ResolverException {
-
- try (final ServiceableComponent<RelyingPartyConfigurationResolver> component = service.getServiceableComponent()) {
- final RelyingPartyConfigurationResolver resolver = component.getComponent();
- return resolver.getSigningCredentials();
- } catch (final ServiceException e) {
- log.error("SigningCredentialsResolver '{}': Invalid RelyingPartyResolver configuration", getId(), e);
- }
-
- return CollectionSupport.emptyList();
- }
-
-}
\ 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