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 <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-06-07 12:07:01 +02:00
parent f05997740f
commit 0fcdf5e968
No known key found for this signature in database
2 changed files with 0 additions and 12 deletions

View file

@ -34,7 +34,6 @@ class RuntimeDict(TypedDict):
class SystemSerializer(PassiveSerializer): class SystemSerializer(PassiveSerializer):
"""Get system information.""" """Get system information."""
env = SerializerMethodField()
http_headers = SerializerMethodField() http_headers = SerializerMethodField()
http_host = SerializerMethodField() http_host = SerializerMethodField()
http_is_secure = SerializerMethodField() http_is_secure = SerializerMethodField()
@ -43,10 +42,6 @@ class SystemSerializer(PassiveSerializer):
server_time = SerializerMethodField() server_time = SerializerMethodField()
embedded_outpost_host = 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]: def get_http_headers(self, request: Request) -> dict[str, str]:
"""Get HTTP Request headers""" """Get HTTP Request headers"""
headers = {} headers = {}

View file

@ -40367,12 +40367,6 @@ components:
type: object type: object
description: Get system information. description: Get system information.
properties: properties:
env:
type: object
additionalProperties:
type: string
description: Get Environment
readOnly: true
http_headers: http_headers:
type: object type: object
additionalProperties: additionalProperties:
@ -40426,7 +40420,6 @@ components:
readOnly: true readOnly: true
required: required:
- embedded_outpost_host - embedded_outpost_host
- env
- http_headers - http_headers
- http_host - http_host
- http_is_secure - http_is_secure