diff --git a/binary_dependencies/jwtproxy b/binary_dependencies/jwtproxy index 36e13d839..17132a35c 100755 Binary files a/binary_dependencies/jwtproxy and b/binary_dependencies/jwtproxy differ diff --git a/boot.py b/boot.py index fff98a4db..b266b023e 100644 --- a/boot.py +++ b/boot.py @@ -19,26 +19,11 @@ def create_quay_service_key(seconds_until_expiration): expiration = timedelta(seconds=seconds_until_expiration) private_key, service_key = generate_service_key('quay', datetime.now()+expiration) approve_service_key(service_key.kid, None, ServiceKeyApprovalType.SUPERUSER) - - private_key_file = { - 'KeyID': service_key.kid, - 'PrivateKey': { - 'N': int(private_key._n), - 'E': int(private_key._e), - 'D': int(private_key._d), - 'Primes': [int(private_key._p), int(private_key._q)], - 'Precomputed': { - 'Dp': None, - 'Dq': None, - 'Quinv': None, - 'CRTValues': [] - } - } - } + jwk = RSAKey(key=private_key).serialize(private=True) with open('/conf/quay.jwk', mode='w') as f: f.truncate(0) - f.write(json.dumps(private_key_file)) + f.write(json.dumps(jwk)) def create_jwtproxy_conf():