Skip to content

Add bearer token authentication for pre-minted access tokens - #264

Open
andrew-verburg-sp wants to merge 1 commit into
sailpoint-oss:mainfrom
andrew-verburg-sp:feature/bearer-token-auth
Open

andrew-verburg-sp wants to merge 1 commit into
sailpoint-oss:mainfrom
andrew-verburg-sp:feature/bearer-token-auth

Conversation

@andrew-verburg-sp

Copy link
Copy Markdown

Description

Some systems receive an Identity Security Cloud access token that was already minted at the OAuth token endpoint, instead of a client ID and client secret. This adds a bearer authentication path so that token is used for every CLI request without exchanging credentials again.

SAIL_ACCESS_TOKEN or --access-token selects bearer authentication for that process. sail set auth bearer and sail set bearer store a token for the active environment. An expired token is rejected, because the CLI does not have the client ID and secret needed to mint a new one.

How Has This Been Tested?

  • go test -count=1 ./internal/config/ ./cmd/set/ ./cmd/root/
  • go build and confirmed sail set bearer --help, sail set auth --help, and the global --access-token flag
  • Unit tests cover a minted token passed as a raw value, a Bearer header value, or a quoted value; expired and malformed tokens; SAIL_ACCESS_TOKEN taking precedence over PAT; and validation without a client ID and secret

Made with Cursor

…cess token.

Deployments that receive an access token instead of a client ID and secret can pass that token through, and the CLI uses it for every request without calling the OAuth token endpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

CLAassistant commented Oct 14, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants