Commit Graph
151 Commits
Author SHA1 Message Date
moebiusbandandClaude Opus 4.8 83d04dff17 feat(auth): replace .env/godotenv secret handling with config-based secrets
Secrets (JWT keys, LDAP sync password, OIDC client id/secret, cross-login
keys) are now configured directly in config.json under the auth section
where they are used. Each secret can still be supplied via its existing
environment variable, which takes precedence over the config value.

The godotenv dependency, the .env file, configs/env-template.txt and the
loadEnvironment() bootstrap step are removed. -init now writes the demo
JWT keys into config.json instead of a .env file.

Closes #283

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 3a7cb814c53f
2026-06-17 12:28:17 +02:00
moebiusbandandClaude Opus 4.8 1b72b0b5ad Fix critical/severe issues in init, startup and shutdown
- auth: do not abort the server when authentication is disabled. auth.Init
  is now always called; with disable-authentication it sets up an ephemeral
  session store (SESSION_KEY not required) and registers no authenticators,
  so the unconditional auth.GetAuthInstance() callers (server init,
  api.New()) always get a valid instance.
- main: run the graceful-shutdown sequence on the startup-error path. runServer
  derives a cancelable context and, on a server-start failure, cancels it and
  waits so the metricstore final checkpoint / WAL rotation, archiver flush and
  taskmanager shutdown actually run before exit.
- server: log the :80 HTTP->HTTPS redirect listener error instead of dropping it.
- archiver: guard Shutdown against being called when Start never ran
  (avoids close(nil) panic / blocking on a nil workerDone).
- nats API: stop worker goroutines on shutdown via a stop channel + idempotent
  Shutdown(); workers and subscription callbacks select on stop and the
  channels are never closed, so no send-on-closed-channel can occur. Wired
  into Server.Shutdown after the NATS client is closed.
- metricstore: make Shutdown idempotent (nil shutdownFunc, early return) and
  release shutdownFuncMu before the checkpoint write.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 3c179f9caa8f
