From 0fcdf5e968fd34eee573e44ecc65ed194fc6fe98 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 7 Jun 2023 12:07:01 +0200 Subject: [PATCH] ATH-01-004: remove env from admin system endpoint this endpoint already required admin access, but for debugging the env variables are used very little Signed-off-by: Jens Langhammer --- authentik/admin/api/system.py | 5 ----- schema.yml | 7 ------- 2 files changed, 12 deletions(-) diff --git a/authentik/admin/api/system.py b/authentik/admin/api/system.py index c1e74672a..2b3f43da8 100644 --- a/authentik/admin/api/system.py +++ b/authentik/admin/api/system.py @@ -34,7 +34,6 @@ class RuntimeDict(TypedDict): class SystemSerializer(PassiveSerializer): """Get system information.""" - env = SerializerMethodField() http_headers = SerializerMethodField() http_host = SerializerMethodField() http_is_secure = SerializerMethodField() @@ -43,10 +42,6 @@ class SystemSerializer(PassiveSerializer): server_time = SerializerMethodField() embedded_outpost_host = SerializerMethodField() - def get_env(self, request: Request) -> dict[str, str]: - """Get Environment""" - return os.environ.copy() - def get_http_headers(self, request: Request) -> dict[str, str]: """Get HTTP Request headers""" headers = {} diff --git a/schema.yml b/schema.yml index 6f987de82..9f7c1909a 100644 --- a/schema.yml +++ b/schema.yml @@ -40367,12 +40367,6 @@ components: type: object description: Get system information. properties: - env: - type: object - additionalProperties: - type: string - description: Get Environment - readOnly: true http_headers: type: object additionalProperties: @@ -40426,7 +40420,6 @@ components: readOnly: true required: - embedded_outpost_host - - env - http_headers - http_host - http_is_secure