From b1032761c89fc12481d895102646bd1917ff3c5f Mon Sep 17 00:00:00 2001 From: "Tommy.chen" Date: Fri, 2 Jul 2021 15:35:04 +0800 Subject: [PATCH] add cas CAS_USERNAME_ATTRIBUTE CAS_RENAME_ATTRIBUTES CAS_CREATE_USER read --- apps/jumpserver/conf.py | 4 ++++ apps/jumpserver/settings/auth.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/apps/jumpserver/conf.py b/apps/jumpserver/conf.py index 81188eb8a..dd76e729a 100644 --- a/apps/jumpserver/conf.py +++ b/apps/jumpserver/conf.py @@ -212,6 +212,10 @@ class Config(dict): 'CAS_ROOT_PROXIED_AS': '', 'CAS_LOGOUT_COMPLETELY': True, 'CAS_VERSION': 3, + 'CAS_USERNAME_ATTRIBUTE': 'username', + 'CAS_RENAME_ATTRIBUTES': {}, + 'CAS_CREATE_USER': False, + 'AUTH_SSO': False, 'AUTH_SSO_AUTHKEY_TTL': 60 * 15, diff --git a/apps/jumpserver/settings/auth.py b/apps/jumpserver/settings/auth.py index b3c322799..9345e766d 100644 --- a/apps/jumpserver/settings/auth.py +++ b/apps/jumpserver/settings/auth.py @@ -96,6 +96,9 @@ CAS_LOGOUT_COMPLETELY = CONFIG.CAS_LOGOUT_COMPLETELY CAS_VERSION = CONFIG.CAS_VERSION CAS_ROOT_PROXIED_AS = CONFIG.CAS_ROOT_PROXIED_AS CAS_CHECK_NEXT = lambda _next_page: True +CAS_USERNAME_ATTRIBUTE = CONFIG.CAS_USERNAME_ATTRIBUTE +CAS_RENAME_ATTRIBUTES = CONFIG.CAS_RENAME_ATTRIBUTES if hasattr(CONFIG, 'CAS_RENAME_ATTRIBUTES') else {} +CAS_CREATE_USER = CONFIG.CAS_CREATE_USER # SSO Auth AUTH_SSO = CONFIG.AUTH_SSO