From 3d8c29083a66a17815dcb7aeab7fc859476f529e Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Fri, 12 Apr 2024 10:48:38 +0530 Subject: [PATCH 1/8] build: add saml dependencies --- poetry.lock | 64 +++++++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 4410433b596..600a724036c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1295,6 +1295,7 @@ files = [ Django = ">=3.2" pyjwt = {version = ">=1.7", extras = ["crypto"]} python3-openid = ">=3.0.8" +python3-saml = {version = ">=1.15.0,<2.0.0", optional = true, markers = "extra == \"saml\""} requests = ">=2.0.0" requests-oauthlib = ">=0.3.0" @@ -2446,6 +2447,20 @@ typing_extensions = "*" [package.extras] aws = ["boto3"] +[[package]] +name = "isodate" +version = "0.6.1" +description = "An ISO 8601 date/time/duration parser and formatter" +optional = false +python-versions = "*" +files = [ + {file = "isodate-0.6.1-py2.py3-none-any.whl", hash = "sha256:0751eece944162659049d35f4f549ed815792b38793f07cf73381c1c87cbed96"}, + {file = "isodate-0.6.1.tar.gz", hash = "sha256:48c5881de7e8b0a0d648cb024c8062dc84e7b840ed81e864c7614fd3c127bde9"}, +] + +[package.dependencies] +six = "*" + [[package]] name = "itemadapter" version = "0.8.0" @@ -3594,6 +3609,7 @@ description = "Nvidia JIT LTO Library" optional = false python-versions = ">=3" files = [ + {file = "nvidia_nvjitlink_cu12-12.4.99-py3-none-manylinux2014_aarch64.whl", hash = "sha256:75d6498c96d9adb9435f2bbdbddb479805ddfb97b5c1b32395c694185c20ca57"}, {file = "nvidia_nvjitlink_cu12-12.4.99-py3-none-manylinux2014_x86_64.whl", hash = "sha256:c6428836d20fe7e327191c175791d38570e10762edc588fb46749217cd444c74"}, {file = "nvidia_nvjitlink_cu12-12.4.99-py3-none-win_amd64.whl", hash = "sha256:991905ffa2144cb603d8ca7962d75c35334ae82bf92820b6ba78157277da1ad2"}, ] @@ -5083,6 +5099,26 @@ defusedxml = "*" mysql = ["mysql-connector-python"] postgresql = ["psycopg2"] +[[package]] +name = "python3-saml" +version = "1.16.0" +description = "Saml Python Toolkit. Add SAML support to your Python software using this library" +optional = false +python-versions = "*" +files = [ + {file = "python3-saml-1.16.0.tar.gz", hash = "sha256:97c9669aecabc283c6e5fb4eb264f446b6e006f5267d01c9734f9d8bffdac133"}, + {file = "python3_saml-1.16.0-py2-none-any.whl", hash = "sha256:c49097863c278ff669a337a96c46dc1f25d16307b4bb2679d2d1733cc4f5176a"}, + {file = "python3_saml-1.16.0-py3-none-any.whl", hash = "sha256:20b97d11b04f01ee22e98f4a38242e2fea2e28fbc7fbc9bdd57cab5ac7fc2d0d"}, +] + +[package.dependencies] +isodate = ">=0.6.1" +lxml = ">=4.6.5,<4.7.0 || >4.7.0" +xmlsec = ">=1.3.9" + +[package.extras] +test = ["coverage (>=4.5.2)", "flake8 (>=3.6.0,<=5.0.0)", "freezegun (>=0.3.11,<=1.1.0)", "pytest (>=4.6)"] + [[package]] name = "pytz" version = "2022.7.1" @@ -5142,6 +5178,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -7896,6 +7933,31 @@ files = [ {file = "XlsxWriter-3.2.0.tar.gz", hash = "sha256:9977d0c661a72866a61f9f7a809e25ebbb0fb7036baa3b9fe74afcfca6b3cb8c"}, ] +[[package]] +name = "xmlsec" +version = "1.3.13" +description = "Python bindings for the XML Security Library" +optional = false +python-versions = ">=3.5" +files = [ + {file = "xmlsec-1.3.13-cp310-cp310-win32.whl", hash = "sha256:2174e8c88555383322d8b7d3927490a92ef72ad72a6ddaf4fa1b96a3f27c3e90"}, + {file = "xmlsec-1.3.13-cp310-cp310-win_amd64.whl", hash = "sha256:46d1daf16a8f4430efca5bb9c6a15776f2671f69f48a1941d6bb335e6f8cb29d"}, + {file = "xmlsec-1.3.13-cp35-cp35m-win32.whl", hash = "sha256:d47062c42775a025aa94fb8b15de97c1db86e301e549d3168157e0b1223d51b1"}, + {file = "xmlsec-1.3.13-cp35-cp35m-win_amd64.whl", hash = "sha256:7c7e8ef52688ddaf5b66750cc8d901f61716f46727014ff012f41d8858cedeb0"}, + {file = "xmlsec-1.3.13-cp36-cp36m-win32.whl", hash = "sha256:1725d70ee2bb2cd8dd66c7a7451be02bb59dc8280103db4f68e731f00135b1e0"}, + {file = "xmlsec-1.3.13-cp36-cp36m-win_amd64.whl", hash = "sha256:1f8c41162152d7086fd459926e61bc7cb2d52ffc829e760bf8b2c221a645d568"}, + {file = "xmlsec-1.3.13-cp37-cp37m-win32.whl", hash = "sha256:ff1c61f296e75cba5bac802d0000bfde09143eed946ced1a5162211867c335f8"}, + {file = "xmlsec-1.3.13-cp37-cp37m-win_amd64.whl", hash = "sha256:d249c0a2bf3ff13a231bca6a588e7d276b3f1e2cf09316b542f470a63855799e"}, + {file = "xmlsec-1.3.13-cp38-cp38-win32.whl", hash = "sha256:56cfcf3487b6ad269eb1fb543c04dee2c101f1bc91e06d6cf7bfab9ac486efd8"}, + {file = "xmlsec-1.3.13-cp38-cp38-win_amd64.whl", hash = "sha256:e6626bece0e97a8598b5df28c27bc6f2ae1e97d29dca3c1a4910a7598a4d1d0f"}, + {file = "xmlsec-1.3.13-cp39-cp39-win32.whl", hash = "sha256:091f23765729df6f3b3a55c8a6a96f9c713fa86e76b86a19cdb756aaa6dc0646"}, + {file = "xmlsec-1.3.13-cp39-cp39-win_amd64.whl", hash = "sha256:5162f416179350587c4ff64737af68a846a9b86f95fd465df4e68b589ce56618"}, + {file = "xmlsec-1.3.13.tar.gz", hash = "sha256:916f5d78e8041f6cd9391abba659da8c94a4fef7196d126d40af1ff417f2cf86"}, +] + +[package.dependencies] +lxml = ">=3.8" + [[package]] name = "yamlordereddictloader" version = "0.4.2" @@ -8108,4 +8170,4 @@ networking = ["junos-eznc"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "c3687549564d0d5ebfa18c77fa79b1a379144415c21678b4f3f59e61d4488299" +content-hash = "7fa6a6910f72e62ccd3f870ed6c4968b46e1cb27073c4567b390b6740cbda8c1" diff --git a/pyproject.toml b/pyproject.toml index 8243abaaca6..a430b30f2c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -139,6 +139,7 @@ pikepdf = "^8.11.0" pypdf = "^4.0.1" python-docx = "^1.1.0" cohere = "5.0.0" +django-allauth = {extras = ["saml"], version = "^0.61.1"} [tool.poetry.extras] networking = ["junos-eznc"] From 670a38d61d55fcad8ab0b6d0e9a8e9c0d67b892b Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Fri, 12 Apr 2024 10:49:32 +0530 Subject: [PATCH 2/8] feat: add saml settings if ENABLE_SAML_SOCIALACCOUNT --- llmstack/server/settings.py | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/llmstack/server/settings.py b/llmstack/server/settings.py index 485ed601944..744f6c96fbb 100644 --- a/llmstack/server/settings.py +++ b/llmstack/server/settings.py @@ -576,6 +576,54 @@ }, } +ENABLE_SAML_SOCIALACCOUNT = os.getenv("ENABLE_SAML_SOCIALACCOUNT", "False") == "True" +if ENABLE_SAML_SOCIALACCOUNT: + SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") + + if "allauth.socialaccount.providers.saml" not in INSTALLED_APPS: + INSTALLED_APPS.append("allauth.socialaccount.providers.saml") + + # Microsoft Entra ID SAML Configuration + SAML_APP_NAME = os.getenv("SAML_APP_NAME", "") + SAML_APP_CLIENT_ID = os.getenv("SAML_APP_CLIENT_ID", "") + SAML_APP_TENANT_ID = os.getenv("SAML_APP_TENANT_ID", "") + SAML_APP_CERTIFICATE = os.getenv("SAML_APP_CERTIFICATE", "") + + SAML_APP = { + "name": SAML_APP_NAME, + "provider_id": f"https://login.microsoftonline.com/{SAML_APP_TENANT_ID}/", + "client_id": SAML_APP_CLIENT_ID, + "settings": { + "attribute_mapping": { + "uid": "http://schemas.microsoft.com/identity/claims/objectidentifier", + "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", + "first_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", + "last_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname", + }, + "idp": { + "entity_id": f"https://sts.windows.net/{SAML_APP_TENANT_ID}/", + "sso_url": f"https://login.microsoftonline.com/{SAML_APP_TENANT_ID}/saml2", + "slo_url": f"https://login.microsoftonline.com/{SAML_APP_TENANT_ID}/saml2", + "x509cert": SAML_APP_CERTIFICATE, + }, + # "advanced": { + # "strict": False, + # "authn_requests_signed": False, + # "logout_request_signed": False, + # "logout_response_signed": False, + # "requested_authn_context": False, + # "sign_metadata": False, + # "want_assertion_encrypted": False, + # "want_assertion_signed": True, + # "want_messages_signed": False, + # }, + }, + } + + SOCIALACCOUNT_PROVIDERS["saml"] = { + "APPS": [SAML_APP], + } + EVENT_TOPIC_MAPPING = { "app.run.finished": [ { From 0900cee9f0044d60aa55401761c138f48a0a8fae Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Fri, 12 Apr 2024 11:11:26 +0530 Subject: [PATCH 3/8] feat: allow users to auto signup on social login by overriding DefaultSocialAccountAdapter's pre_social_login --- llmstack/server/adapters.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/llmstack/server/adapters.py b/llmstack/server/adapters.py index 904e5673ddc..8aeb2efe43c 100644 --- a/llmstack/server/adapters.py +++ b/llmstack/server/adapters.py @@ -35,3 +35,17 @@ def populate_user(self, request, sociallogin, data): user.email = user.username return user + + def pre_social_login(self, request, sociallogin): + if sociallogin.is_existing: + return + + user = sociallogin.user + + if not user.username: + user.username = user.email + + if not user.email: + user.email = user.username + + sociallogin.connect(request, user) From 3cee83b72c6b89a7790540635aeb08ce9e8cb5b0 Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Tue, 16 Apr 2024 11:08:21 +0530 Subject: [PATCH 4/8] build: update existing allauth requirement in poetry --- poetry.lock | 2 +- pyproject.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 600a724036c..c00327d6f17 100644 --- a/poetry.lock +++ b/poetry.lock @@ -8170,4 +8170,4 @@ networking = ["junos-eznc"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "7fa6a6910f72e62ccd3f870ed6c4968b46e1cb27073c4567b390b6740cbda8c1" +content-hash = "57abdf90b955d9a7541e16f38e3a2595705ef7fe1817096adc4eb8b46a2ec5c7" diff --git a/pyproject.toml b/pyproject.toml index a430b30f2c3..41736f77b67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -139,7 +139,6 @@ pikepdf = "^8.11.0" pypdf = "^4.0.1" python-docx = "^1.1.0" cohere = "5.0.0" -django-allauth = {extras = ["saml"], version = "^0.61.1"} [tool.poetry.extras] networking = ["junos-eznc"] @@ -152,7 +151,7 @@ optional = false [tool.poetry.group.server.dependencies] django = {version = "5.0", python = ">=3.10,<3.12" } -django-allauth = {version = "^0.61.1", allow-prereleases = true} +django-allauth = {version = "^0.61.1", allow-prereleases = true, extras = ["saml"]} django-environ = {version = "^0.10.0", allow-prereleases = true} django-picklefield = {version = "^3.1", allow-prereleases = true} django-redis = {version = "^5.2.0", allow-prereleases = true} From 13c39defa7aabab2df1b2a142a49f1717c92c54a Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Thu, 25 Apr 2024 21:27:13 +0530 Subject: [PATCH 5/8] feat: load saml configuration from env variables --- llmstack/server/settings.py | 76 ++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/llmstack/server/settings.py b/llmstack/server/settings.py index f3973d09c9c..8f1d960b955 100644 --- a/llmstack/server/settings.py +++ b/llmstack/server/settings.py @@ -591,40 +591,56 @@ if "allauth.socialaccount.providers.saml" not in INSTALLED_APPS: INSTALLED_APPS.append("allauth.socialaccount.providers.saml") + """ + SAMLE JSON CONFIG from env variable with prefill values. x509cert is configure in a separate env variable + + ```json + { + "name": "Test Organization", + "provider_id": "https://login.microsoftonline.com//", + "client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "settings_attribute_mapping": { + "uid": "http://schemas.microsoft.com/identity/claims/objectidentifier", + "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", + "first_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", + "last_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" + }, + "settings_idp": { + "entity_id": "https://sts.windows.net//", + "sso_url": "https://login.microsoftonline.com//saml2", + "slo_url": "https://login.microsoftonline.com//saml2" + }, + "settings_advanced": { + "strict": false, + "authn_requests_signed": false, + "logout_request_signed": false, + "logout_response_signed": false, + "requested_authn_context": false, + "sign_metadata": false, + "want_assertion_encrypted": false, + "want_assertion_signed": false, + "want_messages_signed": false, + } + } + ``` + """ # Microsoft Entra ID SAML Configuration - SAML_APP_NAME = os.getenv("SAML_APP_NAME", "") - SAML_APP_CLIENT_ID = os.getenv("SAML_APP_CLIENT_ID", "") - SAML_APP_TENANT_ID = os.getenv("SAML_APP_TENANT_ID", "") - SAML_APP_CERTIFICATE = os.getenv("SAML_APP_CERTIFICATE", "") + SAML_APP_CONFIG = json.loads(base64.b64decode(os.getenv("SAML_APP_CONFIG"))) + + # x509cert is configure in a separate env variable. JSON string does not support multiline strings + SAML_APP_X509CERT = os.getenv("SAML_APP_X509CERT", "") + + SAML_APP_SETTINGS_IDP = SAML_APP_CONFIG["settings_idp"] + SAML_APP_SETTINGS_IDP["x509cert"] = SAML_APP_X509CERT SAML_APP = { - "name": SAML_APP_NAME, - "provider_id": f"https://login.microsoftonline.com/{SAML_APP_TENANT_ID}/", - "client_id": SAML_APP_CLIENT_ID, + "name": SAML_APP_CONFIG["name"], + "provider_id": SAML_APP_CONFIG["provider_id"], + "client_id": SAML_APP_CONFIG["client_id"], "settings": { - "attribute_mapping": { - "uid": "http://schemas.microsoft.com/identity/claims/objectidentifier", - "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", - "first_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", - "last_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname", - }, - "idp": { - "entity_id": f"https://sts.windows.net/{SAML_APP_TENANT_ID}/", - "sso_url": f"https://login.microsoftonline.com/{SAML_APP_TENANT_ID}/saml2", - "slo_url": f"https://login.microsoftonline.com/{SAML_APP_TENANT_ID}/saml2", - "x509cert": SAML_APP_CERTIFICATE, - }, - # "advanced": { - # "strict": False, - # "authn_requests_signed": False, - # "logout_request_signed": False, - # "logout_response_signed": False, - # "requested_authn_context": False, - # "sign_metadata": False, - # "want_assertion_encrypted": False, - # "want_assertion_signed": True, - # "want_messages_signed": False, - # }, + "attribute_mapping": SAML_APP_CONFIG["settings_attribute_mapping"], + "idp": SAML_APP_SETTINGS_IDP, + "advanced": SAML_APP_CONFIG["settings_advanced"], }, } From 80d1138e3c87dc479fe7a077894045caf1b5a60d Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Fri, 26 Apr 2024 04:41:08 +0530 Subject: [PATCH 6/8] fix: SAML_APP_CONFIG json parse logic --- llmstack/server/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llmstack/server/settings.py b/llmstack/server/settings.py index 8f1d960b955..e62bdc60b14 100644 --- a/llmstack/server/settings.py +++ b/llmstack/server/settings.py @@ -625,7 +625,7 @@ ``` """ # Microsoft Entra ID SAML Configuration - SAML_APP_CONFIG = json.loads(base64.b64decode(os.getenv("SAML_APP_CONFIG"))) + SAML_APP_CONFIG = json.loads(os.getenv("SAML_APP_CONFIG") or "{}", strict=False) # x509cert is configure in a separate env variable. JSON string does not support multiline strings SAML_APP_X509CERT = os.getenv("SAML_APP_X509CERT", "") From 656036746e441caeba93b2536ba7b577ca033b3f Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Fri, 26 Apr 2024 04:47:45 +0530 Subject: [PATCH 7/8] fix: use x509cert from SAML_APP_CERTIFICATE and update shell settings --- llmstack/server/settings.py | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/llmstack/server/settings.py b/llmstack/server/settings.py index e62bdc60b14..cd39e7f9880 100644 --- a/llmstack/server/settings.py +++ b/llmstack/server/settings.py @@ -592,13 +592,17 @@ INSTALLED_APPS.append("allauth.socialaccount.providers.saml") """ - SAMLE JSON CONFIG from env variable with prefill values. x509cert is configure in a separate env variable + SAMPLE CONFIG from .bashrc/.zshrc. x509cert is configure in a separate env variable - ```json + ```bash + export SAML_APP_NAME="Test Org Inc" + export SAML_APP_CLIENT_ID="test-org-inc" + export SAML_APP_TENANT_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + export SAML_APP_CONFIG=$(cat </", - "client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "name": "$SAML_APP_NAME", + "provider_id": "https://login.microsoftonline.com/$SAML_APP_TENANT_ID/", + "client_id": "$SAML_APP_CLIENT_ID", "settings_attribute_mapping": { "uid": "http://schemas.microsoft.com/identity/claims/objectidentifier", "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", @@ -606,9 +610,9 @@ "last_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" }, "settings_idp": { - "entity_id": "https://sts.windows.net//", - "sso_url": "https://login.microsoftonline.com//saml2", - "slo_url": "https://login.microsoftonline.com//saml2" + "entity_id": "https://sts.windows.net/$SAML_APP_TENANT_ID/", + "sso_url": "https://login.microsoftonline.com/$SAML_APP_TENANT_ID/saml2", + "slo_url": "https://login.microsoftonline.com/$SAML_APP_TENANT_ID/saml2" }, "settings_advanced": { "strict": false, @@ -619,19 +623,27 @@ "sign_metadata": false, "want_assertion_encrypted": false, "want_assertion_signed": false, - "want_messages_signed": false, + "want_messages_signed": false } } + EOF + ) + + export SAML_APP_CERTIFICATE=" + -----BEGIN CERTIFICATE----- + MIIC8DCCAdi... + -----END CERTIFICATE----- + " ``` """ # Microsoft Entra ID SAML Configuration SAML_APP_CONFIG = json.loads(os.getenv("SAML_APP_CONFIG") or "{}", strict=False) # x509cert is configure in a separate env variable. JSON string does not support multiline strings - SAML_APP_X509CERT = os.getenv("SAML_APP_X509CERT", "") + SAML_APP_X509_CERTIFICATE = os.getenv("SAML_APP_CERTIFICATE", "") SAML_APP_SETTINGS_IDP = SAML_APP_CONFIG["settings_idp"] - SAML_APP_SETTINGS_IDP["x509cert"] = SAML_APP_X509CERT + SAML_APP_SETTINGS_IDP["x509cert"] = SAML_APP_X509_CERTIFICATE SAML_APP = { "name": SAML_APP_CONFIG["name"], From 683de3d663438efb9deeddd698ce9156796656f6 Mon Sep 17 00:00:00 2001 From: Bala Subrahmanyam Varanasi Date: Fri, 26 Apr 2024 04:54:40 +0530 Subject: [PATCH 8/8] docs: update SAML docstring --- llmstack/server/settings.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llmstack/server/settings.py b/llmstack/server/settings.py index cd39e7f9880..9917466a3be 100644 --- a/llmstack/server/settings.py +++ b/llmstack/server/settings.py @@ -631,15 +631,13 @@ export SAML_APP_CERTIFICATE=" -----BEGIN CERTIFICATE----- - MIIC8DCCAdi... + MIIC8... -----END CERTIFICATE----- " ``` """ # Microsoft Entra ID SAML Configuration SAML_APP_CONFIG = json.loads(os.getenv("SAML_APP_CONFIG") or "{}", strict=False) - - # x509cert is configure in a separate env variable. JSON string does not support multiline strings SAML_APP_X509_CERTIFICATE = os.getenv("SAML_APP_CERTIFICATE", "") SAML_APP_SETTINGS_IDP = SAML_APP_CONFIG["settings_idp"]