Skip to content

Commit

Permalink
node-red: add oidc
Browse files Browse the repository at this point in the history
  • Loading branch information
cubic3d committed Nov 29, 2024
1 parent 8b56310 commit 157263f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions kubernetes/main/apps/automation/node-red/app/config/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@ module.exports = {
credentialSecret: process.env.NODE_RED_CREDENTIAL_SECRET,
flowFilePretty: true,

adminAuth: {
type: "strategy",
strategy: {
name: "openidconnect",
autoLogin: true,
label: "Sign in",
icon: "fa-cloud",
strategy: require("passport-openidconnect").Strategy,
options: {
issuer: "https://auth.${domain}",
authorizationURL: "https://auth.${domain}/api/oidc/authorization",
tokenURL: "https://auth.${domain}/api/oidc/token",
userInfoURL: "https://auth.${domain}/api/oidc/userinfo",
clientID: "node-red",
clientSecret: process.env.NODE_RED_OIDC_CLIENT_SECRET,
callbackURL: "https://r.${domain}/auth/strategy/callback",
scope: ["openid", "email", "profile", "groups"],
proxy: true,
verify: function (issuer, profile, done) {
done(null, profile);
},
},
},
users: [{ username: "cubic", permissions: ["*"] }],
},

uiPort: process.env.PORT || 1880,

diagnostics: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ spec:
remoteRef:
key: node-red
property: credential_secret
- secretKey: NODE_RED_OIDC_CLIENT_SECRET
remoteRef:
key: authelia
property: oidc_secret_nodered_plain

0 comments on commit 157263f

Please sign in to comment.