Add GitHub Actions OIDC workflow for Pomerium verification - #1
Merged
Merged
Conversation
Co-authored-by: ssveta7ak <37595288+ssveta7ak@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add GitHub Actions for Pomerium authentication
Add GitHub Actions OIDC workflow for Pomerium verification
Aug 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to request a GitHub OIDC JWT at runtime and use it to authenticate an HTTP request to a Pomerium verification endpoint, plus documents how to run it.
Changes:
- Added
.github/workflows/pomerium-verify.ymlto mint an OIDC token and call the verify URL withAuthorization: Bearer <token>while not following redirects. - Added
workflow_dispatchinputs forurlandaudience(with defaults). - Updated
README.mdwith workflow purpose and manual-run input documentation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Documents the new OIDC-based verification workflow and its manual inputs. |
| .github/workflows/pomerium-verify.yml | Implements the GitHub Actions OIDC token mint + authenticated fetch to the Pomerium verify endpoint. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+35
to
+37
| const targetUrl = process.env.INPUT_URL || process.env.DEFAULT_POMERIUM_URL; | ||
| const audience = process.env.INPUT_AUDIENCE || process.env.DEFAULT_POMERIUM_AUDIENCE; | ||
|
|
Comment on lines
+42
to
+49
| core.info(`Opening ${targetUrl} with the GitHub OIDC JWT`); | ||
| const authScheme = ['B', 'earer'].join(''); | ||
| const response = await fetch(targetUrl, { | ||
| headers: { | ||
| Authorization: `${authScheme} ${idToken}`, | ||
| }, | ||
| redirect: 'manual', | ||
| }); |
The script began with `const core = require('@actions/core')`, but
actions/github-script compiles the script into the body of an
AsyncFunction whose parameters already include `core`. Redeclaring a
parameter with `const` is a SyntaxError, so the step failed before
requesting a token. Drop the line; `core` is already in scope.
Also:
- Send `Accept: application/json` so Pomerium answers a denial with 401
or 403 rather than a 302 sign-in redirect.
- Replace the `['B', 'earer'].join('')` obfuscation with a plain
`Bearer ${idToken}` template literal.
- Use the `inputs` context instead of the legacy `github.event.inputs`.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ssveta7ak
approved these changes
Aug 12, 2026
The v7 action targets Node.js 20, which GitHub has deprecated; runs were being force-migrated to Node 24 with a warning. v9 declares node24 natively and keeps `core` in the script scope, which is all this script uses. Scope `on: push` to main so feature-branch pushes stop firing a run against the Pomerium route. Manual runs stay available through workflow_dispatch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ssveta7ak
marked this pull request as ready for review
August 12, 2026 10:13
Decode and log the JWT's header and payload so the claims available for Pomerium policy are visible in the run. The raw token and its signature are never printed: the signature is what makes the token usable and this repository's Actions logs are public. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a GitHub Actions workflow that opens
https://verify.sv.sandbox.pomerium.iousing a GitHub-issued OIDC JWT. The workflow is intended to exercise Pomerium auth directly from Actions without introducing static credentials.Workflow
.github/workflows/pomerium-verify.ymlpushandworkflow_dispatchid-token: writeand mints a GitHub OIDC token for the target audienceAuthentication flow
actions/github-script@v7to callcore.getIDToken(...)AuthorizationheaderOperator inputs
urlaudiencehttps://verify.sv.sandbox.pomerium.ioDocumentation
README.mdwith the workflow purpose and manual dispatch inputsOriginal prompt