ContainerImage.Pinniped/test/integration
Ryan Richard 22fbced863 Create username scope, required for clients to get username in ID token
- For backwards compatibility with older Pinniped CLIs, the pinniped-cli
  client does not need to request the username or groups scopes for them
  to be granted. For dynamic clients, the usual OAuth2 rules apply:
  the client must be allowed to request the scopes according to its
  configuration, and the client must actually request the scopes in the
  authorization request.
- If the username scope was not granted, then there will be no username
  in the ID token, and the cluster-scoped token exchange will fail since
  there would be no username in the resulting cluster-scoped ID token.
- The OIDC well-known discovery endpoint lists the username and groups
  scopes in the scopes_supported list, and lists the username and groups
  claims in the claims_supported list.
- Add username and groups scopes to the default list of scopes
  put into kubeconfig files by "pinniped get kubeconfig" CLI command,
  and the default list of scopes used by "pinniped login oidc" when
  no list of scopes is specified in the kubeconfig file
- The warning header about group memberships changing during upstream
  refresh will only be sent to the pinniped-cli client, since it is
  only intended for kubectl and it could leak the username to the
  client (which may not have the username scope granted) through the
  warning message text.
- Add the user's username to the session storage as a new field, so that
  during upstream refresh we can compare the original username from the
  initial authorization to the refreshed username, even in the case when
  the username scope was not granted (and therefore the username is not
  stored in the ID token claims of the session storage)
- Bump the Supervisor session storage format version from 2 to 3
  due to the username field being added to the session struct
- Extract commonly used string constants related to OIDC flows to api
  package.
- Change some import names to make them consistent:
  - Always import github.com/coreos/go-oidc/v3/oidc as "coreosoidc"
  - Always import go.pinniped.dev/generated/latest/apis/supervisor/oidc
    as "oidcapi"
  - Always import go.pinniped.dev/internal/oidc as "oidc"
2022-08-08 16:29:22 -07:00
..
category_test.go Allow new warning messages about GCP plugin in TestGetPinnipedCategory 2022-06-08 10:22:15 -07:00
cli_test.go Extract browsertest.LoginToUpstreamLDAP() integration test helper 2022-05-09 15:43:36 -07:00
concierge_api_serving_certs_test.go test/integration: mark certain tests as disruptive 2021-08-26 15:11:47 -04:00
concierge_availability_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
concierge_client_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
concierge_credentialissuer_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
concierge_credentialrequest_test.go Merge branch 'main' into proposal_process 2022-02-17 10:07:37 -08:00
concierge_impersonation_proxy_test.go Introduce FIPS compatibility 2022-03-29 16:58:41 -07:00
concierge_kubecertagent_test.go Update TestKubeCertAgent to use new "v3" label value 2021-09-15 11:09:07 -07:00
concierge_kubectl_test.go test/integration: run parallel tests concurrently with serial tests 2021-08-26 12:59:52 -04:00
controllerinit_test.go Ensure concierge and supervisor gracefully exit 2021-08-30 20:29:52 -04:00
e2e_test.go Create username scope, required for clients to get username in ID token 2022-08-08 16:29:22 -07:00
formposthtml_test.go Enforce naming convention for browser based tests 2022-02-16 09:20:28 -05:00
kube_api_discovery_test.go Configure printer columns for OIDCClient CRD 2022-07-21 16:40:03 -07:00
kubeclient_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
ldap_client_test.go Don't do ldap group search when group scope not specified 2022-06-22 10:58:08 -07:00
leaderelection_test.go leader election test: approximate that followers have observed change 2021-08-26 12:59:52 -04:00
main_test.go Allow focused integration tests to be run from the GoLand UI again 2021-09-21 12:04:45 -07:00
rbac_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
securetls_fips_test.go Remove duplication in secure TLS tests 2022-04-01 10:56:38 -04:00
securetls_test.go Remove duplication in secure TLS tests 2022-04-01 10:56:38 -04:00
supervisor_discovery_test.go Create username scope, required for clients to get username in ID token 2022-08-08 16:29:22 -07:00
supervisor_healthz_test.go Rework or remove tests that rely on the http port 2022-03-10 19:43:12 -05:00
supervisor_login_test.go Create username scope, required for clients to get username in ID token 2022-08-08 16:29:22 -07:00
supervisor_oidc_client_test.go Add more unit tests for dynamic clients and enhance token exchange 2022-07-20 13:55:56 -07:00
supervisor_oidcclientsecret_test.go Change group names 2022-06-13 14:28:05 -07:00
supervisor_secrets_test.go test/integration: run parallel tests concurrently with serial tests 2021-08-26 12:59:52 -04:00
supervisor_storage_garbage_collection_test.go test/integration: run parallel tests concurrently with serial tests 2021-08-26 12:59:52 -04:00
supervisor_storage_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
supervisor_upstream_test.go TestSupervisorUpstreamOIDCDiscovery: include AdditionalAuthorizeParametersValid condition 2021-10-25 10:21:51 -04:00
supervisor_warnings_test.go Create username scope, required for clients to get username in ID token 2022-08-08 16:29:22 -07:00
whoami_test.go Tests use CertificatesV1 when available, otherwise use CertificatesV1beta1 2021-09-20 17:14:58 -07:00