PKS API Authentication
Page last updated:
This topic describes how the Pivotal Container Service (PKS) API works with User Account and Authentication (UAA) to manage authentication and authorization in your PKS deployment.
PKS deploys a broker VM that contains the PKS API server, a UAA server, and the PKS broker. To communicate with these services, you install command-line tools for PKS, UAA, and Kubernetes on your local workstation. See the following diagram for more information about how these services interact:
Before users can log in and use the PKS CLI, you must configure PKS API access with UAA. You use the UAA Command Line Interface (UAAC) to target the UAA server and request an access token for the UAA admin user. If your request is successful, the UAA server returns the access token. The UAA admin access token authorizes you to make requests to the PKS API using the PKS CLI and grant cluster access to new or existing users.
When a user with cluster access logs in to the PKS CLI, the CLI requests an access token for the user from the UAA server.
If the request is successful, the UAA server returns an access token to the PKS CLI.
When the user runs PKS CLI commands, for example,
pks clusters, the CLI sends the request to the PKS API server and includes the user’s UAA token.
The PKS API sends a request to the UAA server to validate the user’s token.
If the UAA server confirms that the token is valid, the PKS API uses the cluster information from the PKS broker to respond to the request.
For example, if the user runs
pks clusters, the CLI returns a list of the clusters that the user is authorized to manage.
The PKS API server and the UAA server use different port numbers on the broker VM.
For example, if your UAA domain is
api.pks.example.com, you can reach your PKS API and UAA servers at the following URLs:
Refer to Ops Manager > Pivotal Container Service > UAA > UAA URL for your UAA domain.
See the Configure Routing to the PKS API section of the Configure PKS API Access topic for procedures for routing to the PKS broker VM.