212 Commits

Author SHA1 Message Date
Ryan Richard a6fca1d101 support building with GOFIPS140
Signed-off-by: Ryan Richard <richardry@vmware.com>
2026-07-06 10:35:16 -07:00
Ryan Richard 6223b41286 retry when github user api 401's during login
Signed-off-by: Ryan Richard <richardry@vmware.com>
2026-07-02 13:43:45 -07:00
Ryan Richard 531d40a82e fix some unit test failures caused by k8s bump
Signed-off-by: Ryan Richard <richardry@vmware.com>
2026-05-06 08:53:00 -07:00
Ryan Richard d863e77b19 fix linters errors about deprecated functions
Signed-off-by: Ryan Richard <richardry@vmware.com>
2026-05-06 08:34:17 -07:00
Ryan Richard 5f38bc05c4 upgrade linter and fix/ignore all new lint warnings 2026-03-27 10:08:17 -07:00
Ryan Richard e5366d782d fix new linter warnings from prealloc linter 2026-02-13 15:19:15 -08:00
Ryan Richard 54d530784d upgrade to golangci-lint v2.7.2, bring back some nolint directives 2025-12-22 11:03:46 -08:00
Ryan Richard 44509d016e standardize import of "k8s.io/client-go/kubernetes/fake" 2025-12-22 10:34:53 -08:00
Ryan Richard 5218c20c76 upgrade linter and remove newly unused linter directives 2025-12-05 10:56:33 -08:00
Joshua Casey 1c1b3b7f2e Bump golangci-lint to 2.3.0 and fix issues 2025-07-30 10:25:23 -05:00
Ryan Richard 2a83d00373 add claimValidationRules, userValidationRules, and claims.extra to JWTAuthenticator CRD 2025-07-16 14:56:44 -07:00
Ryan Richard c600cf7949 upgrade linter to latest 2025-05-12 15:19:50 -07:00
Ryan Richard 749633e43c support response_mode=form_post in upstream OIDC IDPs 2025-03-06 15:28:47 -08:00
Joshua Casey 1d873be184 Make sure that CEL errors are checked for the appropriate Kube version 2025-01-27 10:46:55 -06:00
Joshua Casey f388513145 resolve TODO by adding docs 2024-11-27 13:53:02 -06:00
Joshua Casey dc6faa33bb Log params to token_handler endpoint even during error cases 2024-11-27 13:53:01 -06:00
Ryan Richard 1006dd9379 resolve some todos 2024-11-27 13:53:01 -06:00
Joshua Casey 09ca7920ea Extract testutil helper function 2024-11-27 13:53:00 -06:00
Joshua Casey dd56f2b47f Add audit event tests for callback_handler 2024-11-27 13:53:00 -06:00
Joshua Casey d729c82f84 fix lint 2024-11-27 13:53:00 -06:00
Joshua Casey 44e218194b Add 'AuthorizeID From Parameters' audit logs to the /callback and /login endpoints
Co-authored-by: Ryan Richard <richardry@vmware.com>
2024-11-27 13:53:00 -06:00
Joshua Casey bf1e37f149 Use a helper to verify audit messages 2024-11-27 13:53:00 -06:00
Joshua Casey aee56c388f Check the sessionID as well
Co-authored-by: Ryan Richard <richardry@vmware.com>
2024-11-27 13:53:00 -06:00
Joshua Casey b20e890f15 Add testutil.RequireLogLines to verify multiple log lines at once 2024-11-27 13:53:00 -06:00
Ryan Richard 4f661aaa69 pay attention to web proxy settings during connection probes
- WebhookAuthenticator will now detect the proxy setting and skip
  dialing the connection probe if it should go through a proxy
- GitHubIdentityProvider will avoid using tls.Dial altogether
  by instead making a real request to the GitHub API as its
  connection probe, because this will respect the proxy settings
