Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
64ae8b1
add az-sync github action to handle secrets
sean-breen Dec 12, 2025
5987c76
add write permission
sean-breen Dec 12, 2025
18838b6
use env vars
sean-breen Dec 12, 2025
e95c4f7
add az-sync step to every job
sean-breen Dec 12, 2025
cd73af1
add az-sync step to every job
sean-breen Dec 12, 2025
8c65637
simplify the goproxy config action
sean-breen Dec 12, 2025
7cf04a8
fix dev url
sean-breen Dec 12, 2025
449daf4
remove input from goproxy config
sean-breen Dec 12, 2025
5726f23
simplify az-sync action
sean-breen Dec 15, 2025
e647109
fix login details
sean-breen Dec 15, 2025
db9b612
revert to use input to pass secrets
sean-breen Dec 15, 2025
b713dd4
remove comment
sean-breen Dec 16, 2025
568cf14
Merge branch 'main' into az-migration
sean-breen Dec 16, 2025
6121168
Merge branch 'main' into az-migration
sean-breen Dec 16, 2025
b699227
Merge branch 'main' into az-migration
sean-breen Jan 5, 2026
7960c97
Merge branch 'main' into az-migration
sean-breen Jan 8, 2026
0ed7345
remove local pkg signing, will be done by upload host
sean-breen Jan 23, 2026
65601f2
update test jwt for plus integartion tests
sean-breen Jan 23, 2026
49c1e83
Merge branch 'main' into az-migration
sean-breen Jan 23, 2026
5b26942
update az cli command
sean-breen Jan 26, 2026
9441d70
only show errors in az cli
sean-breen Jan 26, 2026
71323d7
suppress output
sean-breen Jan 26, 2026
69fa72f
mask multiline secrets
sean-breen Jan 26, 2026
36f7322
az-sync quoting
sean-breen Jan 26, 2026
10fb098
quoting
sean-breen Jan 26, 2026
a5489f7
quoting
sean-breen Jan 26, 2026
4e0b152
support escaping multiline secrets
sean-breen Jan 26, 2026
a02fc48
syncing correct secrets for Plus jobs
sean-breen Jan 26, 2026
f75c491
add missing env var for load test image
sean-breen Jan 26, 2026
c36ad99
fix docker login
sean-breen Jan 26, 2026
be0d023
cert handling
sean-breen Jan 26, 2026
d6a2f28
fix multiline secrets
sean-breen Jan 27, 2026
f6fa38b
move to heredoc syntax for multiline secrets
sean-breen Jan 27, 2026
21a356e
fix formatting in action, and remove spaces from search filter
sean-breen Jan 27, 2026
949b625
addressing feeback around token permissions
sean-breen Jan 28, 2026
1d84013
add back write perms needed for Azure interaction
sean-breen Jan 28, 2026
97a014e
missing perms
sean-breen Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/actions/az-sync/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Sync Secrets from Azure Key Vault
author: s.breen
description: az-sync
inputs:
az_client_id:
description: 'Azure Client ID'
required: true
az_tenant_id:
description: 'Azure Tenant ID'
required: true
az_subscription_id:
description: 'Azure Subscription ID'
required: true
keyvault:
description: 'Azure Key Vault name'
required: true
secrets-filter:
description: 'Filter for secrets to sync (comma-separated patterns)'
required: true
default: '*'
runs:
using: "composite"
steps:
- name: Azure login
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
with:
client-id: ${{ inputs.az_client_id }}
tenant-id: ${{ inputs.az_tenant_id }}
subscription-id: ${{ inputs.az_subscription_id }}

- name: Sync
shell: bash
run: |
IFS=',' read -r -a array <<< "${{ inputs.secrets-filter }}"
for pattern in "${array[@]}"; do
echo "Processing pattern: $pattern"
for secret_name in $(az keyvault secret list --vault-name "${{ inputs.keyvault }}" --query "[?contains(name, '$pattern')].name" -o tsv); do
secret_value=$(az keyvault secret show --name "$secret_name" --vault-name "${{ inputs.keyvault }}" --query value -o tsv)
# check if value is multiline
if [[ "$secret_value" == *$'\n'* ]]; then
# Mask each line for multiline secrets
while IFS= read -r line; do
[[ -n "$line" ]] && echo "::add-mask::${line}"
done <<< "$secret_value"

