Commit Graph
34 Commits
Author SHA1 Message Date
moebiusbandandClaude Opus 4.8 63a82d022b feat(auth): assign elevated LDAP roles via configurable filters
The LDAP sync only ever granted the base "user" role. Add an optional
auth.ldap.role-filters map (role -> LDAP filter) so accounts matching a
filter are granted that elevated role (admin/support/api/manager).

LDAP is authoritative for the configured roles: sync both adds and removes
them to match group membership, while roles not listed (e.g. a manually
granted manager) are preserved. A managed manager that still has assigned
projects is never stripped. With no role-filters configured behaviour is
identical to before.

Roles are reconciled during periodic sync and at login. Sync evaluates
each filter once over the whole base (one search per role, not per user)
and reconciles existing users via a single ListUsers lookup plus the new
UserRepository.UpdateRoles helper.

Closes #74

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: e38526c3259d
2026-06-19 06:36:55 +02:00
moebiusband 84fe61b3e0 fix: allow all role changes on SyncUser and UpdateUser callback
Entire-Checkpoint: 496bace0120e
2026-04-01 11:09:50 +02:00
moebiusband 3314b8e284 Ignore ErrNoRows error. Include calling function in log.
Entire-Checkpoint: 20746187d135
2026-03-16 20:09:44 +01:00
moebiusband 51517f8031 Reduce insert pressure in db. Increase sqlite timeout value
Entire-Checkpoint: a1e2931d4deb
2026-03-16 11:17:47 +01:00
moebiusband eba3995610 Add Analyse on db startup
Entire-Checkpoint: ea70a955214d
2026-03-11 05:28:52 +01:00
Christoph Kluge d00aa2666d activate update of roles and projects if updateUserOnLogin is set 2026-02-27 15:20:09 +01:00
moebiusband 6035b62734 Run go fix 2026-02-17 21:04:17 +01:00
moebiusband 8f0bb907ff Improve documentation and add more tests 2026-01-15 06:41:23 +01:00
moebiusband 8576ae458d Switch to cc-lib v2 2025-12-24 09:24:18 +01:00
Christoph Kluge 471ec1cd2e change deprecated defaultMetrics loader to new confkey
- see PR #333
2025-10-08 18:24:41 +02:00
moebiusband 639e1b9c6d Port to cc-lib. Extend legal header. 2025-06-30 12:06:35 +02:00
exterr2f f158eaa29c Add default_metrics.json which sets the defaults for job_view_selectedMetrics:cluster for new users 2025-02-10 09:39:49 +01:00
moebiusband 4849928288 Rename old column name for user
Fixes #314
2024-12-10 16:35:43 +01:00
moebiusband 35bd7739c6 fix: Replace reserved keywords in database schemas
Port migration to mariadb
2024-11-21 15:02:30 +01:00
moebiusband ee3710c5ed Merge branch 'master' into dev 2024-11-09 09:01:04 +01:00
Christoph Kluge 2c8b73e2e2 add logged timing to homeroute calls 2024-10-31 14:34:32 +01:00
Christoph Kluge eabc6212ea add debug logging for user context and web render 2024-10-31 13:36:27 +01:00
Christoph Kluge 1b5f4bff2c feat: SyncUserOnLogin now updates name of token logged user 2024-09-09 10:32:26 +02:00
moebiusband ac9bba8b5b Restructure and simplify job repo 2024-07-04 15:05:24 +02:00
moebiusband fb8bbea99d Remove year in copyright notice 2024-04-11 23:04:30 +02:00
Pay Giesselmann 81d9015d59 :fix delete user logging 2023-08-29 09:29:56 +02:00
moebiusband 15231bc683 Cleanup and adapt to new structure 2023-08-17 12:34:30 +02:00
moebiusband 87ce4f63d4 Refactor auth module
Separate parts
Add user repository
Add user schema
2023-08-17 10:29:00 +02:00
Christoph KlugeandGitHub de71fee61e Merge pull request #98 from giesselmann/fix-updateconfig
Fix UpdateConfig
2023-03-21 12:09:40 +01:00
Pay GiesselmannandGitHub de822e13fd Fix UpdateConfig 2023-03-13 10:45:55 +01:00
Christoph Kluge 4f1f034702 Move ShortRunningJobsDuration value to root config 2023-03-01 16:34:59 +01:00
moebiusband 8ffb562d6b Introduce db migration support 2023-02-21 10:57:22 +01:00
Christoph Kluge ef1b2d7a81 Fix typo 2023-02-01 12:29:58 +01:00
Christoph Kluge a885e69125 Adapt loglevel for logs, shorten strings, fix formats, streamline
- Switched to Warn for most errors, reduces bloat, improves log control
2023-02-01 11:58:27 +01:00
Christoph Kluge b77bd078e5 Add log messages to error events w/o log message, primaryly error level
- "log spam" to be controlled via loglevel flag on startup
2023-01-31 18:28:44 +01:00
Christoph Kluge 79a949b55e Rework pkg/log, add 'loglevel' and 'logdate' flags, streamline
- removes some previously added manual location strings: now handled by pkg/log depending on loglevel
- kept manual string locations on fmt print functions
- add 'notice' and 'critical' loglevels
- add 'Panic' and 'Panicf' functions to log panics
- adresses issue #26
2023-01-23 18:48:06 +01:00
Christoph Kluge 24a4244f19 add more information to existing errors logs and panics
- '$ROOT/$FILE' for better localization in the code
- add text where none was given
- fix unnecessary sprintf nesting in influxv2 and prometheus metricrepo logging
2023-01-19 16:59:14 +01:00
Jan Eitzinger 10c6b366a5 Refactor UserCfg, add test 2022-09-12 13:34:21 +02:00
Jan Eitzinger fc76eed899 Refactor package structure
Builds but not tested
2022-09-05 17:46:38 +02:00