Commit Graph

434 Commits

Author SHA1 Message Date
Trong Huu Nguyen
c8f148d892 refactor(handler/error): remove custom redirect
Reduce the risk of exposing oauth query parameters in "dirty dancing" attacks.
2023-02-10 14:58:14 +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
54a43d832a feat(redirect): extract package for creating and validating canonical redirects 2023-02-10 14:58:13 +01:00
Trong Huu Nguyen
1f60d750f2 fix(mock): correct middleware for request generator 2023-02-10 14:58:13 +01:00
Trong Huu Nguyen
5f74ee08bc refactor(url): extract utility functions 2023-02-10 14:58:12 +01:00
Trong Huu Nguyen
d13525f8a2 fix(handler/error): correct retry url for local logout 2023-02-10 14:58:12 +01:00
Trong Huu Nguyen
0e73c9b4d8 refactor(mock): configure relying party ingress before server start 2023-02-10 14:58:11 +01:00
Trong Huu Nguyen
1fdbe75c9e feat(sso/proxy): implement login handler 2023-02-10 14:58:11 +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
2f6a3682d9 fix(all): use url.ParseRequestURI instead of just url.Parse where necessary 2023-02-10 14:57:55 +01:00
Trong Huu Nguyen
f4bba075a6 refactor(handler/error): reduce log severity for context canceled errors 2023-02-10 14:57:55 +01:00
Trong Huu Nguyen
61a7a8f161 refactor: clean up errors and reverseproxy logging 2023-02-10 14:57:53 +01:00
Trong Huu Nguyen
ce177fb4a5 refactor(handler/url): remove unneeded redirect parameter encoding 2023-02-10 14:57:52 +01:00
Trong Huu Nguyen
07fc0e24dd perf(handler/autologin): cache NeedsLogin results 2023-02-10 14:57:51 +01:00
Trong Huu Nguyen
bd53417f8b refactor(handler): move handler tests to separate files 2023-02-10 14:57:48 +01:00
Trong Huu Nguyen
f51fe97b23 refactor(handler): flatten handler modules 2023-02-10 14:57:48 +01:00
Trong Huu Nguyen
6a142cf5a5 refactor(handler): use session cookie for frontchannel logout if available, clean up logout handlers 2023-02-10 14:57:48 +01:00
Trong Huu Nguyen
67d3977cc1 refactor(handler/sessionrefresh): use found session key instead of looking up key again 2023-02-10 14:57:47 +01:00
Trong Huu Nguyen
ae31267fd1 refactor: simplify returning boolean expressions 2023-02-10 14:57:47 +01:00
Trong Huu Nguyen
a682f08715 ci: add staticcheck and govulncheck 2023-02-10 14:57:46 +01:00
Trong Huu Nguyen
c3a5033968 test(handler): add test for authorization headers, ensure upstream validates token 2023-02-10 14:57:45 +01:00
Michal J. Sladek
d1b810a317 Add support for Apple Silicon (linux/arm64) platform. (#69)Fixes https://github.com/nais/wonderwall/issues/67 2023-02-10 13:05:25 +01:00
dependabot[bot]
da54f4fcc5 build(deps): bump github.com/spf13/viper from 1.14.0 to 1.15.0 (#65)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 09:16:41 +01:00
dependabot[bot]
d8493e1e7b build(deps): bump github.com/alicebob/miniredis/v2 from 2.23.1 to 2.30.0 (#62)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 08:42:51 +00:00
dependabot[bot]
fb8a4edb71 build(deps): bump golang.org/x/oauth2 from 0.3.0 to 0.4.0 (#63)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 09:40:57 +01:00
dependabot[bot]
a925a3f112 build(deps): bump github.com/bmatcuk/doublestar/v4 from 4.4.0 to 4.6.0 (#64)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 09:36:21 +01:00
Trong Huu Nguyen
4291de3afc ci: re-run workflow for 0cb51a3 2022-12-19 15:36:19 +01:00
dependabot[bot]
0cb51a32ba build(deps): bump github.com/alicebob/miniredis/v2 from 2.23.0 to 2.23.1 (#60) 2022-12-19 14:29:25 +00:00
Trong Huu Nguyen
af78c91c09 ci: prefix sha-tags with date 2022-12-19 15:13:06 +01:00
Trong Huu Nguyen
9cf982fd6a ci: add write permission to allow publishing to ghcr 2022-12-19 15:02:54 +01:00
Trong Huu Nguyen
b3c50acb76 docs: use mermaid for diagrams 2022-12-19 13:04:12 +01:00
Trong Huu Nguyen
4896f9aa41 deps: more bumps 2022-12-19 09:45:16 +01:00
Trong Huu Nguyen
55c615f095 ci: set up jobs for publishing to GAR 2022-12-16 15:07:01 +01:00
Trong Huu Nguyen
f65f7a695b build: use latest go version, 1.19.4 2022-12-16 14:55:08 +01:00
Trong Huu Nguyen
0485074829 refactor(handler/reverseproxy): reduce log severity for invalid auth state 2022-12-16 14:53:35 +01:00
Trong Huu Nguyen
1d754baabe feat(handler/reverseproxy): preserve incoming authorization for unauthenticated sessions 2022-12-16 14:53:27 +01:00
Trong Huu Nguyen
4ee771856a deps: bump em 2022-12-02 13:49:27 +01:00
Trong Huu Nguyen
2f6dc9c779 refactor(session/handler): reduce log severity for lock release, adjust lock duration and timeout 2022-12-02 13:47:59 +01:00
Trong Huu Nguyen
185485a6fe feat(handler/autologin): use doublestar library for nested path matching
Fixes #54.
2022-11-24 11:36:54 +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
16fa07921f chore: bump dependencies 2022-11-24 11:36:51 +01:00
Trong Huu Nguyen
e7244df4d5 feat: add local logout endpoint 2022-11-24 11:36:49 +01:00
Hans Kristian Flaatten
30f155a644 Add CodeQL Code Scanning (#58) 2022-11-10 09:22:14 +01:00
Trong Huu Nguyen
0b381bbb00 test(session/data): fix flaky expire test 2022-10-17 12:06:03 +02:00
Trong Huu Nguyen
82743f76bb test(session/data): fix flaky timeout test 2022-10-17 12:00:44 +02:00
Trong Huu Nguyen
002e4ac8ea feat(handler/error): automatically retry errors before displaying error page 2022-10-11 10:55:14 +02:00
Trong Huu Nguyen
bdec8c662c refactor(router): correct HTTP verb for session refresh endpoint
Since this changes the state for a user's session, a POST is more
appropriate than just a GET - even though the POST body is empty.

We keep the GET route temporarily to allow any consumers to migrate.
2022-10-11 09:22:03 +02:00