@@ -65,33 +65,35 @@ def setup(self):
65
65
self .bob_keyjar ["Bob" ] = self .bob_keyjar ["" ]
66
66
67
67
# To Alice's keyjar add Bob's public keys
68
- self .alice_keyjar .import_jwks (self .bob_keyjar .export_jwks (issuer = "Bob" ), "Bob" )
68
+ self .alice_keyjar .import_jwks (self .bob_keyjar .export_jwks (issuer_id = "Bob" ), "Bob" )
69
69
70
70
# To Bob's keyjar add Alice's public keys
71
- self .bob_keyjar .import_jwks (self .alice_keyjar .export_jwks (issuer = "Alice" ), "Alice" )
71
+ self .bob_keyjar .import_jwks (self .alice_keyjar .export_jwks (issuer_id = "Alice" ), "Alice" )
72
72
73
73
_jws = JWS ('{"aud": "Bob", "iss": "Alice"}' , alg = "RS256" )
74
- sig_key = self .alice_keyjar .get_signing_key ("rsa" , owner = "Alice" )[0 ]
74
+ sig_key = self .alice_keyjar .get_signing_key ("rsa" , issuer_id = "Alice" )[0 ]
75
75
self .sjwt_a = _jws .sign_compact ([sig_key ])
76
76
77
77
_jws = JWS ('{"aud": "Alice", "iss": "Bob"}' , alg = "RS256" )
78
- sig_key = self .bob_keyjar .get_signing_key ("rsa" , owner = "Bob" )[0 ]
78
+ sig_key = self .bob_keyjar .get_signing_key ("rsa" , issuer_id = "Bob" )[0 ]
79
79
self .sjwt_b = _jws .sign_compact ([sig_key ])
80
80
81
81
def test_no_kid_multiple_keys_no_kid_issuer (self ):
82
- a_kids = [k .kid for k in self .alice_keyjar .get_verify_key (owner = "Alice" , key_type = "RSA" )]
82
+ a_kids = [
83
+ k .kid for k in self .alice_keyjar .get_verify_key (issuer_id = "Alice" , key_type = "RSA" )
84
+ ]
83
85
no_kid_issuer = {"Alice" : a_kids }
84
86
_jwt = factory (self .sjwt_a )
85
87
_jwt .jwt .headers ["kid" ] = ""
86
88
keys = self .bob_keyjar .get_jwt_verify_keys (_jwt .jwt , no_kid_issuer = no_kid_issuer )
87
89
assert len (keys ) == 3
88
90
89
91
def test_aud (self ):
90
- self .alice_keyjar .import_jwks (JWK1 , issuer = "D" )
91
- self .bob_keyjar .import_jwks (JWK1 , issuer = "D" )
92
+ self .alice_keyjar .import_jwks (JWK1 , issuer_id = "D" )
93
+ self .bob_keyjar .import_jwks (JWK1 , issuer_id = "D" )
92
94
93
95
_jws = JWS ('{"iss": "D", "aud": "A"}' , alg = "HS256" )
94
- sig_key = self .alice_keyjar .get_signing_key ("oct" , owner = "D" )[0 ]
96
+ sig_key = self .alice_keyjar .get_signing_key ("oct" , issuer_id = "D" )[0 ]
95
97
_sjwt = _jws .sign_compact ([sig_key ])
96
98
97
99
no_kid_issuer = {"D" : []}
@@ -121,7 +123,9 @@ def test_init_key_jar_dump_private():
121
123
os .unlink (_file )
122
124
123
125
# New set of keys, JWKSs with keys and public written to file
124
- _keyjar = init_key_jar (private_path = PRIVATE_FILE , key_defs = KEYSPEC , owner = "https://example.com" )
126
+ _keyjar = init_key_jar (
127
+ private_path = PRIVATE_FILE , key_defs = KEYSPEC , issuer_id = "https://example.com"
128
+ )
125
129
assert list (_keyjar .owners ()) == ["https://example.com" ]
126
130
127
131
# JWKS will be read from disc, not created new
@@ -138,7 +142,7 @@ def test_init_key_jar_update():
138
142
_keyjar_1 = init_key_jar (
139
143
private_path = PRIVATE_FILE ,
140
144
key_defs = KEYSPEC ,
141
- owner = "https://example.com" ,
145
+ issuer_id = "https://example.com" ,
142
146
public_path = PUBLIC_FILE ,
143
147
read_only = False ,
144
148
)
0 commit comments