[java-idp-plugin-oidc-op-oidfed] branch main updated: Adapt into changes in oidfed-common-testing
Codeberg
noreply at shibboleth.net
Thu Sep 17 17:34:56 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-idp-plugin-oidc-op-oidfed.
View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-oidc-op-oidfed/commit/64f42c331c22fe75e79b3f5cb197443bd0a58ede
The following commit(s) were added to refs/heads/main by this push:
new 64f42c3 Adapt into changes in oidfed-common-testing
64f42c3 is described below
commit 64f42c331c22fe75e79b3f5cb197443bd0a58ede
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Thu Sep 17 19:42:05 2026 +0300
Adapt into changes in oidfed-common-testing
---
.../flow/oidfed/AbstractFederationFlowTest.java | 51 +++++++------------
.../AuthorizeFlowAutomaticRegistrationTest.java | 4 +-
.../flow/oidfed/EntityConfigurationFlowTest.java | 4 +-
.../profile/flow/oidfed/RegistrationFlowTest.java | 18 ++++---
.../profile/flow/oidfed/ResolveEntityFlowTest.java | 13 +++--
.../UserInfoFlowAutomaticRegistrationTest.java | 8 +--
.../EntityConfigurationMetadataCacheTest.java | 54 ++++++++++----------
.../cache/SignedKeysetMetadataCacheTest.java | 31 ++++++++----
.../SubordinateStatementMetadataCacheTest.java | 59 ++++++++++++----------
.../oidfed/cache/TrustChainMetadataCacheTest.java | 22 ++++----
10 files changed, 134 insertions(+), 130 deletions(-)
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java
index 68c1a50..482f0a6 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java
@@ -77,9 +77,8 @@ import com.nimbusds.openid.connect.sdk.rp.OIDCClientMetadata;
import net.minidev.json.JSONObject;
import net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest;
import net.shibboleth.oidfed.messaging.impl.ResolveEntityResponse;
-import net.shibboleth.oidfed.metadata.EntityStatement;
import net.shibboleth.oidfed.testing.TestFederationCredentials;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.logic.Constraint;
/**
@@ -122,6 +121,10 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
@Qualifier("shibboleth.oidc.NonBrowser.HttpClient")
protected HttpClient vanillaOidcHttpClient;
+ @Autowired
+ @Qualifier("shibboleth.oidfed.JWTPayloadJSONObjectMapper")
+ protected ObjectMapper payloadObjectMapper;
+
static {
trustedAnchorKey = TestFederationCredentials.trustAnchorKey();
trustedIntermediateKey = TestFederationCredentials.intermediateKey();
@@ -282,9 +285,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
if (crit != null) {
builder.claim("crit", crit);
}
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, leafKey, builder.build());
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, leafKey, builder.build()).serialize();
}
protected String rpEntityConfigurationUnmatchingKey(final String clientId,
@@ -297,9 +298,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("authority_hints", authorityHints == null || authorityHints.length == 0 ?
new String[] { anchorId } : authorityHints)
.build();
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, anchorKey, claimsSet);
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, anchorKey, claimsSet).serialize();
}
protected String trustMarkIssuerConfiguration(final String entityId, final String... authorityHints) {
@@ -312,9 +311,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("metadata", Map.of("federation_entity", Map.of("federation_trust_mark_endpoint",
trustMarkEndpoint, "federation_trust_mark_status_endpoint", trustMarkStatusEndpoint)))
.build();
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, trustMarkIssuerKey, claimsSet);
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, trustMarkIssuerKey, claimsSet).serialize();
}
protected String opEntityConfiguration(final String issuer, final String... authorityHints)
@@ -332,9 +329,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("authority_hints", authorityHints == null || authorityHints.length == 0 ?
new String[] { anchorId } : authorityHints)
.build();
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, leafKey, claimsSet);
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, leafKey, claimsSet).serialize();
}
protected String entityConfiguration(final String entityId, final Map<String, Object> metadata,
@@ -347,9 +342,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("authority_hints", authorityHints == null || authorityHints.length == 0 ?
new String[] { anchorId } : authorityHints)
.build();
- final EntityStatement<?> configuration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, leafKey, claimsSet);
- return configuration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, leafKey, claimsSet).serialize();
}
protected String trustedAnchorConfiguration() {
@@ -383,9 +376,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
if (trustMarkIssuers != null) {
builder.claim("trust_mark_issuers", trustMarkIssuers);
}
- final EntityStatement<?> anchorConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, signerKey, builder.build());
- return anchorConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, signerKey, builder.build()).serialize();
}
protected String intermediateConfiguration(final String intermediateId) {
@@ -401,9 +392,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
intermediateId + "/fetch")))
.claim("authority_hints", new String[] { anchorId })
.build();
- final EntityStatement<?> intermediateConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, signerKey, claimsSet);
- return intermediateConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, signerKey, claimsSet).serialize();
}
protected String subordinateStatement(final String issuer, final Map<String, Object> metadata) {
@@ -430,9 +419,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("metadata_policy_crit", metadataPolicyCrit)
.claim("crit", crit)
.build();
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, trustedAnchorKey, claimsSet);
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, trustedAnchorKey, claimsSet).serialize();
}
protected String rpSubordinateStatement(final String issuer, final JWK issuerKey, final JWK subjetKey,
@@ -444,9 +431,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("metadata", Map.of("openid_relying_party", new OIDCClientMetadata().toJSONObject()))
.claim("metadata_policy", rpPolicy)
.build();
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, issuerKey, claimsSet);
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, issuerKey, claimsSet).serialize();
}
protected String subordinateStatement(final String issuer, final JWK issuerKey, final JWK subjetKey,
@@ -459,9 +444,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("metadata_policy", rpPolicy)
.claim("constraints", constraints)
.build();
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, issuerKey, claimsSet);
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, issuerKey, claimsSet).serialize();
}
protected String rpResolveEntityResponse(final String clientId, final Map<String, Object> metadata) {
@@ -494,7 +477,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("metadata", metadata)
.claim("trust_marks", trustMarks)
.build();
- return TrustChainTestUtil.signedJwt(JWSAlgorithm.RS256, trustedAnchorKey,
+ return FederationJwtSupport.signedJwt(JWSAlgorithm.RS256, trustedAnchorKey,
ResolveEntityResponse.JWT_TYPE_HEADER.toString(), claimsSet).serialize();
}
protected String uniqueClientId() {
@@ -807,7 +790,7 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("trust_mark", trustMark)
.claim("status", status)
.build();
- return TrustChainTestUtil.signedJwt(JWSAlgorithm.RS256, signerKey,
+ return FederationJwtSupport.signedJwt(JWSAlgorithm.RS256, signerKey,
"trust-mark-status-response+jwt", claimsSet).serialize();
}
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java
index e015429..cbaaf12 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java
@@ -57,7 +57,7 @@ import net.shibboleth.idp.plugin.oidc.op.profile.flow.AuthorizeFlowTest;
import net.shibboleth.idp.plugin.oidc.op.profile.logic.DefaultPushedAuthorizationRequestUriSerializationFunction;
import net.shibboleth.idp.plugin.oidc.op.token.support.AuthorizeCodeClaimsSet;
import net.shibboleth.idp.session.SessionException;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.collection.Pair;
import net.shibboleth.shared.component.ComponentInitializationException;
@@ -163,7 +163,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
final JWTClaimsSet.Builder builder = new JWTClaimsSet.Builder().issuer(clientId).subject(clientId)
.issueTime(Date.from(Instant.now()))
.claim("keys", new JWKSet(rpKey).toJSONObject(true).get("keys"));
- final String signedKeyset = TrustChainTestUtil.signedJwt(
+ final String signedKeyset = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "jwk-set+jwt", builder.build()).serialize();
mapResponse(signedJwksUri, mockResponse(200, "application/jwk-set+jwt", signedKeyset));
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/EntityConfigurationFlowTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/EntityConfigurationFlowTest.java
index 090529d..c470270 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/EntityConfigurationFlowTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/EntityConfigurationFlowTest.java
@@ -48,7 +48,7 @@ import net.shibboleth.oidfed.metadata.EntityConfiguration;
import net.shibboleth.oidfed.metadata.cache.trustmark.DefaultTrustMarkFetchingStrategy;
import net.shibboleth.oidfed.metadata.impl.EntityConfigurationImpl;
import net.shibboleth.oidfed.metadata.payload.EntityConfigurationPayload;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.collection.CollectionSupport;
/**
@@ -72,7 +72,7 @@ public class EntityConfigurationFlowTest extends AbstractFederationFlowTest {
@Test
public void testOutputAndCaching() throws ParseException, IOException, InterruptedException {
- final String trustMark = TrustChainTestUtil.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey,
+ final String trustMark = FederationJwtSupport.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey,
dynamicTrustMarkIssuerId, issuer, dynamicTrustMarkType, Instant.now().plusSeconds(300)).serialize();
try {
mapResponse(entityConfigurationUrl(dynamicTrustMarkIssuerId),
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java
index 92ce2f8..fbfa99e 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java
@@ -39,6 +39,7 @@ import org.springframework.webflow.executor.FlowExecutionResult;
import org.testng.Assert;
import org.testng.annotations.Test;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.JWSAlgorithm;
import com.nimbusds.jose.jwk.JWK;
@@ -54,8 +55,9 @@ import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.shibboleth.oidc.metadata.impl.BaseStorageServiceClientInformationComponent;
import net.shibboleth.oidfed.messaging.impl.ExplicitClientRegistrationResponse;
-import net.shibboleth.oidfed.metadata.EntityStatement;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.metadata.EntityConfiguration;
+import net.shibboleth.oidfed.metadata.impl.EntityConfigurationImpl;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.collection.Pair;
@@ -505,10 +507,12 @@ public class RegistrationFlowTest extends AbstractFederationFlowTest {
final String expectedClientId) throws IOException, ParseException, net.minidev.json.parser.ParseException {
Assert.assertEquals(response.getHeader("Content-Type"),
ExplicitClientRegistrationResponse.HTTP_RESPONSE_CONTENT_TYPE.toString());
- final EntityStatement<?> entityStatement =
- TrustChainTestUtil.entityStatement(regResponse.getJWT());
+ final ObjectMapper objectMapper = payloadObjectMapper;
+ assert objectMapper != null;
+ final EntityConfiguration entityStatement = EntityConfigurationImpl.parse(
+ regResponse.getJWT(), objectMapper);
Assert.assertEquals(entityStatement.getIssuer(), issuer);
- Assert.assertEquals(entityStatement.getParsedPayload().getCustomClaims().get("authority_hints"),
+ Assert.assertEquals(entityStatement.getParsedPayload().getAuthorityHints(),
List.of(anchorId));
Assert.assertEquals(entityStatement.getParsedPayload().getCustomClaims().get("trust_anchor"), anchorId);
final OIDCClientInformation clientInfo = OIDCClientInformation.parse(
@@ -611,9 +615,7 @@ public class RegistrationFlowTest extends AbstractFederationFlowTest {
if (critical != null) {
builder.claim("crit", critical);
}
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, leafKey, builder.build());
- return rpConfiguration.getJwt().serialize();
+ return FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, leafKey, builder.build()).serialize();
}
}
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/ResolveEntityFlowTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/ResolveEntityFlowTest.java
index edf6771..c6bde81 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/ResolveEntityFlowTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/ResolveEntityFlowTest.java
@@ -30,6 +30,7 @@ import org.springframework.webflow.executor.FlowExecutionResult;
import org.testng.Assert;
import org.testng.annotations.Test;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.nimbusds.jose.JOSEObjectType;
import com.nimbusds.jose.JWSAlgorithm;
import com.nimbusds.jose.jwk.JWKSet;
@@ -42,7 +43,8 @@ import com.nimbusds.openid.connect.sdk.rp.OIDCClientMetadata;
import net.shibboleth.oidc.profile.messaging.JSONErrorResponse;
import net.shibboleth.oidfed.messaging.impl.ResolveEntityResponse;
import net.shibboleth.oidfed.metadata.EntityStatement;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.metadata.impl.SubordinateStatementImpl;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.collection.CollectionSupport;
import net.minidev.json.JSONObject;
@@ -117,7 +119,7 @@ public class ResolveEntityFlowTest extends AbstractFederationFlowTest {
public void testRPWithTrustedTrustAnchor_validTrustMark() throws Exception {
request.setMethod("GET");
final String clientId = uniqueClientId();
- final String trustMark = TrustChainTestUtil.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
+ final String trustMark = FederationJwtSupport.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
clientId, "https://example.org/email-allowing-trust-mark", Instant.now().plusSeconds(300)).serialize();
final OIDCClientMetadata metadata = new OIDCClientMetadata();
metadata.setRedirectionURI(new URI(redirectUri));
@@ -214,8 +216,11 @@ public class ResolveEntityFlowTest extends AbstractFederationFlowTest {
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("openid_provider", emptyOpMetadata(entityId).toJSONObject()))
.build();
- final EntityStatement<?> subordinateStatement =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, trustedAnchorKey, claimsSet);
+ final ObjectMapper objectMapper = payloadObjectMapper;
+ assert objectMapper != null;
+ final SignedJWT jwt = FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, trustedAnchorKey, claimsSet);
+ assert jwt != null;
+ final EntityStatement<?> subordinateStatement = SubordinateStatementImpl.parse(jwt, objectMapper);
try {
mapResponse(entityConfigurationUrl(entityId), mockResponse(opEntityConfiguration(entityId)));
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/UserInfoFlowAutomaticRegistrationTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/UserInfoFlowAutomaticRegistrationTest.java
index 4004944..d29b5e8 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/UserInfoFlowAutomaticRegistrationTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/UserInfoFlowAutomaticRegistrationTest.java
@@ -45,7 +45,7 @@ import net.shibboleth.idp.plugin.oidc.op.oidfed.support.ClaimsSetExtensionSuppor
import net.shibboleth.idp.plugin.oidc.op.profile.flow.UserInfoTest;
import net.shibboleth.idp.plugin.oidc.op.token.support.AccessTokenClaimsSet;
import net.shibboleth.idp.plugin.oidc.op.token.support.TokenClaimsSet;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.security.DataSealerException;
@@ -88,7 +88,7 @@ public class UserInfoFlowAutomaticRegistrationTest extends AbstractFederationFlo
public void testSuccess_extraClaimViaTrustMark() throws URISyntaxException, NoSuchAlgorithmException,
DataSealerException, ComponentInitializationException, IOException {
final String clientId = uniqueClientId();
- final String trustMark = TrustChainTestUtil.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
+ final String trustMark = FederationJwtSupport.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
clientId, "https://example.org/email-allowing-trust-mark", Instant.now().plusSeconds(300)).serialize();
final OIDCClientMetadata metadata = new OIDCClientMetadata();
metadata.setRedirectionURI(new URI(redirectUri));
@@ -145,7 +145,7 @@ public class UserInfoFlowAutomaticRegistrationTest extends AbstractFederationFlo
final OIDCClientMetadata metadata = new OIDCClientMetadata();
metadata.setRedirectionURI(URI.create(redirectUri));
metadata.setJWKSet(new JWKSet(rpKey.toPublicJWK()));
- final String trustMark = TrustChainTestUtil.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
+ final String trustMark = FederationJwtSupport.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
clientId, "https://example.org/email-allowing-trust-mark", Instant.now().plusSeconds(300)).serialize();
rpResolveEntityConfigureMockHttpClient(clientId, metadata, List.of(Map.of(
"trust_mark_type", "https://example.org/email-allowing-trust-mark",
@@ -179,7 +179,7 @@ public class UserInfoFlowAutomaticRegistrationTest extends AbstractFederationFlo
final OIDCClientMetadata metadata = new OIDCClientMetadata();
metadata.setRedirectionURI(URI.create(redirectUri));
metadata.setJWKSet(new JWKSet(rpKey.toPublicJWK()));
- final String trustMark = TrustChainTestUtil.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
+ final String trustMark = FederationJwtSupport.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
anchorId, "https://example.org/email-allowing-trust-mark", Instant.now().plusSeconds(300)).serialize();
rpResolveEntityConfigureMockHttpClient(clientId, metadata, List.of(Map.of(
"trust_mark_type", "https://example.org/email-allowing-trust-mark",
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/EntityConfigurationMetadataCacheTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/EntityConfigurationMetadataCacheTest.java
index b4c7829..96037f3 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/EntityConfigurationMetadataCacheTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/EntityConfigurationMetadataCacheTest.java
@@ -56,7 +56,7 @@ import net.shibboleth.oidfed.metadata.EntityConfiguration;
import net.shibboleth.oidfed.metadata.cache.ResponseContainerExpirationCriterion;
import net.shibboleth.oidfed.metadata.cache.SubjectEntityIDCriterion;
import net.shibboleth.oidfed.metadata.cache.configuration.EntityConfigurationContainer;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.resolver.CriteriaSet;
@@ -83,7 +83,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -113,7 +113,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("crit", List.of("default_crit"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -158,7 +158,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final SignedJWT signedJwt = TrustChainTestUtil.signedJwt(
+ final SignedJWT signedJwt = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build());
final JWEObject jwe = new JWEObject(new JWEHeader.Builder(JWEAlgorithm.RSA_OAEP_256, EncryptionMethod.A256GCM)
.contentType("JWT")
@@ -185,7 +185,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("crit", List.of("subordinate_crit"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -202,7 +202,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("crit", List.of("jwks"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -218,7 +218,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, anchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -234,7 +234,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -251,7 +251,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -267,7 +267,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -283,7 +283,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -299,7 +299,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -315,7 +315,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().minusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -330,7 +330,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.issueTime(Date.from(Instant.now()))
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -346,7 +346,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", Map.of("federation_entity", Collections.emptyMap()))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -367,7 +367,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.keyID(leafKey.getKeyID())
.customParam("trust_chain", "forbidden")
.build();
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, header, builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -388,7 +388,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.keyID(leafKey.getKeyID())
.customParam("peer_trust_chain", "forbidden")
.build();
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, header, builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -405,7 +405,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("authority_hints", CollectionSupport.emptyList())
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -422,7 +422,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("trust_anchor_hints", CollectionSupport.emptyList())
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -440,7 +440,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", metadata);
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -459,7 +459,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", metadata);
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -487,7 +487,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
public void testInvalidtTrustMark_nonMatchingType()
throws MetadataCacheException, UnsupportedOperationException, IOException, URISyntaxException {
final String entityId = uniqueClientId();
- final String trustMark = TrustChainTestUtil.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
+ final String trustMark = FederationJwtSupport.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
entityId, "https://example.org/email-allowing-trust-mark", Instant.now().plusSeconds(300)).serialize();
final JWTClaimsSet.Builder builder = new JWTClaimsSet.Builder().issuer(entityId).subject(entityId)
.issueTime(Date.from(Instant.now()))
@@ -497,7 +497,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
"trust_mark_type", "https://example.org/non-matching-type",
"trust_mark", trustMark)))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -514,7 +514,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("trust_mark_issuers", List.of(trustMarkIssuerId))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -534,7 +534,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("trust_mark_owners", Map.of("https://example.org/email-allowing-trust-mark", trustMarkOwner))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -553,7 +553,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("trust_mark_owners", Map.of("https://example.org/email-allowing-trust-mark", trustMarkOwner))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -572,7 +572,7 @@ public class EntityConfigurationMetadataCacheTest extends AbstractFederationFlow
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("trust_mark_owners", Map.of("https://example.org/email-allowing-trust-mark", trustMarkOwner))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SignedKeysetMetadataCacheTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SignedKeysetMetadataCacheTest.java
index e5ca68c..414643a 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SignedKeysetMetadataCacheTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SignedKeysetMetadataCacheTest.java
@@ -27,6 +27,8 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.testng.Assert;
import org.testng.annotations.Test;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.nimbusds.jose.JWSAlgorithm;
import com.nimbusds.jose.jwk.JWK;
import com.nimbusds.jose.jwk.JWKSet;
@@ -38,12 +40,12 @@ import net.shibboleth.oidc.metadata.cache.MetadataCacheException;
import net.shibboleth.oidfed.flow.AbstractFederationFlowTest;
import net.shibboleth.oidfed.flow.EntityConfigurationFlowTest;
import net.shibboleth.oidfed.metadata.EntityConfiguration;
-import net.shibboleth.oidfed.metadata.EntityStatement;
import net.shibboleth.oidfed.metadata.SignedKeyset;
import net.shibboleth.oidfed.metadata.cache.SubjectEntityStatementCriterion;
import net.shibboleth.oidfed.metadata.cache.keyset.SignedKeysetContainer;
import net.shibboleth.oidfed.metadata.cache.keyset.SubjectSignedKeysetUriCriterion;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.metadata.impl.EntityConfigurationImpl;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.resolver.CriteriaSet;
/**
@@ -71,7 +73,7 @@ public class SignedKeysetMetadataCacheTest extends AbstractFederationFlowTest {
final JWTClaimsSet.Builder builder = new JWTClaimsSet.Builder().issuer(entityId).subject(entityId)
.issueTime(Date.from(Instant.now()))
.claim("keys", new JWKSet(rpKey).toJSONObject(true).get("keys"));
- final String signedKeyset = TrustChainTestUtil.signedJwt(
+ final String signedKeyset = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "jwk-set+jwt", builder.build()).serialize();
mapResponse(signedJwksUri, mockResponse(200, "application/jwk-set+jwt", signedKeyset));
@@ -106,7 +108,7 @@ public class SignedKeysetMetadataCacheTest extends AbstractFederationFlowTest {
.issueTime(Date.from(Instant.now()))
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("keys", new JWKSet(rpKey).toJSONObject(true).get("keys"));
- final String signedKeyset = TrustChainTestUtil.signedJwt(
+ final String signedKeyset = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "jwk-set+jwt", builder.build()).serialize();
mapResponse(signedJwksUri, mockResponse(200, "application/jwk-set+jwt", signedKeyset));
@@ -141,7 +143,7 @@ public class SignedKeysetMetadataCacheTest extends AbstractFederationFlowTest {
.issueTime(Date.from(Instant.now()))
.expirationTime(Date.from(Instant.now().minusSeconds(300)))
.claim("keys", new JWKSet(rpKey).toJSONObject(true).get("keys"));
- final String signedKeyset = TrustChainTestUtil.signedJwt(
+ final String signedKeyset = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "jwk-set+jwt", builder.build()).serialize();
mapResponse(signedJwksUri, mockResponse(200, "application/jwk-set+jwt", signedKeyset));
@@ -160,7 +162,7 @@ public class SignedKeysetMetadataCacheTest extends AbstractFederationFlowTest {
.issueTime(Date.from(Instant.now()))
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("keys", new JWKSet(rpKey).toJSONObject(true).get("keys"));
- final String signedKeyset = TrustChainTestUtil.signedJwt(
+ final String signedKeyset = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(signedJwksUri, mockResponse(200, "application/jwk-set+jwt", signedKeyset));
@@ -179,7 +181,7 @@ public class SignedKeysetMetadataCacheTest extends AbstractFederationFlowTest {
.issueTime(Date.from(Instant.now()))
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("keys", new JWKSet(rpKey).toJSONObject(true).get("keys"));
- final String signedKeyset = TrustChainTestUtil.signedJwt(
+ final String signedKeyset = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "jwk-set+jwt", builder.build()).serialize();
mapResponse(signedJwksUri, mockResponse(200, "application/entity-statement+jwt", signedKeyset));
@@ -198,7 +200,7 @@ public class SignedKeysetMetadataCacheTest extends AbstractFederationFlowTest {
.issueTime(Date.from(Instant.now()))
.expirationTime(Date.from(Instant.now().minusSeconds(300)))
.claim("keys", new JWKSet(rpKey).toJSONObject(true).get("keys"));
- final String signedKeyset = TrustChainTestUtil.signedJwt(
+ final String signedKeyset = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, rpKey, "jwk-set+jwt", builder.build()).serialize();
mapResponse(signedJwksUri, mockResponse(200, "application/jwk-set+jwt", signedKeyset));
@@ -212,9 +214,16 @@ public class SignedKeysetMetadataCacheTest extends AbstractFederationFlowTest {
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("openid_relying_party", metadata.toJSONObject()))
.claim("authority_hints", new String[] { anchorId });
- final EntityStatement<?> rpConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, leafKey, builder.build());
- return (EntityConfiguration) rpConfiguration;
+ final var jwt = FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, leafKey, builder.build());
+ final ObjectMapper objectMapper = payloadObjectMapper;
+ assert objectMapper != null;
+
+ try {
+ return EntityConfigurationImpl.parse(jwt, objectMapper);
+ } catch (final JsonProcessingException e) {
+ Assert.fail("Could not parse entity configuration from the claims set", e);
+ }
+ return null;
}
protected void assertNoSignedKeyset(final String signedJwksUri, final EntityConfiguration entityConfiguration) {
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SubordinateStatementMetadataCacheTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SubordinateStatementMetadataCacheTest.java
index 18d9255..a26abd0 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SubordinateStatementMetadataCacheTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/SubordinateStatementMetadataCacheTest.java
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.testng.Assert;
import org.testng.annotations.Test;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.nimbusds.jose.EncryptionMethod;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.JOSEObjectType;
@@ -58,7 +59,8 @@ import net.shibboleth.oidfed.metadata.cache.IssuerEntityIDCriterion;
import net.shibboleth.oidfed.metadata.cache.ResponseContainerExpirationCriterion;
import net.shibboleth.oidfed.metadata.cache.SubjectEntityIDCriterion;
import net.shibboleth.oidfed.metadata.cache.subordinate.SubordinateStatementContainer;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.metadata.impl.EntityConfigurationImpl;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.resolver.CriteriaSet;
/**
@@ -84,7 +86,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -117,7 +119,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, intermediateKey, "entity-statement+jwt", builder.build()).serialize();
final JWTClaimsSet.Builder ecBuilder = new JWTClaimsSet.Builder().issuer(intermediateId).subject(intermediateId)
@@ -128,9 +130,12 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
"federation_fetch_endpoint", intermediateId + "/fetch",
"federation_fetch_endpoint_auth_methods", List.of("private_key_jwt"),
"endpoint_auth_signing_alg_values_supported", List.of("ES512"))));
- final EntityStatement<?> intermediateConfiguration =
- TrustChainTestUtil.entityStatement(JWSAlgorithm.RS256, intermediateKey, ecBuilder.build());
+ final var jwt = FederationJwtSupport.entityStatement(JWSAlgorithm.RS256, intermediateKey, ecBuilder.build());
+ final ObjectMapper objectMapper = payloadObjectMapper;
+ assert objectMapper != null;
+
+ final EntityStatement<?> intermediateConfiguration = EntityConfigurationImpl.parse(jwt, objectMapper);
mapResponse(entityConfigurationUrl(intermediateId), mockResponse(intermediateConfiguration.getJwt().serialize()));
// raw anchorFetchEndpoint URL as the request is POST
@@ -163,7 +168,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("crit", List.of("subordinate_crit"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -213,7 +218,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final SignedJWT signedJwt = TrustChainTestUtil.signedJwt(
+ final SignedJWT signedJwt = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build());
final JWEObject jwe = new JWEObject(new JWEHeader.Builder(JWEAlgorithm.RSA_OAEP_256, EncryptionMethod.A256GCM)
.contentType("JWT")
@@ -242,7 +247,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("crit", List.of("default_crit"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -261,7 +266,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("crit", List.of("jwks"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -279,7 +284,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -298,7 +303,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -316,7 +321,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -340,7 +345,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.keyID(trustedAnchorKey.getKeyID())
.customParam("trust_chain", "forbidden")
.build();
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, header, builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -364,7 +369,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.keyID(trustedAnchorKey.getKeyID())
.customParam("peer_trust_chain", "forbidden")
.build();
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, header, builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -383,7 +388,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -401,7 +406,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -419,7 +424,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().minusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -436,7 +441,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.issueTime(Date.from(Instant.now()))
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -455,7 +460,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("constraints", Map.of("max_path_length", "non_integer"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -474,7 +479,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("constraints", Map.of("naming_constraints", "not_map"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -493,7 +498,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("constraints", Map.of("allowed_entity_types", "not_list"))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -516,7 +521,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("constraints", constraints)
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -543,7 +548,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
public void testForbiddenClaim_trustMark()
throws MetadataCacheException, UnsupportedOperationException, IOException, URISyntaxException {
final String entityId = uniqueClientId();
- final String trustMark = TrustChainTestUtil.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
+ final String trustMark = FederationJwtSupport.trustMark(JWSAlgorithm.RS256, trustMarkIssuerKey, trustMarkIssuerId,
entityId, "https://example.org/email-allowing-trust-mark", Instant.now().plusSeconds(300)).serialize();
final JWTClaimsSet.Builder builder = new JWTClaimsSet.Builder().issuer(anchorId).subject(entityId)
.issueTime(Date.from(Instant.now()))
@@ -553,7 +558,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
"trust_mark_type", "https://example.org/email-allowing-trust-mark",
"trust_mark", trustMark)))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -572,7 +577,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("trust_mark_issuers", List.of(trustMarkIssuerId))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -594,7 +599,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("trust_mark_owners", Map.of("https://example.org/email-allowing-trust-mark", trustMarkOwner))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -612,7 +617,7 @@ public class SubordinateStatementMetadataCacheTest extends AbstractFederationFlo
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", Map.of("federation_entity", Collections.emptyMap()))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/TrustChainMetadataCacheTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/TrustChainMetadataCacheTest.java
index 08603e3..19b38f4 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/TrustChainMetadataCacheTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/cache/TrustChainMetadataCacheTest.java
@@ -39,7 +39,7 @@ import net.shibboleth.oidfed.metadata.cache.IssuerEntityIDCriterion;
import net.shibboleth.oidfed.metadata.cache.ResponseContainerExpirationCriterion;
import net.shibboleth.oidfed.metadata.cache.SubjectEntityIDCriterion;
import net.shibboleth.oidfed.metadata.cache.trustchain.TrustChainsContainer;
-import net.shibboleth.oidfed.testing.TrustChainTestUtil;
+import net.shibboleth.oidfed.testing.FederationJwtSupport;
import net.shibboleth.shared.resolver.CriteriaSet;
/**
@@ -67,7 +67,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()))
.claim("authority_hints", List.of(anchorId));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -77,7 +77,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder2.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
@@ -110,7 +110,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()))
.claim("authority_hints", List.of(anchorId));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -120,7 +120,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder2.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId),
@@ -154,7 +154,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()))
.claim("authority_hints", List.of(anchorId));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -164,7 +164,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, anchorKey, "entity-statement+jwt", builder2.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId),
@@ -197,7 +197,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()))
.claim("authority_hints", List.of(trustedIntermediateId));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -211,7 +211,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedIntermediateKey, "entity-statement+jwt", builder2.build()).serialize();
mapResponse(subordinateStatementUrl(trustedIntermediateId + "/fetch", entityId),
@@ -243,7 +243,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()))
.claim("crit", List.of("default_crit"))
.claim("authority_hints", List.of(anchorId));
- final String entityConfiguration = TrustChainTestUtil.signedJwt(
+ final String entityConfiguration = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, leafKey, "entity-statement+jwt", builder.build()).serialize();
mapResponse(entityConfigurationUrl(entityId), mockResponse(entityConfiguration));
@@ -253,7 +253,7 @@ public class TrustChainMetadataCacheTest extends AbstractFederationFlowTest {
.expirationTime(Date.from(Instant.now().plusSeconds(300)))
.claim("jwks", new JWKSet(leafKey).toJSONObject(true))
.claim("metadata", Map.of("federation_entity", Collections.emptyMap()));
- final String subordinateStatement = TrustChainTestUtil.signedJwt(
+ final String subordinateStatement = FederationJwtSupport.signedJwt(
JWSAlgorithm.RS256, trustedAnchorKey, "entity-statement+jwt", builder2.build()).serialize();
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list