# Use heredoc syntax for multiline environment variables
delimiter="EOF_${secret_name}_$(date +%s)"
{
echo "${secret_name}<<${delimiter}"
echo "$secret_value"
echo "$delimiter"
} >> $GITHUB_ENV
else
echo "::add-mask::${secret_value}"
echo "$secret_name=$secret_value" >> $GITHUB_ENV
fi
echo "Synced secret: env.$secret_name"
done
done

- name: Azure logout
shell: bash
run: |
az logout
23 changes: 5 additions & 18 deletions .github/actions/configure-goproxy/action.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
name: configure-goproxy
author: s.breen
description: Sets the current Go module proxy based on the presence of a private proxy URL in secrets
inputs:
user:
description: Artifactory username secret name
required: false
default: ""
token:
description: Artifactory token secret name
required: false
default: ""
url:
description: Artifactory URL
required: false
default: ""
description: Sets the current Go module proxy based on the presence of a private proxy URL in environment variables.
runs:
using: 'composite'
steps:
- name: Configure Go Proxy
id: configure-goproxy
shell: bash
run: |
if [[ -z "${{ inputs.user }}" ]] || \
[[ -z "${{ inputs.token }}" ]] || \
[[ -z "${{ inputs.url }}" ]] || \
if [[ -z "${{ env.artifactory-user }}" ]] || \
[[ -z "${{ env.artifactory-token }}" ]] || \
[[ -z "${{ env.artifactory-url-dev }}" ]] || \
[[ "${{ github.event.pull_request.head.repo.fork }}" == 'true' ]] ||
[[ "${{ startsWith(github.head_ref, 'dependabot-')}}" == 'true' ]] ; then
echo "No Artifactory secrets available - using direct GOPROXY"
GOPROXY_VALUE="direct"
else
echo "Development mode - using dev Artifactory"
GOPROXY_VALUE="https://${{ inputs.user }}:${{ inputs.token }}@${{ inputs.url }}"
GOPROXY_VALUE="https://${{ env.artifactory-user }}:${{ env.artifactory-token }}@${{ env.artifactory-url-dev }}"
fi
echo "GOPROXY=${GOPROXY_VALUE}" >> $GITHUB_ENV

40 changes: 5 additions & 35 deletions .github/workflows/assertion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,6 @@ on:
type: boolean
required: false
default: false
workflow_call:
inputs:
packageVersion:
description: 'Agent version'
type: string
required: true
runId:
description: 'Run ID of the workflow that built the artifacts'
type: string
required: false
signAssertion:
description: 'Sign and store the assertion document'
type: boolean
required: false
default: false
secrets:
ARTIFACTORY_USER:
required: true
ARTIFACTORY_TOKEN:
required: true
ARTIFACTORY_URL:
required: true

permissions:
contents: read
Expand All @@ -48,23 +26,15 @@ jobs:
runs-on: ubuntu-22.04
if: ${{ !github.event.pull_request.head.repo.fork }}
permissions:
id-token: write
contents: read
env:
GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_URL }}"
id-token: write # for OIDC authentication
contents: read # Needed to download artifacts
strategy:
matrix:
osarch: [amd64, arm64]
steps:
- name: Checkout Repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: 'go.mod'
cache: false

- name: Download nginx-agent binary artifacts
if: ${{ inputs.runId != '' }}
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # 7.0.0
Expand Down Expand Up @@ -97,9 +67,9 @@ jobs:
builder-id: 'github.com'
builder-version: '${{env.GO_VERSION}}_test'
invocation-id: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
artifactory-user: ${{ secrets.ARTIFACTORY_USER }}
artifactory-api-token: ${{ secrets.ARTIFACTORY_TOKEN }}
artifactory-url: ${{ secrets.ARTIFACTORY_URL }}
artifactory-user: ${{ env.artifactory-user }}
artifactory-api-token: ${{ env.artifactory-token }}
artifactory-url: ${{ env.artifactory-url }}
artifactory-repo: 'f5-nginx-go-local-approved-dependency'
assertion-doc-file: assertion_nginx-agent_${{ inputs.packageVersion }}_${{ matrix.osarch }}.json
build-content-path: ${{ env.goversionm }}
Expand Down
Loading
Loading