Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSuite安全LDAP无法正常使用该软件的LDAP功能 #3421

Open
HuanMeng0 opened this issue Nov 6, 2019 · 1 comment

Comments

@HuanMeng0
Copy link

@HuanMeng0 HuanMeng0 commented Nov 6, 2019

[简述你的问题]

使用版本

1.5.4

问题复现步骤

Jumpserver的 apps/settings/utils.py 函数

    def _cookie(self):
        if self.paged_size is None:
            cookie = None
        else:
            cookie = self.connection.result['controls']['1.2.840.113556.1.4.319']['value']['cookie']
        return cookie

使其导致GSuite的安全LDAP无法正常使用,因为self.connection.result返回的数据是

{'result': 0, 'description': 'success', 'dn': '', 'message': '', 'referrals': None, 'type': 'searchResDone'}

且self.paged_size 是 1000,会因找不到数组而抛出"controls"错误。

跳过这部分后可以通过LDAP连接测试。

经查询资料,是GSuite的安全LDAP不支持分页控制功能,因此导入用户时也会出错,会导入失败。

具体表现[截图可能会更好些,最好能截全]
其他

[注:] 完成后请关闭 issue

@HuanMeng0

This comment has been minimized.

Copy link
Author

@HuanMeng0 HuanMeng0 commented Nov 11, 2019

也许需要增加判断LDAP服务器是否支持简单分页的逻辑,再根据判断结果采用不同的搜索方式。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.