Commit Graph

1485 Commits

Author SHA1 Message Date
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 c6749560b5 Fix plog test assertions that contain the plog library version 2024-05-22 09:35:16 -05:00
Joshua Casey 2f9df8c8e2 Add module generate command and update all generated files 2024-05-21 10:43:52 -05:00
Joshua Casey 0076f1251c Move all mock files into internal/mocks and use mock prefix 2024-05-21 10:38:25 -05:00
Joshua Casey fe911a7b7a Prefer slices package and slices.Concat where possible 2024-05-21 09:31:16 -05:00
Joshua Casey bdd79a9984 Enforce more imports
- go.pinniped.dev/generated/latest/client/concierge/clientset/versioned/fake
- go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/fake
- go.pinniped.dev/generated/latest/client/concierge/informers/externalversions
- go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions
2024-05-21 09:31:15 -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 e4daa5a924 Merge branch 'main' into jtc/merge-main-at-3fe3cf71-into-github 2024-05-16 16:05:34 -05:00
Ryan Richard 7e0a3c114d Pinniped CLI and the oidc-client package are now enhanced by pinniped_supported_identity_provider_types
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
2024-05-16 12:57:12 -05:00
Joshua Casey a86d7d27c1 Add pinniped_supported_identity_provider_types to the IDP discovery endpoint 2024-05-16 12:55:45 -05:00
Joshua Casey 69364b2183 Merge branch 'main' into jtc/merge-main-at-6b3f175-into-github 2024-05-16 09:22:28 -05:00
Ryan Richard e13f4a7f29 refactor ptls to clarify the difference between FIPS and non-FIPS modes
and backfill some basic tests
2024-05-13 16:52:15 -07: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
Joshua Casey e9d0ac5110 Enable 'intrange' linter 2024-05-10 12:51:02 -05:00
Joshua Casey 7b36c8ab54 Enable 'copyloopvar' linter 2024-05-10 12:51:02 -05:00
Joshua Casey e04e5e0185 Fix revive linter issues for all production code, and exclude revive linter issues for test code 2024-05-10 12:51:02 -05:00
Joshua Casey 67d3b5fb82 Fix misspell lint issues 2024-05-10 12:51:01 -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
Joshua Casey 75f024cb19 Fix lint 2024-05-09 15:35:37 -07:00
Joshua Casey 32e4e0d835 Add TestGenerateOTPCode 2024-05-09 15:35:37 -07:00
Ryan Richard 7c85a511a2 first draft of an e2e integration test for GitHub login (skip while WIP) 2024-05-09 15:35:37 -07:00
Ryan Richard 6be92f92fb bump Supervisor session storage versions 2024-05-09 15:35:37 -07:00
Ryan Richard 7277d00e1a refactor upstreamgithub.ProviderConfig to hold more config 2024-05-09 15:35:37 -07:00
Benjamin A. Petersen 29eb3dd384 Update GitHub UpstreamAuthorizeRedirectURL to generate URLs 2024-05-09 15:35:37 -07:00
Ryan Richard afb032f8f9 Merge branch 'main' into github_identity_provider 2024-05-07 13:08:50 -07:00
Ryan Richard 85e5970d6e only auto-detect version v1 of ValidatingAdmissionPlugin during startup 2024-05-06 09:11:39 -07:00
Joshua Casey e6cb439d9c Merge branch 'main' into ben/fuzzing-error-message 2024-05-02 12:12:18 -05:00
Benjamin A. Petersen fbc3334e8c Improve TestFuzzAndJSONNewValidEmptyAuthorizeCodeSession message 2024-05-02 11:36:24 -04:00
Ryan Richard ad7df9f7d1 don't remove user's ability to configure http port to listen on loopback 2024-05-01 12:36:39 -07:00
Joshua Casey d67238d46f Remove code related to deprecated config params logLevel and HTTP networking 2024-05-01 12:36:39 -07:00
Ryan Richard 0a63dd104d fix test failures caused by dep bump and update replace statements 2024-05-01 11:01:13 -07:00
Benjamin A. Petersen e0591500ce Update fuzz test 2024-05-01 12:57:00 -04:00
Benjamin A. Petersen c43193a0c8 Merge branch 'main' into github_identity_provider 2024-05-01 12:15:08 -04:00
Ryan Richard 3bdb380a1a don't change public signature of endpointaddr.Parse() 2024-04-29 13:31:49 -07:00
Ryan Richard 9838a7cb6d avoid the ValidatingAdmissionPolicy admission plugin when it can't work 2024-04-29 13:22:14 -07:00
Benjamin A. Petersen 6424f45c19 Add IDP Discovery integration test for GitHub 2024-04-29 14:57:14 -04:00
Joshua Casey 9c2df74e54 Adjust to new K8s 1.30 API 2024-04-26 11:54:53 -07:00
Benjamin A. Petersen 8a961bfa21 Add upstreamgithub unit tests 2024-04-25 17:02:08 -04:00
Benjamin A. Petersen cd86d57763 review cleanup, remove TODOs 2024-04-25 17:02:07 -04:00
Joshua Casey be1915d2d7 fixed fuzzing 2024-04-25 17:02:07 -04:00
Benjamin A. Petersen 42ef46b74e expand TestUpstreamGitHubIdentityProvider 2024-04-25 17:02:07 -04:00
Benjamin A. Petersen 79d0e74056 Fix github_upstream_watcher so GitHub is listed in Supervisor idp discovery doc 2024-04-25 17:02:06 -04:00
Benjamin A. Petersen 0e3641bba2 Fix test idp lister 2024-04-25 17:02:06 -04:00
Benjamin A. Petersen e3aa495e0b Update idp discovery handler test 2024-04-25 17:02:06 -04:00
Benjamin A. Petersen 7968ed6d69 Allow GitHubIdentityProvider IDP type by FederationDomainWatcher 2024-04-25 17:02:05 -04:00