Authentication and RBAC#

SkyPilot API server supports two authentication methods:

  • Basic auth: Use an admin-configured username and password to authenticate.

  • SSO (recommended): Use an auth proxy (e.g., OAuth2 Proxy) to authenticate. For example, Okta, Google Workspace, or other SSO providers are supported.

Comparison of the two methods:

Basic Auth

SSO (recommended)

User identity

Client’s whoami + hash of MAC address

User email (e.g., who@skypilot.co), read from X-Auth-Request-Email

SkyPilot RBAC

Not supported

Supported

Setup

Automatically enabled

Bring your Okta, Google Workspace, or other SSO provider

Basic auth#

Basic auth is automatically enabled if you use the helm chart to deploy the API server. See the AUTH_STRING environment variable in the deployment instructions.

Example login command:

$ sky api login -e http://username:password@<SKYPILOT_API_SERVER_ENDPOINT>

SkyPilot RBAC#

SkyPilot provides basic RBAC (role-based access control) support. Two roles are supported:

  • User: Use SkyPilot as usual to launch and manage resources (clusters, jobs, etc.).

  • Admin: Manage SkyPilot API server settings, users, and workspaces.

RBAC support is enabled only when SSO authentication is used (not when using basic auth).

Config rbac.default_role determines whether a new SkyPilot user is created with the user or admin role. By default, it is set to admin to ease first-time setup.

User management#

SkyPilot automatically creates a user for each authenticated user. The user’s email is used as the username.

Admins can click on the Users tab in the SkyPilot dashboard to manage users and their roles.

../_images/users.png

Supported operations:

  • Admin role can create users, update the role for all users, and delete users.

  • User role can view all users and their roles.