Commit Graph

6 Commits

Author SHA1 Message Date
UNITRONIX 4c9a1f632e fix(security): phase-D Go API ID guards across all proxy routes
Extend assertSafeApiId to organizations, resource-control, permissions,
tokens, and update paths; harden org UI XSS and attachment confinement.
2026-06-09 03:13:53 +02:00
UNITRONIX 3c4f1e2ec7 fix(console): sync auth_provider and LDAP login with Go (#148)
Repair the Node.js panel auth path so LDAP/OIDC users get the correct
provider and role from Go: forward authProvider in the database facade,
export syncUserFromGo, enforce provider-bound login, use unusable hashes
for external accounts, block panel edits of IdP-managed users, and
reconcile provider/role via Go API on PostgreSQL.
2026-06-05 02:24:14 +02:00
UNITRONIX b703db5e5f fix(auth): sync LDAP/OIDC provider and role from Go to panel (#148)
Node now persists auth_provider on SSO provisioning and re-syncs role/provider after Go login success, including SQLite auth.db backfill. Go login returns auth_provider; LDAP group mapping accepts CN keys and newlines. Default agent build cache under dataDir to avoid EACCES.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 02:42:25 +02:00
Knienartowicz 787caf8958 fix(auth): bind accounts to auth provider local/LDAP/OIDC (#148)
Add auth_provider attribute (local/ldap/oidc) to User model across SQLite and PostgreSQL with automatic migration (existing accounts default to local). Rewrite login to be provider-bound: LDAP-backed accounts never fall through to local password verification, OIDC accounts reject password login, and LDAP/OIDC provisioning stores an unusable random local password instead of the provider password. LDAP/OIDC accounts always re-apply provider role mapping on every login so a matching local account can no longer override AD-mapped permissions. Guard handleUpdateUser against setting a local password on non-local accounts. Propagate auth_provider through the Node.js sync layer and panel API, add a Provider column with badges in the users table, hide local password reset for provider-managed accounts, and add EN/PL i18n keys.

This commit was made possible thanks to Insolve.
2026-06-01 09:06:53 +02:00
UNITRONIX 74300c916c Fix user recovery after update
Reported-by: @SterlynKong

Refs: #136
2026-05-09 01:02:00 +02:00
UNITRONIX 452c76069c fix(users): mirror Node panel users to Go server for org linking (#125)
Panel accounts were created only in the Node auth.db while the
Organization 'Add User -> Add Existing' dropdown queries the Go
server's users table via db.ListUsersNotInOrg(). This produced a
mismatch where only the seeded admin appeared as linkable.

Add a userSync service that mirrors create / update / delete /
password-reset operations from the Node panel to the Go server's
/api/users endpoints, plus a one-shot backfill at startup that
creates Go-side records for any pre-existing panel users (random
throwaway password; Node bcrypt remains authoritative for panel
login).

Reported-by: SterlynKong <SterlynKong@users.noreply.github.com>
2026-05-03 01:48:08 +02:00