2026-06-05 10:16:28 +02:00
moebiusband 45f329e5fb feat: Add command line switch to trigger manual metricstore checkpoint cleanup
Entire-Checkpoint: 29b9d52db89c
2026-03-23 07:58:35 +01:00
moebiusband df93dbed63 Add busyTimeout config setting
Entire-Checkpoint: 81097a6c52a2
2026-03-16 11:30:21 +01:00
moebiusband 0e27624d73 Add flag to optimize db. Remove ANALYZE on startup.
Entire-Checkpoint: d49917ff4b10
2026-03-12 20:12:49 +01:00
moebiusband 00d2f97c4c fix: Large heap allocations in sqlite driver. Sanitize sqlite config and make it configurablex. Allow to cancel queries. 2026-03-11 11:14:37 +01:00
moebiusband 70fea39d03 Add note on dynamic memory management for restarts 2026-03-06 10:56:23 +01:00
Christoph Kluge 718ff60221 clarify ccms logs 2026-03-02 16:24:38 +01:00
moebiusband 03c65e06f6 Allow finer control for omit tagged jobs in retention policies 2026-02-23 08:46:47 +01:00
moebiusband 90b52f997d Cleanup and handle error in AppTagger 2026-02-19 08:24:39 +01:00
moebiusband 8d6c6b819b Update and port to cc-lib 2026-02-11 07:06:06 +01:00
moebiusband 98661aad15 Increase default GC frequency 2026-01-28 10:41:44 +01:00
moebiusband 752e19c276 Pull out metric List build from metricstore Init 2026-01-27 17:06:52 +01:00
moebiusband b307e885ce feat: Add support for multiple external metric stores 2026-01-27 10:02:07 +01:00
moebiusband 499b4287f9 Switch to cclib nats client 2026-01-23 10:04:41 +01:00
moebiusband f41301036b Move metricstore from internal to pkg 2026-01-23 07:49:47 +01:00
moebiusband 1d4c79c821 Unify JSON attribute naming ot use kebab style case. Cleanup configuration. 2026-01-20 09:47:13 +01:00
moebiusband 5281f3bb60 Remove obsolete config option disable-archive 2026-01-19 16:42:30 +01:00
moebiusband 155e05495e Fix shutdown timout bug 2026-01-15 13:29:19 +01:00
moebiusband 9c92a7796b Introduce nodeprovider interface to break import cycle 2026-01-15 12:20:11 +01:00
moebiusband cb219b3c74 Fix configuration issues. Fix shutdown hangs
Always turn on compression
2026-01-15 11:34:06 +01:00
moebiusband a9366d14c6 Add README for tagging. Enable tagging by flag without configuration option 2026-01-13 08:32:32 +01:00
moebiusband 4cec933349 Remove obsolete cluster config section 2026-01-13 06:28:33 +01:00
moebiusband 11ec2267da Major refactor of metric data handling
- make the  internal memory store required and default
- Rename memorystore to metricstore
- Rename metricDataDispatcher to metricdispatch
- Remove metricdata package
- Introduce metricsync package for upstream metric data pull
2025-12-25 08:42:54 +01:00
moebiusband 8576ae458d Switch to cc-lib v2 2025-12-24 09:24:18 +01:00
moebiusband 1cd4a57bd3 Remove support for mysql/mariadb 2025-12-20 11:13:41 +01:00
Aditya Ujeniya 32e5353847 Fix to NATS deadlock and revert demo script 2025-12-17 18:14:36 +01:00
Aditya Ujeniya d2f2d78954 Changing JWT output to stdout and change to help text 2025-12-17 15:58:42 +01:00
moebiusband 4ecc050c4c Fix deadlock if NATS is not configured 2025-12-17 07:03:01 +01:00
moebiusband 14f1192ccb Introduce central nats client 2025-12-16 09:35:33 +01:00
moebiusband 97a322354f Refactor 2025-12-15 14:06:33 +01:00
moebiusband cfa7461855 Refactor 2025-12-15 13:25:41 +01:00
moebiusband f13be109c2 Fix: Replace all Printf log messages with appropriate loglevels 2025-12-11 11:20:11 +01:00
moebiusband 8d44ac90ad Fix: Busywait loop in archiver and slow shutdown
Remove unblocking default in select
Add shutdown handler with context and timeout
2025-12-11 09:29:10 +01:00
moebiusband 329b6e5640 Review refactored code 2025-12-03 14:54:09 +01:00
moebiusband f7a0954213 Fix init order. Reformat. 2025-11-20 14:26:27 +01:00
moebiusband ecc6194b57 Refactor main package
Fix issues.
Break down main routine.
Add documentation.
Remove globals.
2025-11-19 16:53:04 +01:00
moebiusband bc43c844fc Fix memoryStore Init and move MetricConfig init 2025-10-20 10:22:40 +02:00
moebiusband bac51891b7 Move avro into memorystore. Refactor
Does not compile
2025-10-18 08:30:42 +02:00
moebiusband 89055506d6 Revert changes to ui config init 2025-10-15 08:54:16 +02:00
Aditya Ujeniya b2368a0751 Connectivity to CCMS feature readded 2025-09-10 14:23:18 +02:00
Aditya Ujeniya af43901ca3 Trial and Test MetricStore components 2025-09-08 22:54:13 +02:00
Aditya Ujeniya 62565b9ae2 Combined metricstore api and functions 2025-09-08 11:29:27 +02:00
Aditya Ujeniya bca176170c Migration SQL fix 2025-09-03 08:22:15 +02:00
moebiusband 0754ba5292 Port configuration to ccConfig scheme
Decentralize config validation
Modularize configuration handling
2025-07-07 13:09:12 +02:00
moebiusband 639e1b9c6d Port to cc-lib. Extend legal header. 2025-06-30 12:06:35 +02:00
moebiusband f14bdb3068 Fix bugs in job classifier and tagger infrastructure 2025-05-26 13:08:03 +02:00
moebiusband 3c66840f95 Add tagger config option and command line switch to run taggers on all jobs 2025-05-23 10:13:59 +02:00
moebiusband 85f17c0fd8 Refactor Tagger package. Add fsNotify Service 2025-05-19 16:08:43 +02:00
moebiusband 23e8f3dc2d Port to godotenv library
Fixes #376
2025-05-13 14:46:01 +02:00