@@ -783,7 +783,7 @@ async def test_refresh_token_invalid(test_client, auth_httpx_mock: HTTPXMock):
783783
784784 new_auth_settings = AuthSettings (
785785 token_issuer = "https://iam-auth.web.cern.ch/" ,
786- token_allowed_algorithms = ["EdDSA " , "RS256 " ],
786+ token_allowed_algorithms = ["RS256 " , "Ed25519 " ],
787787 token_keystore = json .dumps (KeySet (keys = [key ]).as_dict (private = True )),
788788 state_key = Fernet .generate_key (),
789789 allowed_redirects = [
@@ -833,34 +833,34 @@ async def test_keystore(test_client):
833833 "kid" : uuid7 ().hex ,
834834 },
835835 )
836- eddsa_key = OKPKey .generate_key (
836+ ed25519_key = OKPKey .generate_key (
837837 "Ed25519" ,
838838 {
839839 "key_ops" : ["sign" , "verify" ],
840- "alg" : "EdDSA " ,
840+ "alg" : "Ed25519 " ,
841841 "kid" : uuid7 ().hex ,
842842 },
843843 )
844844
845- # Generate the keystore with eddsa key only first
846- jwks = KeySet (keys = [eddsa_key ])
845+ # Generate the keystore with ed25519 key only first
846+ jwks = KeySet (keys = [ed25519_key ])
847847
848848 # Generate the keystore with rsa key only first
849849 auth_settings = AuthSettings (
850850 token_issuer = issuer ,
851- token_allowed_algorithms = ["RS256" ], # We purposefully remove EdDSA
851+ token_allowed_algorithms = ["RS256" ], # We purposefully remove Ed25519
852852 token_keystore = json .dumps (jwks .as_dict (private = True )),
853853 state_key = state_key ,
854854 allowed_redirects = allowed_redirects ,
855855 )
856856
857857 # Encode/Decode with the keystore: should not work
858- # because EdDSA is not part of the allowed algorithms
858+ # because Ed25519 is not part of the allowed algorithms
859859 with pytest .raises (UnsupportedAlgorithmError ):
860860 token = create_token (payload , auth_settings )
861861
862- # Add EdDSA to the allowed algorithms
863- auth_settings .token_allowed_algorithms .append ("EdDSA " )
862+ # Add Ed25519 to the allowed algorithms
863+ auth_settings .token_allowed_algorithms .append ("Ed25519 " )
864864
865865 # Encode/Decode with the keystore: should work
866866 token = create_token (payload , auth_settings )
@@ -871,7 +871,10 @@ async def test_keystore(test_client):
871871
872872 auth_settings = AuthSettings (
873873 token_issuer = issuer ,
874- token_allowed_algorithms = ["RS256" , "EdDSA" ], # We purposefully remove EdDSA
874+ token_allowed_algorithms = [
875+ "RS256" ,
876+ "Ed25519" ,
877+ ],
875878 token_keystore = json .dumps (jwks .as_dict (private = True )),
876879 state_key = state_key ,
877880 allowed_redirects = allowed_redirects ,
@@ -882,7 +885,7 @@ async def test_keystore(test_client):
882885 await verify_dirac_refresh_token (token , auth_settings )
883886
884887 # Remove 'sign' operation from the RSA key:
885- # should still work because eddsa_key is still there
888+ # should still work because ed25519_key is still there
886889 auth_settings .token_keystore .jwks .keys [1 ].get ("key_ops" ).remove ("sign" )
887890 token = create_token (payload , auth_settings )
888891 await verify_dirac_refresh_token (token , auth_settings )
0 commit comments