不同版本jenkins对应插件版本

jenkins控制台安装插件默认是最新版本的,对应安装可能会出现不兼容版本的,而且会影响其他插件的问题插件官方地址地址
oic-auth插件地址

bash 复制代码
https://get.jenkins.io/plugins/oic-auth/

一、整体架构

用户 → Jenkins → (重定向) → Casdoor → 登录 → 回调 Jenkins → 登录成功

协议:OIDC(OAuth2)

二、Casdoor 侧配置

  1. 创建 Application

登录 Casdoor 后:

👉 Applications → New Application

关键配置:

Name:jenkins

Client ID / Secret:保存下来(后面 Jenkins 要用)

Redirect URLs(重点):

http:///securityRealm/finishLogin

例如:

http://jenkins.com/securityRealm/finishLogin

  1. 开启 OIDC

Casdoor 默认支持 OIDC,确认以下地址:

👉 OpenID 配置地址:

https:///.well-known/openid-configuration

例如:

https://sso.cn/.well-known/openid-configuration

你之前已经查过这个 👍

  1. 用户 & 组织

确保:

用户已经创建

用户属于某个组织(organization)

三、Jenkins 侧配置

  1. 安装插件

安装:

👉 OpenID Connect Authentication Plugin

在:

Manage Jenkins → Plugins

  1. 配置 Security Realm

路径:

Manage Jenkins → Security → Security Realm

选择:

👉 OpenID Connect

  1. 填写参数(核心)
    OIDC 配置
    配置项 值
    Client ID Casdoor 的 client_id
    Client Secret Casdoor 的 client_secret
    Discovery URL https:///.well-known/openid-configuration

例如:

https://sso.cn/.well-known/openid-configuration

Scope

openid profile email

User Name Field

preferred_username

或:

name

Email Field

email

  1. Root URL(非常重要)

路径:

Manage Jenkins → Configure System

设置:

Jenkins URL = http://jenkins.com/

⚠️ 必须和 Casdoor 回调一致!

四、登录流程验证

访问 Jenkins:

http://jenkins.com

👉 会跳转到 Casdoor 登录

👉 登录成功后回调 Jenkins

👉 自动创建用户并登录

接入sso属性配置:

防止sso登录不上,配置逃生舱账号密码登录入口,登录地址http://你的Jenkins地址/login?escape-hatch![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/9628c973d06b4fd5917c666b652aadbb.png)

相关推荐
SkyWalking中文站19 小时前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控
雪梨酱QAQ1 天前
Kubeneters HA Cluster部署
运维
江华森1 天前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森1 天前
Matplotlib 数据绘图基础入门
运维
江华森1 天前
NumPy 数值计算基础入门
运维
乘云数字DATABUFF5 天前
5分钟部署开源APM Databuff:OpenTelemetry全链路追踪入门实战
运维·后端
荣--7 天前
一键部署不是为了省时间 —— 它是把"买来的 PaaS"变成"自己的平台"的拐点
运维·zabbix·工程化·一键部署·平台化·边界设计
江华森7 天前
动手实战学 Docker — 从零到集群编排完全指南
运维
Avan_菜菜8 天前
FRP 内网穿透完整实战:从 HTTP 映射到 HTTPS 自签代理
运维·nginx·https
SelectDB9 天前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维