oauth-apiserver

module
v0.0.0-...-9e9722d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: Apache-2.0

README

oauth-apiserver

Overview

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.

Aggregated APIs served

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

Contributing

For guidance on contributing, see CONTRIBUTING.md

Building

Binary

To build the oauth-apiserver binary, run the following command:

make build
Image

To build an image for the oauth-apiserver:

  1. Log in to the app.ci cluster using Red Hat SSO.
  2. Click on your username and then click on "Copy login command".
  3. Click "Display Token".
  4. Copy your token.
  5. 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.ci cluster).
    • For your password, use the token you copied.
  6. 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/amd64 flag to run the image on an OpenShift cluster.

Testing

Unit tests

To run the unit tests for the entire project, run:

make test
End-to-end tests

This repository is compatible with the OpenShift Tests Extension (OTE) framework.

Building the test binary
make build
Running test suites and tests
# 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
Listing available tests and suites
# 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/all

For 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.

Directories

Path Synopsis
cmd
oauth-apiserver command
Originally from https://github.com/kubernetes/kubernetes/blob/4142fb530ceb25d9965a3e6925be79a03d918cba/pkg/features/client_adapter.go.
Originally from https://github.com/kubernetes/kubernetes/blob/4142fb530ceb25d9965a3e6925be79a03d918cba/pkg/features/client_adapter.go.
pkg
externaloidc/apis/authentication
+groupName=authentication.openshift.io Package authentication is the internal version of the API.
+groupName=authentication.openshift.io Package authentication is the internal version of the API.
externaloidc/apis/authentication/v1alpha1
+groupName=authentication.openshift.io Package v1alpha1 is the v1alpha1 version of the API.
+groupName=authentication.openshift.io Package v1alpha1 is the v1alpha1 version of the API.
oauth/apis/oauth
+groupName=oauth.openshift.io Package api is the internal version of the API.
+groupName=oauth.openshift.io Package api is the internal version of the API.
oauth/apis/oauth/v1
+groupName=oauth.openshift.io Package v1 is the v1 version of the API.
+groupName=oauth.openshift.io Package v1 is the v1 version of the API.
oauth/apis/oauth/validation
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
user/apis/user
+groupName=user.openshift.io Package api is the internal version of the API.
+groupName=user.openshift.io Package api is the internal version of the API.
user/apis/user/v1
+groupName=user.openshift.io Package v1 is the v1 version of the API.
+groupName=user.openshift.io Package v1 is the v1 version of the API.
test
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL