Skip to content

docs(readme): use application access tokens in CI/CD pipelines - #23

Draft
burnedikt wants to merge 2 commits into
mainfrom
docs/application-access-tokens
Draft

burnedikt wants to merge 2 commits into
mainfrom
docs/application-access-tokens

Conversation

@burnedikt

Copy link
Copy Markdown
Member

What changed

  • Authentication → Application access tokens for CI/CD pipelines and integrations (new subsection). It covers:
    • Portal's application access tokens (ipat_…, Innoactive/Portal-Backend#2232) as the credential for pipelines and integrations.
    • A table of the three permissions (Upload, Publish and Download builds) and the command that needs each.
    • What every token can read, and that it can't do anything else.
    • Where to create, revoke and rotate a token (the application's Access Control → Access Tokens), and that the secret is shown once.
    • That no organization needs to be named, and what 401 and 403 mean.
    • A note that Portal refuses passwords for accounts that use or require two-factor authentication.
  • Examples → Uploading and publishing from a CI/CD pipeline:
    • upload-build followed by update-launch-configuration.
    • What the upload does with an upload-only token compared with an upload + publish token.
    • A GitHub Actions step.
  • Examples → Downloading a build: builds download, and the Authorization: Bearer header for other tools.
  • Separate commit: the existing upload example had # comments after each \, which broke it when pasted into a shell. The command is now copy-pasteable, and the options are explained below it.

No CLI code changes. The CLI already sends PORTAL_BACKEND_ACCESS_TOKEN as Authorization: Bearer …, and none of these commands sends an organization.

How it was verified

Setup:

  • Portal-Backend develop at a7120bfc3 (the merge of Innoactive/Portal-Backend#2724), served by runserver on the host with SQLite. Docker's Postgres wouldn't start on the machine, so scripts/dev-stack wasn't used.
  • This branch's CLI (3.6.0), with PORTAL_BACKEND_ENDPOINT=http://localhost:8399 and an empty config directory, so no stored login was used.
  • Three tokens created through POST /api/v2/applications/<id>/access-tokens/ as an application manager: upload + publish, upload only, and download only.

Results, all with the commands as the README shows them:

Token Command Result
upload + publish applications v2 upload-build ./build.zip --application-id … --version … --xr-platform win-non-vr --executable-path MyApp.exe 201; the build names the token in uploaded_by_token
upload + publish a second upload of a valid build the launch configuration moved to it once it validated
upload + publish applications v2 update-launch-configuration <app> win-non-vr <build>, and with quest 200
upload + publish applications v2 get <app>, applications v2 builds get <build> 200
upload + publish the GitHub Actions run: block under bash -eo pipefail succeeds
upload + publish the fixed upload example (launch args and changelog) stored as given
upload only upload-build (quest) 201; the launch configuration kept its build
upload only update-launch-configuration 403
upload only upload-build --xr-platform pico (no such launch configuration) 400: "Adding a launch configuration needs an access token with publish." The Actions block fails the step on it
upload only builds download 403
download builds download <build> --filepath ./downloaded.apk byte-identical to the uploaded APK
download builds download without --filepath the temp-dir path is printed
download curl of application_archive with Authorization: Bearer … 200, identical
download upload-build 403
download applications v2 list 403 (tokens can only get their application, as the README says)
download Portal-Organization-Id naming the token's organization / another organization 200 / 403
revoked (DELETE …/access-tokens/<id>/ → 204) builds download 401, "The access token is invalid, expired or revoked."

The secret doesn't appear in the server log.

Part of Innoactive/Portal-Backend#2721.

🤖 Generated with Claude Code

burnedikt and others added 2 commits November 19, 2026 23:14
Document Portal's application access tokens (`ipat_…`) as the credential for pipelines
and integrations: what each permission allows and which command needs it, where to create
and revoke a token, that it acts in its own organization, and the 401/403 answers. Add
examples for uploading and publishing from a pipeline (with a GitHub Actions step) and for
downloading a build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comments after each line continuation broke the command when pasted into a shell. The
command now runs as is, and the options are explained below it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant