[java-idp-plugin-oidc-rp] branch main updated: JOIDCRP-56 - map OIDC ACRs to SAML authnContexts in proxied authentication?
Phil Smart
philip.smart at jisc.ac.uk
Fri Feb 23 10:08:45 UTC 2024
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch main
in repository java-idp-plugin-oidc-rp.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-oidc-rp.git;a=commit;h=8f482aa0e0a69ffeefc6687caa9c6f19c21dedba
The following commit(s) were added to refs/heads/main by this push:
new 8f482aa JOIDCRP-56 - map OIDC ACRs to SAML authnContexts in proxied authentication?
8f482aa is described below
commit 8f482aa0e0a69ffeefc6687caa9c6f19c21dedba
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Feb 23 10:08:43 2024 +0000
JOIDCRP-56 - map OIDC ACRs to SAML authnContexts in proxied
authentication?
- Removed Principal type downcasting in add ACRs handler
https://shibboleth.atlassian.net/browse/JOIDCRP-56
---
.../impl/AddAuthenticationContextClassReferencesHandler.java | 4 ----
.../impl/AddAuthenticationContextClassReferencesHandlerTest.java | 7 +++++--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java
index d8c1645..b463eb3 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandler.java
@@ -27,7 +27,6 @@ import org.slf4j.Logger;
import com.nimbusds.openid.connect.sdk.claims.ACR;
-import net.shibboleth.oidc.authn.principal.AuthenticationContextClassReferencePrincipal;
import net.shibboleth.oidc.profile.config.navigate.ProxyAwareDefaultOIDCAuthenticationContextClassRequestLookupFunction;
import net.shibboleth.shared.primitive.LoggerFactory;
@@ -67,7 +66,6 @@ public class AddAuthenticationContextClassReferencesHandler
@Nullable private List<ACR> buildRequestedAuthnContext(
@Nullable final ProfileRequestContext profileRequestContext) {
- // RequestedAuthnContext also based on profile configuration.
final List<Principal> principals = getProfileConfiguration()
.getDefaultAuthenticationMethods(profileRequestContext);
if (principals.isEmpty()) {
@@ -75,8 +73,6 @@ public class AddAuthenticationContextClassReferencesHandler
}
return principals.stream()
- .filter(AuthenticationContextClassReferencePrincipal.class::isInstance)
- .map(AuthenticationContextClassReferencePrincipal.class::cast)
.map(p -> new ACR(p.getName())).toList();
}
diff --git a/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandlerTest.java b/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandlerTest.java
index aabdb5f..447aba3 100644
--- a/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandlerTest.java
+++ b/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/impl/AddAuthenticationContextClassReferencesHandlerTest.java
@@ -23,6 +23,7 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractOIDCTest;
+import net.shibboleth.idp.saml.authn.principal.AuthenticationMethodPrincipal;
import net.shibboleth.oidc.authn.principal.AuthenticationContextClassReferencePrincipal;
import net.shibboleth.oidc.profile.config.impl.DefaultOIDCAuthorizationConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
@@ -56,7 +57,8 @@ public class AddAuthenticationContextClassReferencesHandlerTest extends Abstrac
oidcAuthzConfig.setDefaultAuthenticationMethods(List.of(
new AuthenticationContextClassReferencePrincipal("test-value-1"),
new AuthenticationContextClassReferencePrincipal("test-value-2"),
- new AuthenticationContextClassReferencePrincipal("test-value-3")));
+ new AuthenticationContextClassReferencePrincipal("test-value-3"),
+ new AuthenticationMethodPrincipal("amrMethod")));
}
@@ -71,10 +73,11 @@ public class AddAuthenticationContextClassReferencesHandlerTest extends Abstrac
final var outboundMsgCtx = getOutboundMessageContextFailIfNull(prc);
handler.invoke(outboundMsgCtx);
- assertEquals(authnRequest.getAcrs().size(),3);
+ assertEquals(authnRequest.getAcrs().size(),4);
assertEquals(authnRequest.getAcrs().get(0).getValue(),"test-value-1");
assertEquals(authnRequest.getAcrs().get(1).getValue(),"test-value-2");
assertEquals(authnRequest.getAcrs().get(2).getValue(),"test-value-3");
+ assertEquals(authnRequest.getAcrs().get(3).getValue(),"amrMethod");
}
/** Test no principals are returned.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list