2024-10-10 10:41:31 -07:00
Joshua Casey 08abff1cae Bump golanglint-ci to 1.60.3 2024-09-04 20:52:01 -05:00
Joshua Casey c87f091a44 Upcoming k8s versions have an additional extra field in the CSR response
- failure due to https://github.com/kubernetes/kubernetes/pull/125634
2024-09-04 11:23:11 -05:00
Joshua Casey 436112252d Lint fixes 2024-08-27 13:26:39 -05:00
Joshua Casey 504f0dc26f Fix some unit tests 2024-08-27 13:26:38 -05:00
Joshua Casey bf1c02d328 jwtauthenticator controller redoes validations when external CA bundle changes
Co-authored-by: Ryan Richard <richardry@vmware.com>
2024-08-05 11:32:19 -07:00
Ryan Richard 0380a9ce33 upgrade github.com/go-jose/go-jose and github.com/coreos/go-oidc
Also standardize some related imports and fix some whitespace in a test
2024-06-21 11:16:40 -07:00
Joshua Casey 678be9902a Lint new files from the GitHub branch 2024-06-11 10:16:18 -05:00
Joshua Casey bafd578866 Merge branch 'main' into jtc/add-importas-linter 2024-06-11 09:39:48 -05:00
Joshua Casey 58b4ecc0aa user sees error msg when GitHub login is denied due to allowed orgs
Also renamed an interface function from GetName to GetResourceName.

Co-authored-by: Ryan Richard <richardry@vmware.com>
2024-06-03 10:56:28 -07:00
Joshua Casey d3fb567fdb Add callback_handler tests for GitHub+IdentityTransformations
Co-authored-by: Ryan Richard <richardry@vmware.com>
2024-05-28 15:59:52 -05:00
Ryan Richard f323690049 refactor upstream refresh test helpers to be more specific to IDP type 2024-05-23 13:35:31 -07:00
Joshua Casey 65682aa60d Add sample unit test for GitHub in token_handler_test.go 2024-05-22 23:04:15 -05:00
Ryan Richard 8f8db3f542 Make github org comparison case-insensitive, but return original case
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
2024-05-22 21:21:45 -05:00
Ryan Richard 8923704f3c Finish initial github login flow
Also:
- fix github teams query: fix bug and sort/unique the results
- add IDP display name to github downstream subject
- fix error types returned by LoginFromCallback
- add trace logs to github API results
- update e2e test
- implement placeholder version of refresh for github
2024-05-22 21:21:45 -05:00
Ryan Richard 49c468f00a Add GetUser() interface and implement LoginFromCallback() for GitHub
ALso fixed some of the GitHub test helpers
2024-05-22 21:21:45 -05:00
Joshua Casey b7f79f0adc Add github-specific tests in callback_handler_github_test.go
Co-authored-by: Ryan Richard <richardry@vmware.com>
2024-05-22 21:21:45 -05:00
Joshua Casey fe911a7b7a Prefer slices package and slices.Concat where possible 2024-05-21 09:31:16 -05:00
Joshua Casey 513f43f465 Enforce more imports
- go.pinniped.dev/generated/latest/apis/concierge/config/v1alpha1
- go.pinniped.dev/generated/latest/client/concierge/clientset/versioned
- go.pinniped.dev/generated/latest/client/concierge/clientset/versioned/scheme
- go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned
- go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/scheme
2024-05-21 09:31:15 -05:00
Joshua Casey f5116cddb4 Enable 'makezero' and 'prealloc' linters, and require 'any' instead of 'interface{}'
Enforce importas:

- go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1
- go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1
2024-05-21 09:31:15 -05:00
Joshua Casey e9252a9ee3 Enforce more imports
- k8s.io/apimachinery/pkg/apis/meta/v1
- k8s.io/api/core/v1
- github.com/coreos/go-oidc/v3/oidc
- github.com/ory/fosite/handler/oauth2
- go.pinniped.dev/generated/latest/apis/concierge/authentication/v1alpha1
2024-05-21 09:31:15 -05:00
Joshua Casey 875b0739aa Enforce aliases for 'k8s.io/apimachinery/pkg/util/errors' and 'k8s.io/apimachinery/pkg/api/errors' 2024-05-21 09:31:15 -05:00
Joshua Casey f43b6f04dc Fix lint issues from golangci-lint 1.58.1 2024-05-10 15:15:59 -05:00
Joshua Casey 791b785dea Merge branch 'main' into jtc/merge-main-at-d7849c79-to-github 2024-05-10 14:22:09 -05:00
Joshua Casey 81f3acfa38 Update some build tags since go1.22+ is now required 2024-05-10 12:51:03 -05:00
Ryan Richard 0cdbb710d2 add test for github redirect in auth_handler_test.go
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
2024-05-09 15:35:37 -07:00