[java-idp-oidc] branch main updated: Include ES384 and ES512 compatible signing keys for testing.
Henri Mikkonen
henri.mikkonen at iki.fi
Fri Feb 17 12:53:08 UTC 2023
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-idp-oidc.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=bba5f232a22b1f18e8b53acc7b46e1aded7dbcf7
The following commit(s) were added to refs/heads/main by this push:
new bba5f232 Include ES384 and ES512 compatible signing keys for testing.
bba5f232 is described below
commit bba5f232a22b1f18e8b53acc7b46e1aded7dbcf7
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Fri Feb 17 14:52:25 2023 +0200
Include ES384 and ES512 compatible signing keys for testing.
The previously existing idp-signing-es.jwk is compatible for ES256 only.
---
.../idp/plugin/oidc/op/profile/flow/KeySetFlowTest.java | 8 +++++++-
.../src/test/resources/conf/oidc-credentials.xml | 8 ++++++++
.../src/test/resources/credentials/idp-signing-es384.jwk | 3 ++-
.../src/test/resources/credentials/idp-signing-es521.jwk | 1 +
4 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/KeySetFlowTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/KeySetFlowTest.java
index 51142c69..daac458d 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/KeySetFlowTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/KeySetFlowTest.java
@@ -43,6 +43,8 @@ public class KeySetFlowTest extends AbstractOidcFlowTest {
Resource rsaSigKey = new FileSystemResource("src/test/resources/credentials/idp-signing-rs.jwk");
Resource rsaEncKey = new FileSystemResource("src/test/resources/credentials/idp-encryption-rsa.jwk");
Resource ecSigKey = new FileSystemResource("src/test/resources/credentials/idp-signing-es.jwk");
+ Resource ec384SigKey = new FileSystemResource("src/test/resources/credentials/idp-signing-es384.jwk");
+ Resource ec512SigKey = new FileSystemResource("src/test/resources/credentials/idp-signing-es521.jwk");
public KeySetFlowTest() {
super(FLOW_ID);
@@ -56,13 +58,17 @@ public class KeySetFlowTest extends AbstractOidcFlowTest {
final JWKSet jwkSet = JWKSet.parse(response.toHTTPResponse().getContent());
final List<JWK> keys = jwkSet.getKeys();
Assert.assertNotNull(keys);
- Assert.assertEquals(keys.size(), 3);
+ Assert.assertEquals(keys.size(), 5);
final JWK rsaSigJwk = JWK.parse(IOUtils.toString(rsaSigKey.getInputStream(), "UTF-8"));
Assert.assertTrue(listContainsPublicJwk(keys, rsaSigJwk));
final JWK rsaEncJwk = JWK.parse(IOUtils.toString(rsaEncKey.getInputStream(), "UTF-8"));
Assert.assertTrue(listContainsPublicJwk(keys, rsaEncJwk));
final JWK ecSigJwk = JWK.parse(IOUtils.toString(ecSigKey.getInputStream(), "UTF-8"));
Assert.assertTrue(listContainsPublicJwk(keys, ecSigJwk));
+ final JWK ec384SigJwk = JWK.parse(IOUtils.toString(ec384SigKey.getInputStream(), "UTF-8"));
+ Assert.assertTrue(listContainsPublicJwk(keys, ec384SigJwk));
+ final JWK ec512SigJwk = JWK.parse(IOUtils.toString(ec512SigKey.getInputStream(), "UTF-8"));
+ Assert.assertTrue(listContainsPublicJwk(keys, ec512SigJwk));
}
protected boolean listContainsPublicJwk(final List<JWK> list, final JWK jwk) {
diff --git a/idp-oidc-extension-impl/src/test/resources/conf/oidc-credentials.xml b/idp-oidc-extension-impl/src/test/resources/conf/oidc-credentials.xml
index 2bbb06e6..e72a019f 100644
--- a/idp-oidc-extension-impl/src/test/resources/conf/oidc-credentials.xml
+++ b/idp-oidc-extension-impl/src/test/resources/conf/oidc-credentials.xml
@@ -17,6 +17,12 @@
<bean id="shibboleth.oidc.DefaultESSigningCredential" parent="shibboleth.JWKCredential"
p:resource="%{idp.signing.oidc.es.key}" />
+ <bean id="shibboleth.oidc.DefaultES384SigningCredential" parent="shibboleth.JWKCredential"
+ p:resource="/credentials/idp-signing-es384.jwk" />
+
+ <bean id="shibboleth.oidc.DefaultES512SigningCredential" parent="shibboleth.JWKCredential"
+ p:resource="/credentials/idp-signing-es521.jwk" />
+
<bean id="shibboleth.oidc.DefaultRSAEncryptionCredential" parent="shibboleth.JWKCredential"
p:resource="%{idp.signing.oidc.rsa.enc.key}" />
@@ -27,6 +33,8 @@
<util:list id="shibboleth.oidc.SigningCredentials">
<ref bean="shibboleth.oidc.DefaultRSSigningCredential" />
<ref bean="shibboleth.oidc.DefaultESSigningCredential" />
+ <ref bean="shibboleth.oidc.DefaultES384SigningCredential" />
+ <ref bean="shibboleth.oidc.DefaultES512SigningCredential" />
</util:list>
<!--
diff --git a/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es384.jwk b/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es384.jwk
index afd964e3..5285c610 100644
--- a/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es384.jwk
+++ b/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es384.jwk
@@ -3,6 +3,7 @@
"d": "e65hCxxbNq5gubmkgZD73A1cDf_GfGzkl4KZtbRg0GxAktztyDg4pI4bcxXaUNOb",
"use": "sig",
"crv": "P-384",
+ "kid": "testkeyES384",
"x": "uVsAjiFw4Hv0Kcwl2532baUKPTzDht2966ar_pJ8ZdAzquFwJPdRjCfpbkqZUi46",
"y": "yp3W3Cmc1QQptLC3s072Iy69l1ubx_WSFRivMYqCpK4Ec89HKvYh3mTKcfjHvk2l"
-}
\ No newline at end of file
+}
diff --git a/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es521.jwk b/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es521.jwk
index 8e0dad54..821ac757 100644
--- a/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es521.jwk
+++ b/idp-oidc-extension-impl/src/test/resources/credentials/idp-signing-es521.jwk
@@ -3,6 +3,7 @@
"d": "ADaJK1sgPtlu4xAFGmb8scq8XGujamVjP3z7Xr4xErwuurSynn8sNtZKX8SfoId9syS27VLFHe12CbeBR6nbReFv",
"use": "sig",
"crv": "P-521",
+ "kid": "testkeyES512",
"x": "AKObj9VTXWndDB7RC9dqSEkEsCqYgOHxq9AgvlDA8XBKxPzp39XrnBD0CMFy0C1HFvoiFKh9lPXJewkkruAOLW-6",
"y": "AMG6cRDBekWfD8imLDkBCmm-mtI16mFbifxZ06bgI5GwdyRTIMYUaBizmOzRK038Am4h6EjF8RCFr7383iKcqGZt"
}
\ 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