-
Notifications
You must be signed in to change notification settings - Fork 9
Feature/tokensmith auth #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c8d2b6c
Implement TokenSmith authentication backend and enhance JWT handling
alexlovelltroy 5954738
Refactor authentication scope verification and update dependencies
alexlovelltroy 69a13d9
Implement legacy authentication support and enhance logging for auth …
alexlovelltroy 98abad1
Enhance authentication rejection logging with detailed challenge and …
alexlovelltroy 88527f9
Implement TokenSmith authorization support and enhance related middle…
alexlovelltroy 53f810e
Update tokensmith dependency to latest version
alexlovelltroy 45e9bd5
Update tokensmith dependency to version 0.3.0
alexlovelltroy 978aac5
Refactor token handling in tests to use RFC7638 thumbprint for key IDs
alexlovelltroy 132ab66
Update tokensmith dependency to version v0.3.1 pre-release
alexlovelltroy b73b691
Refactor CI/CD configuration and Dockerfile for improved build proces…
alexlovelltroy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,97 @@ | ||
| name: Build PR with goreleaser | ||
| # Copyright © 2025 OpenCHAMI a Series of LF Projects, LLC | ||
| # | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| name: Build each PR for testing and validation | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| types: [opened, synchronize, reopened, edited] | ||
| workflow_dispatch: | ||
|
|
||
| inputs: | ||
| pr_number: | ||
| description: 'PR Number to build (optional, for manual PR builds)' | ||
| required: false | ||
| type: string | ||
|
|
||
| permissions: write-all # Necessary for the generate-build-provenance action with containers | ||
|
|
||
| jobs: | ||
| prbuild: | ||
|
|
||
| build: | ||
|
|
||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Install cross-compilation tools | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | ||
|
|
||
| steps: | ||
| - name: Set up latest stable Go | ||
| uses: actions/setup-go@v5 | ||
| uses: actions/setup-go@v6.4.0 | ||
| with: | ||
| go-version: stable | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
|
|
||
| uses: docker/setup-qemu-action@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v4 | ||
| with: | ||
| driver-opts: | | ||
| image=moby/buildkit:master | ||
| network=host | ||
| - name: Docker Login | ||
| uses: docker/login-action@v4.1.0 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v6.0.2 | ||
| with: | ||
| fetch-tags: 1 | ||
| fetch-depth: 1 | ||
|
|
||
| fetch-depth: 0 | ||
| # Set environment variables required by GoReleaser | ||
| - name: Set build environment variables | ||
| run: | | ||
| echo "GIT_STATE=$(if git diff-index --quiet HEAD --; then echo 'clean'; else echo 'dirty'; fi)" >> $GITHUB_ENV | ||
| echo "BUILD_HOST=$(hostname)" >> $GITHUB_ENV | ||
| echo "GO_VERSION=$(go version | awk '{print $3}')" >> $GITHUB_ENV | ||
| echo "BUILD_USER=$(whoami)" >> $GITHUB_ENV | ||
| echo "CGO_ENABLED=1" >> $GITHUB_ENV | ||
| echo "CGO_ENABLED=0" >> $GITHUB_ENV | ||
| echo "IS_PR_BUILD=true" >> $GITHUB_ENV | ||
|
|
||
| - name: Docker Login | ||
| uses: docker/login-action@v4.1.0 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create Tag for PR | ||
| if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.pr_number != '') | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
| PR_NUM="${{ github.event.number }}" | ||
| if [[ "${{ inputs.pr_number }}" != "" ]]; then | ||
| PR_NUM="${{ inputs.pr_number }}" | ||
| fi | ||
| git tag -f -a pr-${PR_NUM} -m "PR Release" | ||
|
|
||
| - name: Build with goreleaser | ||
| uses: goreleaser/goreleaser-action@v6 | ||
| - name: Build/Push container with goreleaser | ||
| uses: goreleaser/goreleaser-action@v7 | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| with: | ||
| version: '~> v2' | ||
| args: build --clean --snapshot | ||
| id: goreleaser | ||
| version: '~> 2' | ||
| args: release --clean --skip=announce,validate,archive | ||
| id: goreleaser | ||
| - name: Process goreleaser output | ||
| id: process_goreleaser_output | ||
| run: | | ||
| echo "const fs = require('fs');" > process.js | ||
| echo 'const artifacts = ${{ steps.goreleaser.outputs.artifacts }}' >> process.js | ||
| echo "const firstNonNullDigest = artifacts.find(artifact => artifact.extra && artifact.extra.Digest != null)?.extra.Digest;" >> process.js | ||
| echo "console.log(firstNonNullDigest);" >> process.js | ||
| echo "fs.writeFileSync('digest.txt', firstNonNullDigest);" >> process.js | ||
| node process.js | ||
| echo "digest=$(cat digest.txt)" >> $GITHUB_OUTPUT |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly change to the following where the current directory is the default value
This allows me to run
Alternately tell me how you build smd.