The OpenShift oauth-apiserver is an aggregated API server that is responsible for serving some of OpenShift's authentication and authorization related APIs.
It also serves as a Kubernetes Webhook Token Authenticator.
The oauth-apiserver serves both the oauth.openshift.io and user.openshift.io API groups.
More details on the APIs in these groups can be found in the OpenShift documentation:
Most of the user-facing API definitions for these groups will be found in the openshift/api repository
For guidance on contributing, see CONTRIBUTING.md
To build the oauth-apiserver binary, run the following command:
make buildTo build an image for the oauth-apiserver:
- Log in to the
app.cicluster using Red Hat SSO. - Click on your username and then click on "Copy login command".
- Click "Display Token".
- Copy your token.
- Run
podman login registry.ci.openshift.org.- For your username, use your Kerberos ID (the same username shown in the OpenShift console for the
app.cicluster). - For your password, use the token you copied.
- For your username, use your Kerberos ID (the same username shown in the OpenShift console for the
- Run
podman build -f images/Dockerfile.rhel7 -t ${IMAGE_TAG} .- If you are using MacOS, you'll need to set the platform with the
--platform linux/amd64flag to run the image on an OpenShift cluster.
- If you are using MacOS, you'll need to set the platform with the
To run the unit tests for the entire project, run:
make testThis repository is compatible with the OpenShift Tests Extension (OTE) framework.
make build# Run a specific test suite or test
./oauth-apiserver-tests-ext run-suite "openshift/oauth-apiserver/all"
./oauth-apiserver-tests-ext run-test "test-name"
# Run with JUnit output
./oauth-apiserver-tests-ext run-suite openshift/oauth-apiserver/all --junit-path /tmp/junit.xml# List all test suites
./oauth-apiserver-tests-ext list suites
# List tests in a suite
./oauth-apiserver-tests-ext list tests --suite=openshift/oauth-apiserver/allFor more information about the OTE framework, see the openshift-tests-extension documentation.
Beyond the OTE tests, there are some additional e2e tests that can be run with make test-e2e.