Commit Graph
87 Commits
Author SHA1 Message Date
Trong Huu Nguyen 66d734358d refactor: use errgroup for coordinated server lifecycle
Move metrics and probe listeners from main.go into server.go and
manage all servers with errgroup. This replaces log.Fatalf goroutines
with proper error propagation and ties all server lifetimes together
so a failure in any listener triggers graceful shutdown of the others.
2026-05-08 07:49:17 +02:00
Trong Huu Nguyen b1e3732ec3 feat: add optional pprof debug endpoints on probe server
Enabled via --pprof-enabled flag. Exposes /debug/pprof/ routes on the
probe bind address for runtime profiling.
2026-05-07 16:01:13 +02:00
Trong Huu Nguyen da089b9fe3 feat: remove automaxprocs
The same features are now supported natively in Go 1.25.
2025-08-26 08:29:27 +02:00
Trong Huu Nguyen 75ff84ba28 refactor: suppress some noisy startup logs 2025-07-09 13:33:40 +02:00
Trong Huu Nguyen 2e3da2bb64 feat: add separate health probe listener
This adds an optional health probe listener, mostly for use in rutime
environments where you want separate public and private listeners.

The existing /oauth2/ping endpoint on the main listener is kept for
backwards compatibility.
2025-07-08 11:26:22 +02:00
Trong Huu Nguyenandsindrerh2 787b54beeb refactor(crypto): move to internal
Co-authored-by: sindrerh2 <sindre.rodseth.hansen@nav.no>
2025-01-30 14:03:36 +01:00
Trong Huu Nguyenandsindrerh2 a157a13b9c refactor(o11y): separate logging and otel packages
Co-authored-by: sindrerh2 <sindre.rodseth.hansen@nav.no>
2025-01-30 14:03:34 +01:00
Trong Huu Nguyenandsindrerh2 dc4c563b26 feat(otel): set more resource attributes
Co-authored-by: sindrerh2 <sindre.rodseth.hansen@nav.no>
2025-01-30 14:03:33 +01:00
Sindre Rødseth HansenandTrong Huu Nguyen 1ed1b611af refactor(otel): clean up shutdown hook
Co-authored-by: tronghn <trong.huu.nguyen@nav.no>
2025-01-30 14:03:32 +01:00
Trong Huu Nguyenandsindrerh2 1f730a3d68 refactor: move logging to observability package
Co-authored-by: sindrerh2 <sindre.rodseth.hansen@nav.no>
2025-01-30 14:03:27 +01:00
Trong Huu Nguyen 3fd8e3f3f3 refactor(otel): clean up error handling 2025-01-30 14:03:24 +01:00
Trong Huu Nguyenandsindrerh2 b7524f516d refactor(otel): move to observability package
Co-authored-by: sindrerh2 <sindre.rodseth.hansen@nav.no>
2025-01-30 14:03:21 +01:00
Trong Huu Nguyen b53c76031d feat: use automemlimit for cgroup-aware limits 2025-01-14 08:36:21 +01:00
Trong Huu Nguyen d2e01b2ead refactor: consolidate cookie config, correct documentation 2024-11-05 21:24:25 +01:00
Trong Huu Nguyen 70a45e1522 style: formatting 2023-11-28 10:15:32 +01:00
Trong Huu Nguyen b3a7dbf081 refactor(otel): move configuration 2023-11-24 16:52:05 +01:00
Trong Huu Nguyen 14735484c3 refactor(otel): remove unneeded meter provider 2023-11-24 16:39:49 +01:00
J-K. Solbakken b5fe1c916f include cluster name in otel service name so they can be queried separately 2023-11-23 10:59:56 +01:00
J-K. Solbakken 38b9891caf use otelchi middleware for http tracing 2023-11-23 08:53:36 +01:00
J-K. Solbakken 795c91950d change otel exporter from stdout to grpc 2023-11-22 10:03:22 +01:00
J-K. Solbakken 23268c6762 starting simple 2023-11-21 08:47:42 +01:00
Trong Huu Nguyen 350d7ff780 feat(cookie): allow configuration of name prefix
This is to alleviate issues with deployments on different
subdomains using overlapping cookie names where browsers
behave unpredictably.
2023-05-08 10:23:27 +02:00
Trong Huu Nguyen 07cf8e12b3 feat(cookie): support overriding session cookie name 2023-03-01 11:27:26 +01:00
Trong Huu Nguyen 5342913676 refactor: move cookie options to handler constructors 2023-02-24 18:21:36 +01:00
Trong Huu Nguyen 492e0b5625 feat(sso/proxy): implement upstream reverseproxy with prerequisites 2023-02-21 14:50:51 +01:00
Trong Huu Nguyen 3274cc5c65 refactor: move redirect package into url, clean up naming 2023-02-16 09:24:39 +01:00
Trong Huu Nguyen 42dcba8367 refactor: replace relative canonical redirect with handler
This also ensure that we clean any urls that may stem from user input (e.g.
url parameter or login cookie) before performing redirects.
2023-02-10 14:58:14 +01:00
Trong Huu Nguyen c3c0c01926 feat(sso): partially implement handlers 2023-02-10 14:58:09 +01:00
Trong Huu Nguyen a4e4fc752e refactor(handler): remove provider name getter from handler 2023-02-10 14:57:57 +01:00
Trong Huu Nguyen 3d08d0b4b0 feat: initial skeleton setup for SSO mode 2023-02-10 14:57:56 +01:00
Trong Huu Nguyen bd748b9cef refactor(openid/provider): use name from config instead of indirection layer 2023-02-10 14:57:56 +01:00
Trong Huu Nguyen e76bb5c369 perf: use automaxprocs to prevent cpu throttling under cgroup quotas 2022-11-24 11:36:54 +01:00
Trong Huu Nguyen 08eefbf1d5 refactor(openid): clean up client and provider 2022-09-02 18:08:36 +02:00
Trong Huu Nguyen 92ee6313c5 refactor: remove unnecessary interfaces 2022-09-02 17:39:27 +02:00
Trong Huu Nguyen 9144056e28 refactor(handler): split up request handlers into separate modules 2022-09-02 14:53:11 +02:00
Trong Huu Nguyen d5bbca9897 feat: rudimentary support for refresh tokens 2022-08-26 14:32:39 +02:00
Trong Huu Nguyen 5990e4bb71 refactor(session): extract session handler 2022-08-19 11:44:13 +02:00
Trong Huu Nguyen ae8028cc96 refactor: remove cookie session fallback store
The implementation is error-prone and difficult to maintain.
We instead just assume that the backing session store is highly
available.
2022-08-17 20:44:07 +02:00
Trong Huu Nguyen b4e6e97448 refactor(metrics): use const label for hpa, ensure provider label is set 2022-07-20 14:50:13 +02:00
Trong Huu Nguyen 13f1713fc2 refactor(config): move loading and setup into init 2022-07-20 11:21:54 +02:00
Trong Huu Nguyen eac2d5789d refactor: passthrough for consistency in openid configuration 2022-07-20 09:58:49 +02:00
Trong Huu Nguyen bece03c94e refactor(middleware/logentry): replace zerologger with logrus 2022-07-18 15:47:35 +02:00
Trong Huu Nguyen f504bb0030 refactor: add logger field to config logger 2022-07-18 09:35:05 +02:00
Trong Huu Nguyen ef649e7aaa feat: add allowlisting of paths for autologin 2022-07-17 20:11:55 +02:00
Trong Huu Nguyen e3b9d33296 refactor: split out packages from router 2022-07-15 07:44:54 +02:00
Trong Huu Nguyen 42938ee8b3 refactor(handler): deduplicate configuration 2022-07-05 14:43:40 +02:00
Trong Huu Nguyen a4c3e72fc9 fix(router/handler): use long-lived context for refreshing jwks 2022-07-05 13:18:38 +02:00
Trong Huu Nguyen 1f5635239a refactor: split out openid client, config and provider
There's a bunch of changes here, but in essence:

- split out openid configuration
- separate openid configuration between client/rp and provider
- consolidate client and provider related code in separate packages

These changes allow for simplification of the Handler, as well as a
bunch of test/mock code as the configuration is now instantiated
seperately from the client/provider code.
2022-07-05 13:09:00 +02:00
Trong Huu Nguyen d1559f5479 style(main): rename variable for clarity 2022-07-04 15:18:40 +02:00
Trong Huu Nguyen f0318b269e fix: ensure jwk set is refreshed regularly 2022-03-01 07:49:51 +01:00