Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
背景
我司在 2023 年选择使用 CodeAnalysis 作为白盒代码扫描平台,主要考虑是整体功能与需求匹配度较高,是开源的并且社区活跃度也不错,基于 Django 框架二次开发也容易上手,整体架构清晰有良好的代码风格,相关文档和运行日志也很齐全。
本次 PR 需求来自 #610
注意到近期有相同需求的用户越来越多 ,所以考虑贡献代码
实现思路
CodeAnalysis 不考虑认证源是什么,只关心是否认证成功,所以只需要在认证逻辑里添加 ldap 认证的代码就可以
使用方式
在使用前请先根据具体 LDAP 服务情况修改以下三个文件
如果是源码部署,应该可以直接使用(未测试)
如果是 Docker/Docker compose 部署,因为 pull 镜像里代码可能还未更新,所以请在 deploy 之后再 build login-server 更新代码
问题反馈
如果遇到登录失败的情况,请先检查 LDAP 配置是否正确,如果确认配置没问题,请带上 login-server 日志提交 issues