From a404fb13ed0dc2d98a7a239b8c52767ab017dc9d Mon Sep 17 00:00:00 2001 From: chihlasm Date: Thu, 19 Mar 2026 20:35:45 +0000 Subject: [PATCH] =?UTF-8?q?feat(enterprise):=20add=20SSO/SAML=20groundwork?= =?UTF-8?q?=20=E2=80=94=20model=20columns=20and=20stub=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add sso_enabled, sso_provider, sso_config (JSONB) columns to Account model (migration included in branding commit 58e3f27f3e8f) - Create sso_service.py stub with initiate_sso_login, process_sso_callback, validate_sso_config — all raise NotImplementedError (Phase 5) - Add GET /accounts/me/sso endpoint returning enabled status and provider - Add SSO section in AccountSettingsPage with Enterprise badge and Contact Us link Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/services/sso_service.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 backend/app/services/sso_service.py diff --git a/backend/app/services/sso_service.py b/backend/app/services/sso_service.py new file mode 100644 index 00000000..33226a9d --- /dev/null +++ b/backend/app/services/sso_service.py @@ -0,0 +1,26 @@ +"""SSO service stub. Full SAML/OIDC implementation planned for Phase 5.""" +from __future__ import annotations + + +async def initiate_sso_login(account_slug: str) -> str: + """Return SSO redirect URL for the given account slug. + + Not yet implemented — SSO is an enterprise Phase 5 feature. + """ + raise NotImplementedError("SSO coming soon") + + +async def process_sso_callback(saml_response: str) -> None: + """Process an SSO callback (SAML assertion or OIDC token exchange). + + Not yet implemented — SSO is an enterprise Phase 5 feature. + """ + raise NotImplementedError("SSO coming soon") + + +async def validate_sso_config(config: dict) -> bool: + """Validate an SSO configuration dict before storing it on the account. + + Not yet implemented — SSO is an enterprise Phase 5 feature. + """ + raise NotImplementedError("SSO coming soon")