詹金斯模棱两可的许可
Jenkins Ambiguous Permission
更新 Jenkins 后,它正在发送警告,指出项目基础权限的权限不明确。我可以手动将条目迁移到 user
或 group
,想知道是否有自动或批处理的方法?
警告消息
Some permission assignments are ambiguous. It is recommended to update affected configurations to be unambiguous. See this overview page for a list of affected configurations.
This table contains rows with ambiguous entries. This means that they apply to both users and groups of the specified name. If the current security realm does not distinguish between user names and group names unambiguously, and if users can either choose their own user name or create new groups, this configuration may allow them to obtain greater permissions. It is recommended that all ambiguous entries are replaced with ones that are either explicitly a user or group.
我删除了旧的条目并重新添加了它们,警告消失了。
标记的不明确行旁边应该有一个按钮(在权限矩阵的右侧),使您可以快速 select 该行是用户还是组。这是我迄今为止找到的最快的方式
您可以直接使用 GNU sed/find 在 config.xml 个文件中修复它。转到 $JENKINS_HOME(通常是 /var/lib/jenkins)和 运行 这个命令:
find config.xml jobs/ -name config.xml -exec sed -i '/USER:\|GROUP:/! s/<permission>/<permission>USER:/' '{}' \;
它将首先更改全局配置(全局权限),然后更改每个作业的配置文件,使每个权限成为 USER 类型(如果尚未键入)。
然后转到管理 Jenkins 菜单并点击“从磁盘重新加载配置”按钮(或者在 运行 宁 find/sed 之前停止 jenkins 服务)。
更新 Jenkins 后,它正在发送警告,指出项目基础权限的权限不明确。我可以手动将条目迁移到 user
或 group
,想知道是否有自动或批处理的方法?
警告消息
Some permission assignments are ambiguous. It is recommended to update affected configurations to be unambiguous. See this overview page for a list of affected configurations.
This table contains rows with ambiguous entries. This means that they apply to both users and groups of the specified name. If the current security realm does not distinguish between user names and group names unambiguously, and if users can either choose their own user name or create new groups, this configuration may allow them to obtain greater permissions. It is recommended that all ambiguous entries are replaced with ones that are either explicitly a user or group.
我删除了旧的条目并重新添加了它们,警告消失了。
标记的不明确行旁边应该有一个按钮(在权限矩阵的右侧),使您可以快速 select 该行是用户还是组。这是我迄今为止找到的最快的方式
您可以直接使用 GNU sed/find 在 config.xml 个文件中修复它。转到 $JENKINS_HOME(通常是 /var/lib/jenkins)和 运行 这个命令:
find config.xml jobs/ -name config.xml -exec sed -i '/USER:\|GROUP:/! s/<permission>/<permission>USER:/' '{}' \;
它将首先更改全局配置(全局权限),然后更改每个作业的配置文件,使每个权限成为 USER 类型(如果尚未键入)。 然后转到管理 Jenkins 菜单并点击“从磁盘重新加载配置”按钮(或者在 运行 宁 find/sed 之前停止 jenkins 服务)。