Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
3e3ab556
Commit
3e3ab556
authored
Nov 23, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改设置
parent
c7f86cdd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
settings.py
apps/jumpserver/settings.py
+10
-10
config_example.py
config_example.py
+3
-1
No files found.
apps/jumpserver/settings.py
View file @
3e3ab556
...
...
@@ -14,7 +14,7 @@ import os
import
sys
import
ldap
from
django_auth_ldap.config
import
LDAPSearch
,
LDAPSearchUnion
#
from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion
from
django.urls
import
reverse_lazy
from
.conf
import
load_user_config
...
...
@@ -362,11 +362,11 @@ AUTH_LDAP_SEARCH_OU = 'ou=tech,dc=jumpserver,dc=org'
AUTH_LDAP_SEARCH_FILTER
=
'(cn=
%(user)
s)'
AUTH_LDAP_START_TLS
=
False
AUTH_LDAP_USER_ATTR_MAP
=
{
"username"
:
"cn"
,
"name"
:
"sn"
,
"email"
:
"mail"
}
AUTH_LDAP_GROUP_SEARCH_OU
=
CONFIG
.
AUTH_LDAP_GROUP_SEARCH_OU
AUTH_LDAP_GROUP_SEARCH_FILTER
=
CONFIG
.
AUTH_LDAP_GROUP_SEARCH_FILTER
AUTH_LDAP_GROUP_SEARCH
=
LDAPSearch
(
AUTH_LDAP_GROUP_SEARCH_OU
,
ldap
.
SCOPE_SUBTREE
,
AUTH_LDAP_GROUP_SEARCH_FILTER
)
#
AUTH_LDAP_GROUP_SEARCH_OU = CONFIG.AUTH_LDAP_GROUP_SEARCH_OU
#
AUTH_LDAP_GROUP_SEARCH_FILTER = CONFIG.AUTH_LDAP_GROUP_SEARCH_FILTER
#
AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
#
AUTH_LDAP_GROUP_SEARCH_OU, ldap.SCOPE_SUBTREE, AUTH_LDAP_GROUP_SEARCH_FILTER
#
)
AUTH_LDAP_CONNECTION_OPTIONS
=
{
ldap
.
OPT_TIMEOUT
:
5
}
...
...
@@ -397,10 +397,10 @@ if AUTH_OPENID:
# Celery using redis as broker
CELERY_BROKER_URL
=
'redis://:
%(password)
s@
%(host)
s:
%(port)
s/
%(db)
s'
%
{
'password'
:
CONFIG
.
REDIS_PASSWORD
if
CONFIG
.
REDIS_PASSWORD
else
''
,
'host'
:
CONFIG
.
REDIS_HOST
or
'127.0.0.1'
,
'port'
:
CONFIG
.
REDIS_PORT
or
6379
,
'db'
:
CONFIG
.
REDIS_DB_CELERY_BROKER
or
3
,
'password'
:
CONFIG
.
REDIS_PASSWORD
,
'host'
:
CONFIG
.
REDIS_HOST
,
'port'
:
CONFIG
.
REDIS_PORT
,
'db'
:
CONFIG
.
REDIS_DB_CELERY_BROKER
,
}
CELERY_TASK_SERIALIZER
=
'pickle'
CELERY_RESULT_SERIALIZER
=
'pickle'
...
...
config_example.py
View file @
3e3ab556
...
...
@@ -72,7 +72,9 @@ class Config:
# Redis配置
REDIS_HOST
=
'127.0.0.1'
REDIS_PORT
=
6379
REDIS_PASSWORD
=
''
# REDIS_PASSWORD = ''
# REDIS_DB_CELERY_BROKER = 3
# REDIS_DB_CACHE = 4
# Use OpenID authorization
# 使用OpenID 来进行认证设置
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment