Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: newly added eddsa cause exception #727

Merged
merged 2 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public enum SignatureAlgorithm {
PS384(SignatureAlgorithm.DEF_PS384, AlgorithmFamily.RSA, SignatureAlgorithm.DEF_SHA384WITHRSAANDMGF1, JWSAlgorithm.PS384),
PS512(SignatureAlgorithm.DEF_PS512, AlgorithmFamily.RSA, SignatureAlgorithm.DEF_SHA512WITHRSAANDMGF1, JWSAlgorithm.PS512),

EDDSA(SignatureAlgorithm.DEF_EDDDSA, AlgorithmFamily.ED, SignatureAlgorithm.DEF_EDDDSA, EllipticEdvardsCurve.ED_25519, JWSAlgorithm.EdDSA);
EDDSA(SignatureAlgorithm.DEF_EDDDSA, AlgorithmFamily.ED, SignatureAlgorithm.DEF_ED25519, EllipticEdvardsCurve.ED_25519, JWSAlgorithm.EdDSA);

public static final String DEF_HS256 = "HS256";
public static final String DEF_HS384 = "HS384";
Expand All @@ -70,6 +70,7 @@ public enum SignatureAlgorithm {
public static final String DEF_PS384 = "PS384";
public static final String DEF_PS512 = "PS512";

public static final String DEF_ED25519 = "Ed25519";
public static final String DEF_EDDDSA = "EdDSA";

public static final String DEF_HMACSHA256 = "HMACSHA256";
Expand Down
2 changes: 1 addition & 1 deletion jans-linux-setup/setup_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def progress(self, service_name, msg, incr=False):

# OpenID key generation default setting
self.default_openid_jks_dn_name = 'CN=Jans Auth CA Certificates'
self.default_sig_key_algs = 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512 EdDSA'
self.default_sig_key_algs = 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512'
self.default_enc_key_algs = 'RSA1_5 RSA-OAEP ECDH-ES'
self.default_key_expiration = 365

Expand Down
2 changes: 1 addition & 1 deletion jans-linux-setup/setup_app/installers/jans_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def generate_configuration(self):
Config.encoded_admin_password = self.ldap_encode(Config.admin_password)

self.logIt("Generating OAuth openid keys", pbar=self.service_name)
sig_keys = 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512 EdDSA'
sig_keys = 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512'
enc_keys = 'RSA1_5 RSA-OAEP ECDH-ES'
jwks = self.gen_openid_jwks_jks_keys(self.oxauth_openid_jks_fn, Config.oxauth_openid_jks_pass, key_expiration=2, key_algs=sig_keys, enc_keys=enc_keys)
self.write_openid_keys(self.oxauth_openid_jwks_fn, jwks)
Expand Down
4 changes: 2 additions & 2 deletions jans-linux-setup/static/scripts/key_regeneration.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
oxauth_keys_json_fn = 'jans-keys.json'

algs_for_versions = {
'1.0.0': {'sig_keys': 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512 EdDSA', 'enc_keys': 'RSA1_5 RSA-OAEP ECDH-ES'},
'1.0.0': {'sig_keys': 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512', 'enc_keys': 'RSA1_5 RSA-OAEP ECDH-ES'},
}

sig_keys = 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512 EdDSA'
sig_keys = 'RS256 RS384 RS512 ES256 ES256K ES384 ES512 PS256 PS384 PS512'
enc_keys = 'RSA1_5 RSA-OAEP ECDH-ES'


Expand Down