[PR #2630] FEAT: Open ID Cconnect authentication #3595

Open
opened 2026-02-26 08:31:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/2630
Author: @marekful
Created: 2/24/2023
Status: 🔄 Open

Base: masterHead: FEAT/open-id-connect-authentication


📝 Commits (10+)

  • caeb293 FEAT: Add Open ID Connect authentication method
  • 3e2a411 chore: add oidc setting db entry during setup
  • 457d1a7 chore: improve oidc setting ui
  • 8350271 chore: add message texts
  • bc0b466 refactor: improve code structure
  • baee464 chore: improve error handling
  • 6f98fa6 refactor: satisfy linter requirements
  • df5ab36 chore: update comments, remove debug logging
  • ef64edd fix: add database migration for oidc-config setting
  • fd49644 fix: linter

📊 Changes

19 files changed (+510 additions, -13 deletions)

View changed files

📝 backend/internal/token.js (+41 -0)
📝 backend/lib/express/jwt-decode.js (+3 -1)
📝 backend/logger.js (+2 -1)
📝 backend/package.json (+1 -0)
📝 backend/routes/api/main.js (+1 -0)
backend/routes/api/oidc.js (+168 -0)
📝 backend/routes/api/settings.js (+11 -0)
📝 backend/routes/api/tokens.js (+2 -0)
📝 backend/setup.js (+27 -3)
📝 backend/yarn.lock (+37 -0)
📝 frontend/js/app/api.js (+2 -0)
📝 frontend/js/app/controller.js (+5 -0)
📝 frontend/js/app/settings/list/item.ejs (+8 -0)
frontend/js/app/settings/oidc-config/main.ejs (+56 -0)
frontend/js/app/settings/oidc-config/main.js (+46 -0)
📝 frontend/js/i18n/messages.json (+5 -1)
📝 frontend/js/login/ui/login.ejs (+8 -1)
📝 frontend/js/login/ui/login.js (+57 -6)
📝 frontend/scss/custom.scss (+30 -0)

📄 Description

FEAT: Add Open ID Connect authentication method (SSO)

Resolves: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2562 https://github.com/NginxProxyManager/nginx-proxy-manager/issues/69 https://github.com/NginxProxyManager/nginx-proxy-manager/issues/437 https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1624

  • add oidc-config setting allowing an admin user to configure parameters
  • modify login page to show another button when oidc is configured
  • add dependency openid-client v5.4.0
  • add backend route to process "OAuth2 Authorization Code" flow
    initialisation
  • add backend route to process callback of above flow
  • sign in the authenticated user with internal jwt token if internal
    user with email matching the one retrieved from oauth claims exists

Note: Only Open ID Connect Discovery is supported which most modern
Identity Providers offer.

Tested with Authentik 2023.2.2 and Keycloak 18.0.2

Screenshot 2023-02-24 at 22 55 10 Screenshot 2023-02-24 at 22 55 34 Screenshot 2023-02-24 at 22 55 47

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/2630 **Author:** [@marekful](https://github.com/marekful) **Created:** 2/24/2023 **Status:** 🔄 Open **Base:** `master` ← **Head:** `FEAT/open-id-connect-authentication` --- ### 📝 Commits (10+) - [`caeb293`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/caeb2934f0dff0e6b7d73b9bbeddb74a2f31116d) FEAT: Add Open ID Connect authentication method - [`3e2a411`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/3e2a411dfbd53ca4be6c61a96fb0d322eff92cfc) chore: add oidc setting db entry during setup - [`457d1a7`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/457d1a75ba6124ec499a49433f3232f4ceeb1536) chore: improve oidc setting ui - [`8350271`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/8350271e6f83dd7c581d5d935b058df7be9828fb) chore: add message texts - [`bc0b466`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/bc0b466a8e79911022ce38937e0dc832154d5b47) refactor: improve code structure - [`baee464`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/baee4641db474ce15ba9d5a64d9265193ea708c6) chore: improve error handling - [`6f98fa6`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/6f98fa61e4991ed7b8bdbf177bea87c97c9238e0) refactor: satisfy linter requirements - [`df5ab36`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/df5ab361e30fae36cba8b4dd2b419a0911746b7a) chore: update comments, remove debug logging - [`ef64edd`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/ef64edd9432b05f39063f790188df495dca04c84) fix: add database migration for oidc-config setting - [`fd49644`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/fd49644f212399cb2f6c27e75fcd176fe1baa89f) fix: linter ### 📊 Changes **19 files changed** (+510 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/token.js` (+41 -0) 📝 `backend/lib/express/jwt-decode.js` (+3 -1) 📝 `backend/logger.js` (+2 -1) 📝 `backend/package.json` (+1 -0) 📝 `backend/routes/api/main.js` (+1 -0) ➕ `backend/routes/api/oidc.js` (+168 -0) 📝 `backend/routes/api/settings.js` (+11 -0) 📝 `backend/routes/api/tokens.js` (+2 -0) 📝 `backend/setup.js` (+27 -3) 📝 `backend/yarn.lock` (+37 -0) 📝 `frontend/js/app/api.js` (+2 -0) 📝 `frontend/js/app/controller.js` (+5 -0) 📝 `frontend/js/app/settings/list/item.ejs` (+8 -0) ➕ `frontend/js/app/settings/oidc-config/main.ejs` (+56 -0) ➕ `frontend/js/app/settings/oidc-config/main.js` (+46 -0) 📝 `frontend/js/i18n/messages.json` (+5 -1) 📝 `frontend/js/login/ui/login.ejs` (+8 -1) 📝 `frontend/js/login/ui/login.js` (+57 -6) 📝 `frontend/scss/custom.scss` (+30 -0) </details> ### 📄 Description ## FEAT: Add Open ID Connect authentication method (SSO) Resolves: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2562 https://github.com/NginxProxyManager/nginx-proxy-manager/issues/69 https://github.com/NginxProxyManager/nginx-proxy-manager/issues/437 https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1624 * add `oidc-config` setting allowing an admin user to configure parameters * modify login page to show another button when oidc is configured * add dependency `openid-client` `v5.4.0` * add backend route to process "OAuth2 Authorization Code" flow initialisation * add backend route to process callback of above flow * sign in the authenticated user with internal jwt token if internal user with email matching the one retrieved from oauth claims exists Note: Only Open ID Connect Discovery is supported which most modern Identity Providers offer. Tested with Authentik 2023.2.2 and Keycloak 18.0.2 <img width="1119" alt="Screenshot 2023-02-24 at 22 55 10" src="https://user-images.githubusercontent.com/10281476/221300935-61098773-75b5-45b6-9a95-49e44c8b0e84.png"> <img width="1119" alt="Screenshot 2023-02-24 at 22 55 34" src="https://user-images.githubusercontent.com/10281476/221300985-1550a94b-c5eb-4650-a026-d9e54d3f2d7e.png"> <img width="1119" alt="Screenshot 2023-02-24 at 22 55 47" src="https://user-images.githubusercontent.com/10281476/221301012-ed202e50-fe56-4b9a-950a-516be7f1f832.png"> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#3595
No description provided.