Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
168bfd4
chore(deps): Update dependencies to latest versions
spbsoluble Dec 4, 2025
2be1684
feat(cli/pam): Add support for creating a pam provider type from an i…
spbsoluble Dec 4, 2025
b6066f1
chore(store-types): Update internal store-type definitions to latest
spbsoluble Dec 4, 2025
1be6293
feat(cli/pam-types): Embed existing PAM types
spbsoluble Dec 4, 2025
a943161
feat(cli/pam): Add support for parsing an integration-manifest.json f…
spbsoluble Dec 5, 2025
f258ec1
feat(cli/auth): Allow for interactive auth on a per command basis to …
spbsoluble Dec 5, 2025
865ddbd
chore(docs): Update auth_providers.md with oauth example.
spbsoluble Dec 5, 2025
8167ee4
chore(deps): Bump `keyfactor-go-client`
spbsoluble Dec 5, 2025
58eaa8e
chore(deps): Update all deps to latest
spbsoluble Dec 5, 2025
116f85c
fix(cli/auth): Don't prompt on known values when incomplete config is…
spbsoluble Dec 5, 2025
8a1a11b
feat(cli/pam): Delete by name supported.
spbsoluble Dec 5, 2025
daee467
feat(cli/pam-types)!: Rescope pam types CLI actions to `pam-types`
spbsoluble Dec 5, 2025
2c81741
chore(docs): Regenerate auto docs.
spbsoluble Dec 5, 2025
174a3b9
chore(deps): Bump `keyfactor-go-client`
spbsoluble Dec 5, 2025
9a7c20e
chore(tests/pam-types): Add mock tests for `pam-types` sub CLI
spbsoluble Dec 8, 2025
ecd9076
chore(lint): Fix `go vet` issues.
spbsoluble Dec 8, 2025
d23514e
fix(cli/login): `login` will clear out basic/oauth params if auth typ…
spbsoluble Dec 8, 2025
38ecb29
fix(cli/store-types): Sort store-types list case-insensitively
spbsoluble Dec 8, 2025
e4adc2b
chore(tests/store-types): Convert store-types tests to mocks and fix …
spbsoluble Dec 8, 2025
3b8e753
chore(tests/store-types): Add mock server to store-types tests.
spbsoluble Dec 8, 2025
19ad7c5
chore(tests/pam-types): Add mock server to pam-types tests.
spbsoluble Dec 8, 2025
be62176
chore: Update license headers on files.
spbsoluble Dec 8, 2025
79f1bd1
chore(ci): Add workflow to run mock tests.
spbsoluble Dec 8, 2025
5671c97
chore(ci): Remove "old" tests workflow
spbsoluble Dec 8, 2025
880d422
chore(ci/mock_tests): Dynamic summary for mock tests
spbsoluble Dec 8, 2025
dba0898
chore(ci/mock_tests): Always run mocks
spbsoluble Dec 8, 2025
98169ab
chore(ci/mock_tests): Always run all store-type mocks
spbsoluble Dec 8, 2025
c3ca543
chore(ci): Update workflow ref versions to latest
spbsoluble Dec 8, 2025
d6f23fb
chore(deps): Bump golang version to `v1.25`
spbsoluble Dec 8, 2025
4d82a32
chore(ci): Fix container digest uploads.
spbsoluble Dec 8, 2025
319cc46
Potential fix for code scanning alert no. 25: Workflow does not conta…
spbsoluble Dec 8, 2025
cb802e3
chore(docs): Regen auto-docs
spbsoluble Dec 8, 2025
fddeeb8
feat(cli/stores): Allow for bulk updating of certificate stores via CSV
spbsoluble Dec 15, 2025
0799e85
chore(cli/store-types): Format err message as bulleted list when crea…
spbsoluble Dec 15, 2025
d45f67b
fix(cli/orchs): Remove `--exp` flag from the `orchs` sub CLIs
spbsoluble Dec 15, 2025
55d2a3a
chore(docs): Update CHANGELOG.md
spbsoluble Dec 15, 2025
02fb606
chore(docs): Add quick doc for updating certificate store UOs via CSV.
spbsoluble Dec 15, 2025
bcf53b2
chore(cli/stores): Output number of creates and/or updates for `impor…
spbsoluble Dec 15, 2025
5415ade
fix(auth): Attempt env vars during interactive auth if empty conf is …
spbsoluble Dec 17, 2025
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
34 changes: 20 additions & 14 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
platform:
- linux/386
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64/v8
- linux/ppc64le
Expand All @@ -38,13 +37,13 @@ jobs:
# Checkout code
# https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
uses: actions/checkout@v6

# Extract metadata (tags, labels) for Docker
# If the pull request is not merged, do not include the edge tag and only include the sha tag.
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand All @@ -55,18 +54,18 @@ jobs:
# Set up QEMU
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
uses: docker/setup-qemu-action@v3

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
uses: docker/setup-buildx-action@v3

# Login to Docker registry
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -76,7 +75,7 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
uses: docker/build-push-action@v6
with:
context: .
platforms: ${{ matrix.platform }}
Expand All @@ -91,11 +90,17 @@ jobs:
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"

- name: Set artifact name
run: |
echo "ARTIFACT_NAME=digests-${MATRIX_PLATFORM//\//-}" >>${GITHUB_ENV}
env:
MATRIX_PLATFORM: ${{ matrix.platform }}

# Upload digest
- name: Upload digest
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v5
with:
name: digests
name: ${{ env.ARTIFACT_NAME }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand All @@ -113,22 +118,23 @@ jobs:
# Download digests
# https://github.com/actions/download-artifact
- name: Download digests
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@v6
with:
name: digests
path: /tmp/digests
pattern: digests-*
merge-multiple: true

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
uses: docker/setup-buildx-action@v3

# Extract metadata (tags, labels) for Docker
# If the pull request is not merged, do not include the edge tag and only include the sha tag.
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand All @@ -139,7 +145,7 @@ jobs:
# Login to Docker registry
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand Down
194 changes: 194 additions & 0 deletions .github/workflows/mock_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
name: Mock Tests

permissions:
contents: read

on:
push:
paths:
- 'cmd/pamTypes_mock_test.go'
- 'cmd/storeTypes_mock_test.go'
- 'cmd/pamTypes.go'
- 'cmd/storeTypes.go'
- 'cmd/pam_types.json'
- 'cmd/store_types.json'
- '.github/workflows/mock_tests.yml'
pull_request:
paths:
- 'cmd/pamTypes_mock_test.go'
- 'cmd/storeTypes_mock_test.go'
- 'cmd/pamTypes.go'
- 'cmd/storeTypes.go'
- 'cmd/pam_types.json'
- 'cmd/store_types.json'
- '.github/workflows/mock_tests.yml'
workflow_dispatch:

jobs:
pam-types-mock-tests:
name: PAM Types Mock Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Download dependencies
run: go mod download

- name: Run PAM Types Mock Tests
run: |
echo "::group::Running PAM Types Mock Tests"
go test -v ./cmd -run "Test_PAMTypes_Mock" -timeout 2m
echo "::endgroup::"

- name: Generate PAM Types Test Summary
if: always()
run: |
echo "## PAM Types Mock Tests Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
go test ./cmd -run "Test_PAMTypes_Mock" -v 2>&1 | grep -E "(PASS|FAIL|RUN)" | tee -a $GITHUB_STEP_SUMMARY || true
echo "" >> $GITHUB_STEP_SUMMARY
echo "✅ PAM Types Mock Tests Completed" >> $GITHUB_STEP_SUMMARY

store-types-mock-tests:
name: Store Types Mock Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Download dependencies
run: go mod download

- name: Run Store Types Mock Tests
run: |
echo "::group::Running Store Types Mock Tests"
go test -v ./cmd -run "Test_StoreTypes_Mock" -timeout 2m
echo "::endgroup::"

- name: Generate Store Types Test Summary
if: always()
run: |
echo "## Store Types Mock Tests Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
go test ./cmd -run "Test_StoreTypes_Mock" -v 2>&1 | grep -E "(PASS|FAIL|RUN)" | tee -a $GITHUB_STEP_SUMMARY || true
echo "" >> $GITHUB_STEP_SUMMARY
echo "✅ Store Types Mock Tests Completed" >> $GITHUB_STEP_SUMMARY

mock-tests-summary:
name: Mock Tests Summary
runs-on: ubuntu-latest
needs: [ pam-types-mock-tests, store-types-mock-tests ]
if: always()

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Download dependencies
run: go mod download

- name: Run All Mock Test Summaries
run: |
echo "::group::PAM Types Summary"
go test -v ./cmd -run "Test_PAMTypes_Mock_Summary" -timeout 1m
echo "::endgroup::"
echo ""
echo "::group::Store Types Summary"
go test -v ./cmd -run "Test_StoreTypes_Mock_Summary" -timeout 1m
echo "::endgroup::"

- name: Generate Combined Summary
if: always()
run: |
# Calculate statistics from JSON files and test output
PAM_TYPES_TOTAL=$(jq '. | length' cmd/pam_types.json)
STORE_TYPES_TOTAL=$(jq '. | length' cmd/store_types.json)

# Count test cases from test files
PAM_MOCK_CREATE_TESTS=$(grep -c "Test_PAMTypes_Mock_CreateAllTypes" cmd/pamTypes_mock_test.go || echo "0")
STORE_MOCK_CREATE_TESTS=$(grep -c "Test_StoreTypes_Mock_CreateAllTypes" cmd/storeTypes_mock_test.go || echo "0")

# Run tests with JSON output to count operations
PAM_TEST_OUTPUT=$(go test -json ./cmd -run "Test_PAMTypes_Mock" 2>&1 || echo "")
STORE_TEST_OUTPUT=$(go test -json ./cmd -run "Test_StoreTypes_Mock" 2>&1 || echo "")

# Count passed subtests for PAM types
PAM_SUBTESTS=$(echo "$PAM_TEST_OUTPUT" | jq -r 'select(.Action == "pass" and .Test != null and (.Test | contains("Mock"))) | .Test' 2>/dev/null | wc -l | tr -d ' ')

# Count passed subtests for Store types
STORE_SUBTESTS=$(echo "$STORE_TEST_OUTPUT" | jq -r 'select(.Action == "pass" and .Test != null and (.Test | contains("Mock"))) | .Test' 2>/dev/null | wc -l | tr -d ' ')

# Calculate tested counts (first 10 for store types based on test implementation)
PAM_TESTED=$PAM_TYPES_TOTAL
STORE_TESTED=$STORE_TYPES_TOTAL

# Calculate percentages
PAM_PERCENT=$((100 * PAM_TESTED / PAM_TYPES_TOTAL))
STORE_PERCENT=$((100 * STORE_TESTED / STORE_TYPES_TOTAL))

# Count total operations (approximate: subtests - summary tests)
TOTAL_OPS=$((PAM_SUBTESTS + STORE_SUBTESTS - 2))

# Generate summary
echo "# 🎉 Mock Tests Complete Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Test Execution Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

if [ "${{ needs.pam-types-mock-tests.result }}" == "success" ]; then
echo "✅ **PAM Types Mock Tests**: PASSED" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **PAM Types Mock Tests**: FAILED" >> $GITHUB_STEP_SUMMARY
fi

if [ "${{ needs.store-types-mock-tests.result }}" == "success" ]; then
echo "✅ **Store Types Mock Tests**: PASSED" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Store Types Mock Tests**: FAILED" >> $GITHUB_STEP_SUMMARY
fi

echo "" >> $GITHUB_STEP_SUMMARY
echo "## Coverage Statistics" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **PAM Types Available**: ${PAM_TYPES_TOTAL}" >> $GITHUB_STEP_SUMMARY
echo "- **PAM Types Tested**: ${PAM_TESTED}/${PAM_TYPES_TOTAL} (${PAM_PERCENT}%)" >> $GITHUB_STEP_SUMMARY
echo "- **Store Types Available**: ${STORE_TYPES_TOTAL}" >> $GITHUB_STEP_SUMMARY
echo "- **Store Types Tested**: ${STORE_TESTED}/${STORE_TYPES_TOTAL} (${STORE_PERCENT}%)" >> $GITHUB_STEP_SUMMARY
echo "- **Total Test Cases Passed**: ${TOTAL_OPS}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Test Files" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- \`cmd/pamTypes_mock_test.go\` - PAM Types HTTP Mock Tests (${PAM_SUBTESTS} subtests)" >> $GITHUB_STEP_SUMMARY
echo "- \`cmd/storeTypes_mock_test.go\` - Store Types HTTP Mock Tests (${STORE_SUBTESTS} subtests)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## JSON Data Files" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- \`cmd/pam_types.json\` - ${PAM_TYPES_TOTAL} PAM provider types" >> $GITHUB_STEP_SUMMARY
echo "- \`cmd/store_types.json\` - ${STORE_TYPES_TOTAL} certificate store types" >> $GITHUB_STEP_SUMMARY

- name: Check Overall Status
if: needs.pam-types-mock-tests.result != 'success' || needs.store-types-mock-tests.result != 'success'
run: |
echo "::error::One or more mock test jobs failed"
exit 1
Loading
Loading