sonar-ldap-groups

Sonar Ldap Groups Docker Image

该镜像用于同步LDAP/AD组到Sonarqube,解决官方Sonarqube授权委托中组需先在SonarQube定义的问题,支持干运行验证和定时同步,帮助企业管理Sonarqube项目权限。

下载次数: 0状态:社区镜像维护者:lopf仓库类型:镜像最近更新:
下载命令
点击查看

Sonar LDAP/AD group synchronization

Synchronize LDAP/AD groups to Sonarqube. The official Sonarqube documentation includes this passage regarding delegation of authorization: For the delegation of authorization, groups must be first defined in SonarQube. The script aims to provide a solution to this.

Official Sonarqube documentation: https://docs.sonarqube.org/7.6/instance-administration/delegated-auth/

Sonarqube (https://www.sonarqube.org/) has great LDAP integration for user account. It lets you delegate authentication to an LDAP server such as a Microsoft Active Directory. If an LDAP user logs into Sonar, a local record is being created. If the LDAP/AD groups are synchronized to Sonar, we can set permissions for these groups to projects.

Getting Started

Prerequisites

The script was tested using Python 3.7 and Sonarqube 7.6 as target. In addition, a few PIP packages need to be present:

pip install -r requirements.txt

Generate a token for a user in the sonar-administrators group:

Administration --> Security --> Users in the Tokens column, click and generate a token.

Configuration

See ./group-sync.py --help for available parameters.

  1. Copy the sample config into config.yml and adapt it to your environment
cp config.yml.sample config.yml
# edit config.yml
  1. Run with no parameter to see how many groups would get created/deleted.
  2. Execute with --no-dry to actually create/delete the groups.

Deployment

You may want to put this into a cronjob to run regularly.

Docker

Build a container image:

docker build . -t sonar-ldap-groups

Run script in container and pass it a local configuration file:

docker run -it -v$(pwd)/config.yml:/etc/config.yml sonar-ldap-groups --config /etc/config.yml

Kubernetes

Checkout the Cronjob and ConfigMap examples in the kubernetes/* directory.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 sonar-ldap-groups 镜像标签

docker pull docker.xuanyuan.run/lopf/sonar-ldap-groups:<标签>

DockerHub 原生拉取命令

docker pull lopf/sonar-ldap-groups:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告