Skip to content

Commit

Permalink
fix: set default ldap user dn cache time (0)
Browse files Browse the repository at this point in the history
  • Loading branch information
BaiJiangJie committed Dec 20, 2024
1 parent 41c8cb6 commit be57b10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/jumpserver/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class Config(dict):
'AUTH_LDAP_START_TLS': False,
'AUTH_LDAP_USER_ATTR_MAP': {"username": "cn", "name": "sn", "email": "mail"},
'AUTH_LDAP_CONNECT_TIMEOUT': 10,
'AUTH_LDAP_CACHE_TIMEOUT': 3600 * 24 * 30,
'AUTH_LDAP_CACHE_TIMEOUT': 0,
'AUTH_LDAP_SEARCH_PAGED_SIZE': 1000,
'AUTH_LDAP_SYNC_IS_PERIODIC': False,
'AUTH_LDAP_SYNC_INTERVAL': None,
Expand All @@ -310,7 +310,7 @@ class Config(dict):
'AUTH_LDAP_HA_START_TLS': False,
'AUTH_LDAP_HA_USER_ATTR_MAP': {"username": "cn", "name": "sn", "email": "mail"},
'AUTH_LDAP_HA_CONNECT_TIMEOUT': 10,
'AUTH_LDAP_HA_CACHE_TIMEOUT': 3600 * 24 * 30,
'AUTH_LDAP_HA_CACHE_TIMEOUT': 0,
'AUTH_LDAP_HA_SEARCH_PAGED_SIZE': 1000,
'AUTH_LDAP_HA_SYNC_IS_PERIODIC': False,
'AUTH_LDAP_HA_SYNC_INTERVAL': None,
Expand Down
2 changes: 1 addition & 1 deletion apps/settings/serializers/auth/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class LDAPSettingSerializer(serializers.Serializer):
)
AUTH_LDAP_CACHE_TIMEOUT = serializers.IntegerField(
min_value=0, max_value=3600 * 24 * 30 * 12,
default=3600 * 24 * 30,
default=0,
required=False, label=_('User DN cache timeout (s)'),
help_text=_(
'Caching the User DN obtained during user login authentication can effectively '
Expand Down
2 changes: 1 addition & 1 deletion apps/settings/serializers/auth/ldap_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class LDAPHASettingSerializer(serializers.Serializer):
)
AUTH_LDAP_HA_CACHE_TIMEOUT = serializers.IntegerField(
min_value=0, max_value=3600 * 24 * 30 * 12,
default=3600 * 24 * 30,
default=0,
required=False, label=_('User DN cache timeout (s)'),
help_text=_(
'Caching the User DN obtained during user login authentication can effectively'
Expand Down

0 comments on commit be57b10

Please sign in to comment.