From 8a3a16f25f6d87b6cf679c888eacba816415baa9 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 18 Jul 2024 16:54:07 -0500 Subject: Remove obsoleted SSL_PRIVATE_KEY configuration With the key rotation in place, eliminate the use of the SSL_PRIVATE_KEY configuration which pointed to a specific non-changing JWK. --- gn_auth/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gn_auth/__init__.py') diff --git a/gn_auth/__init__.py b/gn_auth/__init__.py index b3df070..ee7ceb1 100644 --- a/gn_auth/__init__.py +++ b/gn_auth/__init__.py @@ -24,7 +24,7 @@ def check_mandatory_settings(app: Flask) -> None: undefined = tuple( setting for setting in ( "SECRET_KEY", "SQL_URI", "AUTH_DB", "AUTH_MIGRATIONS", - "OAUTH2_SCOPE", "SSL_PRIVATE_KEY", "CLIENTS_SSL_PUBLIC_KEYS_DIR") + "OAUTH2_SCOPE", "CLIENTS_SSL_PUBLIC_KEYS_DIR") if not ((setting in app.config) and bool(app.config[setting]))) if len(undefined) > 0: raise ConfigurationError( @@ -64,8 +64,6 @@ def parse_ssl_keys(app): __parse_key__(Path(key_storage_dir).joinpath(key)) for key in os.listdir(key_storage_dir))} - app.config["SSL_PRIVATE_KEY"] = __parse_key__( - Path(app.config["SSL_PRIVATE_KEY"])) def create_app( config: Optional[dict] = None, -- cgit v1.2.3