Compare commits

...

115 Commits

Author SHA1 Message Date
kfox1111 fd7bd2f7e1
Merge pull request #131 from kfox1111/step-ssh-bump2
Bump spiffe-step-ssh version
2025-08-06 07:41:30 -07:00
Kevin Fox ec90c36ce3 Bump spiffe-step-ssh version
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-08-06 07:02:25 -07:00
kfox1111 a57571e7d8
Merge pull request #130 from kfox1111/step-ssh-bump
Bump spiffe-step-ssh
2025-08-03 18:19:53 -07:00
Kevin Fox 4277230675 Bump spiffe-step-ssh
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-08-03 18:11:41 -07:00
kfox1111 9aa0582f42
Merge pull request #129 from kfox1111/ssh-server
Update spiffe-step-ssh
2025-08-03 17:42:15 -07:00
Kevin Fox ece44a9a95 Fix var
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-08-03 17:34:09 -07:00
Kevin Fox c5eb29696f Fix var
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-08-03 17:28:59 -07:00
Kevin Fox 95649a5cb0 Add missing dep
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-08-03 17:21:55 -07:00
Kevin Fox 7673bc5852 Update spiffe-step-ssh
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-08-03 17:08:09 -07:00
kfox1111 567f829c32
Merge pull request #128 from kfox1111/aws-helper-bump
Bump aws-spiffe-workload-helper version
2025-07-23 06:47:46 -07:00
Kevin Fox 47acf5539a Bump aws-spiffe-workload-helper version
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-07-23 06:35:28 -07:00
kfox1111 94f2c634e4
Merge pull request #127 from kfox1111/gate-fix2
Fix dockerfile
2025-07-07 06:17:15 -07:00
Kevin Fox 02ca662d79 Fix dockerfile
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-07-07 06:16:19 -07:00
kfox1111 0782b7ad93
Merge pull request #126 from kfox1111/gate-fix
Fix dockerfile
2025-07-07 06:04:20 -07:00
Kevin Fox 6ed28e3ff9 Fix dockerfile
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-07-07 05:51:15 -07:00
kfox1111 5354cc99a6
Merge pull request #125 from kfox1111/el8-and-el10
Add repos for el8 and el10 too
2025-07-07 05:32:42 -07:00
Kevin Fox a72e47933b Add repos for el8 and el10 too
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-07-07 05:22:26 -07:00
kfox1111 a19a479e35
Merge pull request #124 from kfox1111/spire-1.12.4
Update spire to 1.12.4
2025-07-01 14:53:06 -07:00
Kevin Fox 43751e18d5 Update spire to 1.12.4
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-07-01 14:43:23 -07:00
kfox1111 ce23087018
Merge pull request #123 from kfox1111/bump-aws-helper
Bump version on aws helper
2025-06-16 14:01:50 -07:00
Kevin Fox 52032e3c9f Bump version on aws helper
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-06-16 13:52:31 -07:00
kfox1111 38a7fc0cd8
Merge pull request #122 from kfox1111/aws-spiffe-workload-helper
Add rpm for aws-spiffe-workload-helper
2025-06-05 10:03:38 -07:00
Kevin Fox e6dc2b31e7 Add rpm for aws-spiffe-workload-helper
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-06-05 09:53:36 -07:00
kfox1111 23e5a53946
Merge pull request #121 from kfox1111/cel-package-bump
Bump version of spire-credentialcomposer-cel
2025-05-19 06:41:19 -07:00
kfox1111 c7e82c4193
Merge branch 'main' into cel-package-bump 2025-05-19 06:27:52 -07:00
Kevin Fox f06a6a0691 Bump version of spire-credentialcomposer-cel
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-05-19 06:27:33 -07:00
kfox1111 6426223526
Merge pull request #120 from kfox1111/cel-package
Add package for spire-credentialcomposer-cel
2025-05-18 08:19:09 -07:00
Kevin Fox 80aea5803f Add package for spire-credentialcomposer-cel
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-05-18 07:54:00 -07:00
kfox1111 d6dee467ff
Merge pull request #119 from kfox1111/spire-1.12.1
Bump spire to 1.12.1
2025-05-07 09:28:10 -07:00
Kevin Fox 5bede6817a Bump spire to 1.12.1
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-05-07 09:11:14 -07:00
kfox1111 7c51bce5ef
Merge pull request #118 from kfox1111/update-packages
Update some package versions
2025-04-23 08:02:40 -07:00
Kevin Fox ffe8b42ad4 Update some package versions
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-23 07:36:40 -07:00
kfox1111 6c723f985d
Merge pull request #117 from kfox1111/update-tpm-package
Update nodeattestor tpm plugin package
2025-04-19 06:29:07 -07:00
Kevin Fox 7ce85b5c2c Update nodeattestor tpm plugin package
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-18 19:49:10 -07:00
kfox1111 fea412feb8
Merge pull request #116 from kfox1111/spire-controller-manager-package
Add package for spire-controller-manager
2025-04-17 08:17:25 -07:00
Kevin Fox f94b89c6ca Fix arch
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-17 08:09:12 -07:00
Kevin Fox a93eeb1089 Add package for spire-controller-manager
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-17 07:51:44 -07:00
kfox1111 fb44af725e
Merge pull request #115 from kfox1111/k8s-spiffe-workload-jwt-exec-auth-update
Update k8s-spiffe-workload-jwt-exec-auth
2025-04-16 12:40:11 -07:00
Kevin Fox fb9be31af3 Update k8s-spiffe-workload-jwt-exec-auth
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-16 12:29:21 -07:00
kfox1111 c6fab2aa5a
Merge pull request #114 from kfox1111/easier-single-server
Easier single server setup
2025-04-13 09:20:23 -07:00
Kevin Fox aefced8905 Add missing file
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-13 09:12:47 -07:00
Kevin Fox 6ecc675cd7 Easier single server setup
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-13 08:57:10 -07:00
kfox1111 1c00cfab00
Merge pull request #113 from kfox1111/spire-server-attestor-tpm-0.0.4
Bump spire-server-attestor-tpm version
2025-04-05 18:03:07 -07:00
Kevin Fox 268658fe69 Bump spire-server-attestor-tpm version
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-05 17:40:57 -07:00
kfox1111 0f6e852967
Merge pull request #112 from kfox1111/spire-server-attestor-tpm-0.0.3
Update spire-server-attestor-tpm version
2025-04-05 11:31:32 -07:00
kfox1111 64f05e89e8
Merge branch 'main' into spire-server-attestor-tpm-0.0.3 2025-04-05 11:24:56 -07:00
Kevin Fox de03c39011 Update spire-server-attestor-tpm version
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-05 11:23:49 -07:00
kfox1111 44543f2531
Merge pull request #111 from kfox1111/spire-server-attestor-tpm
Add spec for spire-server-attestor-tpm
2025-04-04 10:36:15 -07:00
kfox1111 fde4a67de6
Merge branch 'main' into spire-server-attestor-tpm 2025-04-04 10:26:31 -07:00
Kevin Fox fcf6428c24 Add spec for spire-server-attestor-tpm
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-04 10:25:36 -07:00
kfox1111 e524b093c6
Merge pull request #110 from kfox1111/spiffe-helper-0.10.0
Update spiffe-helper to 0.10.0
2025-04-02 12:50:38 -07:00
Kevin Fox 35b9f64b6d Fix comment
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-02 12:30:56 -07:00
Kevin Fox cd51ca6723 Update spiffe-helper to 0.10.0
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-04-02 12:30:13 -07:00
kfox1111 ff0f4f27fe
Merge pull request #109 from kfox1111/spire-1.12.0
Update to spire-1.12.0. Fix extra files in release,
2025-03-21 13:57:23 -07:00
Kevin Fox 1020ec1498 Update to spire-1.12.0. Fix extra files in release
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-03-21 13:43:07 -07:00
Ryan Turner dfdf6ddf66
Replace k8s_sat NodeAttestor with k8s_psat (#107)
The k8s_sat NodeAttestor plugin is deprecated and is set to be removed
from SPIRE: https://github.com/spiffe/spire/issues/5681

Also update the SPIRE version to the latest.

Signed-off-by: Ryan Turner <ryan.turner253@icloud.com>
2025-03-12 22:32:53 -07:00
Batuhan Apaydın 8b5985e9af
use Chainguard's version of wait-for-it image as we used in spiffe tutorials (#56)
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2025-03-08 10:47:40 -08:00
kfox1111 2653850fc4
Merge pull request #106 from kfox1111/config
Easier to override example config
2025-03-05 06:12:26 -08:00
Kevin Fox 65bba66f1a Allow config at the subdir level too
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-03-05 06:04:31 -08:00
Kevin Fox ea51613af7 Fix build issue
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-03-05 05:35:16 -08:00
Kevin Fox 717db2415c Easier to override example config
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-03-04 07:42:12 -08:00
kfox1111 d060784e35
Merge pull request #105 from kfox1111/checksum
Fix for checksum mismatch
2025-03-04 07:25:29 -08:00
Kevin Fox ef7d2d7fa6 Fix for checksum mismatch
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-03-04 06:50:42 -08:00
kfox1111 b667e1ef49
Merge pull request #104 from kfox1111/update-package
Upgrade k8s-spiffe-workload-auth-config package
2025-02-15 07:58:50 -08:00
Kevin Fox d281483d92 Upgrade k8s-spiffe-workload-auth-config package
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-15 07:49:50 -08:00
kfox1111 1a1fb8e534
Merge pull request #103 from kfox1111/packages
Add more packages
2025-02-14 16:04:43 -08:00
Kevin Fox 12f857729f Add more packages
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-14 12:45:35 -08:00
kfox1111 131d4cec9d
Merge pull request #101 from kfox1111/fix-release
Fix permissions around rsync on release
2025-02-13 18:41:12 -08:00
Kevin Fox f5163ab2b1 Fix permissions around rsync on release
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-13 18:40:33 -08:00
kfox1111 170e176db2
Merge pull request #100 from kfox1111/rpms-1.11.2
Update rpms to spire 1.11.2
2025-02-13 17:00:36 -08:00
Kevin Fox 6db0f478c1 Update rpms to spire 1.11.2
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-13 16:07:16 -08:00
kfox1111 63565153f4
Merge pull request #99 from kfox1111/repo-file-add
Add a yum repofile
2025-02-02 11:01:30 -08:00
Kevin Fox cee248f2ae Add a yum repofile
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 11:01:05 -08:00
kfox1111 9b0e2f0440
Merge pull request #98 from kfox1111/dont-upload-repo
Dont upload repo to github release. Also reenable deb syncing.
2025-02-02 10:49:58 -08:00
Kevin Fox 15a45a9d0e Add back deb syncing
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 10:48:26 -08:00
Kevin Fox 86ddf8fcae Don't release repo stuff in gh release
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 10:46:53 -08:00
kfox1111 4fab8f5c3a
Merge pull request #97 from kfox1111/mv-fix
Add another missing sudo around mv in release job
2025-02-02 10:23:21 -08:00
Kevin Fox d7cb4302d0 Add another missing sudo around mv in release job
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 10:22:32 -08:00
kfox1111 4a54afe64c
Merge pull request #96 from kfox1111/sudo-fix2
Fix missing sudo in release job
2025-02-02 10:14:52 -08:00
Kevin Fox b90c73cb4d Fix missing sudo in release job
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 10:14:27 -08:00
kfox1111 191dd4131d
Merge pull request #95 from kfox1111/fix-rsync
Remove archive flag from rsync
2025-02-02 10:05:39 -08:00
Kevin Fox e46fb8cba6 Remove archive flag from rsync
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 10:05:00 -08:00
kfox1111 de7a630101
Merge pull request #94 from kfox1111/state-fix
Initial image didn't have debs. Don't copy.
2025-02-02 09:52:34 -08:00
kfox1111 0e58021d0c
Merge branch 'main' into state-fix 2025-02-02 09:52:27 -08:00
Kevin Fox 46485e4bae Initial image didn't have debs. Don't copy.
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 09:51:30 -08:00
kfox1111 ab7152e27d
Merge pull request #93 from kfox1111/sudo-fix
Add missing sudo. Do an apt-get update just in case.
2025-02-02 09:44:13 -08:00
Kevin Fox 95670f9687 Add missing sudo. Do an apt-get update just in case.
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 09:43:41 -08:00
kfox1111 21eec10598
Merge pull request #92 from kfox1111/merge-pipeline
Create el9 repo in pages
2025-02-02 09:35:28 -08:00
kfox1111 bf6249c6f8
Merge branch 'main' into merge-pipeline 2025-02-02 09:29:11 -08:00
Kevin Fox 07b525e25f Create el9 repo in pages
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 09:28:48 -08:00
kfox1111 c53803f08e
Merge pull request #91 from kfox1111/fix-dockerfile
Fix packages path in Dockerfile.repos
2025-02-02 08:59:16 -08:00
Kevin Fox eeb71e913c Fix packages path in Dockerfile.repos
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 08:58:35 -08:00
kfox1111 fc95db736e
Merge pull request #90 from kfox1111/fix-release-job
Add missing semicolon in release job
2025-02-02 08:46:23 -08:00
Kevin Fox e182efb7a2 Add missing semicolon in releae job
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 08:40:07 -08:00
kfox1111 89989e99bb
Merge pull request #89 from kfox1111/base64dec
Base64 decode the signing key
2025-02-02 08:29:59 -08:00
Kevin Fox c019445ec5 Base64 decode the signing key
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 08:24:41 -08:00
kfox1111 c63f3d2351
Merge pull request #88 from kfox1111/pages6
Sign rpms and prepare container for state tracking
2025-02-02 08:19:33 -08:00
kfox1111 8e98aa9bf5
Merge branch 'main' into pages6 2025-02-02 08:13:51 -08:00
Kevin Fox 48c0a6c5e6 Sign rpms and prepare container for state tracking
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-02 08:12:18 -08:00
kfox1111 b7bb2e73fb
Merge pull request #87 from kfox1111/pages5
It doesn't like metadata
2025-02-01 11:25:49 -08:00
Kevin Fox 69025e3891 It doesn't like metadata
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-01 10:56:52 -08:00
kfox1111 a834d5f598
Merge pull request #86 from kfox1111/pages4
Permissions overwrite defaults. Add back missing permissions.
2025-02-01 10:50:31 -08:00
kfox1111 09526903be
Merge branch 'main' into pages4 2025-02-01 10:43:12 -08:00
Kevin Fox f025a3e8a9 Permissions overwrite defaults. Add back missing permissions.
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-01 10:42:29 -08:00
kfox1111 625e8b0906
Merge pull request #85 from kfox1111/pages3
Fix typo in pages job
2025-02-01 10:28:15 -08:00
Kevin Fox 84f3d82547 Fix typo
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-01 10:20:36 -08:00
kfox1111 777938afc1
Merge pull request #84 from kfox1111/pages2
Add permission bits to pages job
2025-02-01 10:17:09 -08:00
Kevin Fox 16f3673b9a Add permission bits to pages job
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-01 09:44:32 -08:00
kfox1111 5508e6d210
Merge pull request #83 from kfox1111/pages
Start of packages to pages
2025-02-01 09:31:44 -08:00
Kevin Fox d639140258 Start of packages to pages
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-02-01 09:24:44 -08:00
kfox1111 f9c5e2ea8d
Merge pull request #82 from kfox1111/rpm-versionbump2
Bump spiffe-helper version
2025-01-31 15:39:27 -08:00
kfox1111 29a2d048c8
Merge branch 'main' into rpm-versionbump2 2025-01-31 15:29:52 -08:00
Kevin Fox d54f4d059f Bump spiffe-helper version
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-01-31 15:25:14 -08:00
kfox1111 984b535906
Merge pull request #81 from kfox1111/rpms-versionbump
Bump released versions
2025-01-27 06:51:41 -08:00
Kevin Fox fa49fcea8b Bump released versions
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
2025-01-27 06:44:18 -08:00
65 changed files with 793 additions and 558 deletions

View File

@ -6,11 +6,11 @@ on:
pull_request: {} pull_request: {}
workflow_dispatch: {} workflow_dispatch: {}
env: env:
GO_VERSION: 1.19.4 GO_VERSION: 1.24.1
CHANGE_MINIKUBE_NONE_USER: true CHANGE_MINIKUBE_NONE_USER: true
jobs: jobs:
test-all: test-all:
runs-on: ubuntu-22.04 runs-on: ubuntu-24.04
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Checkout - name: Checkout
@ -39,7 +39,7 @@ jobs:
- run: | - run: |
set -xe set -xe
echo "building: {{github.ref_name}}-$(uname -i)" echo "building: {{github.ref_name}}-$(uname -i)"
docker build -t t examples/rpms docker build -t t -f examples/rpms/Dockerfile examples
docker run -i --rm -v /tmp:/tmp t /bin/bash -c 'cp -a /usr/share/nginx/html/packages /tmp' docker run -i --rm -v /tmp:/tmp t /bin/bash -c 'cp -a /usr/share/nginx/html/packages /tmp'
- name: Archive artifacts - name: Archive artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4

View File

@ -14,10 +14,15 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- run: | - name: build
set -xe env:
RPM_GPG_KEY: ${{ secrets.RPM_GPG_KEY }}
run: |
set -e
echo "building: {{github.ref_name}}-$(uname -i)" echo "building: {{github.ref_name}}-$(uname -i)"
docker build -t t examples/rpms printf "%s" "$RPM_GPG_KEY" | base64 -d > /tmp/rpm.priv
docker build --secret "id=gpg,src=/tmp/rpm.priv" -t t -f examples/rpms/Dockerfile examples
rm -f /tmp/rpm.priv
docker run -i --rm -v /tmp:/tmp t /bin/bash -c 'cp -a /usr/share/nginx/html/packages /tmp' docker run -i --rm -v /tmp:/tmp t /bin/bash -c 'cp -a /usr/share/nginx/html/packages /tmp'
- name: Archive artifacts - name: Archive artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -30,6 +35,11 @@ jobs:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
timeout-minutes: 30 timeout-minutes: 30
needs: packages needs: packages
permissions:
id-token: write
contents: write
pages: write
packages: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -43,8 +53,42 @@ jobs:
with: with:
name: packages-arm name: packages-arm
path: /tmp/packages path: /tmp/packages
- name: Log in to the Container registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build-state-image
run: |
set -e
sudo apt-get update
sudo apt-get install -y rsync
# Fetch previously released packages
mkdir -p /tmp/oldpackages
docker run -i --rm -v /tmp:/tmp ghcr.io/spiffe/spire-examples/pages:latest /bin/bash -c 'cp -a /usr/share/nginx/html/RPMS /tmp/oldpackages/ && cp -a /usr/share/nginx/html/DEBS /tmp/oldpackages/'
# Copy only packages that don't overwrite a previously released package. This prevents rereleasing a package.
sudo rsync --ignore-existing -rv /tmp/packages/ /tmp/oldpackages/
sudo mv /tmp/packages /tmp/releasepackages
sudo mv /tmp/oldpackages /tmp/packages
# Update repos
docker build -f examples/rpms/Dockerfile.repos -t ghcr.io/spiffe/spire-examples/pages:latest /tmp/packages
sudo rm -rf /tmp/packages
mkdir -p /tmp/packages
docker run -i --rm -v /tmp:/tmp ghcr.io/spiffe/spire-examples/pages:latest /bin/bash -c 'cp -a /usr/share/nginx/html/RPMS /tmp/packages/ && cp -a /usr/share/nginx/html/DEBS /tmp/packages/'
# Save a copy of packages/pages for next release
docker push ghcr.io/spiffe/spire-examples/pages:latest
- name: Release Files - name: Release Files
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
gh release upload "${GITHUB_REF#refs/tags/}" /tmp/packages/*/*/* gh release upload "${GITHUB_REF#refs/tags/}" examples/rpms/rpm.pub /tmp/releasepackages/*/*/*.rpm /tmp/releasepackages/*/*/*.deb
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: /tmp/packages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -12,30 +12,26 @@ The SPIRE project is growing rapidly, and new features are released often. In or
Examples showing how SPIRE integrates with Envoy. Examples showing how SPIRE integrates with Envoy.
* [Envoy SDS Integration with SPIRE 1.5.1](examples/envoy) Use SPIRE to deliver and rotate X509-SVIDs for Envoy * [Envoy SDS Integration](examples/envoy) Use SPIRE to deliver and rotate X509-SVIDs for Envoy
## Kubernetes ## Kubernetes
Examples showing how to deploy SPIRE on Kubernetes. There are several configuration possibilities. Examples showing how to deploy SPIRE on Kubernetes. There are several configuration possibilities.
+ [Simple SAT with SPIRE 1.5.1](examples/k8s/simple_sat) - This is a simple configuration using the Kubernetes + [Simple PSAT](examples/k8s/simple_psat) - This is a simple configuration using the
[service account token (SAT) attestor](https://github.com/spiffe/spire/blob/v1.5.1/doc/plugin_server_nodeattestor_k8s_sat.md)
that deploys SPIRE server as a StatefulSet and SPIRE agent as a DaemonSet.
+ [Simple PSAT with SPIRE 1.5.1](examples/k8s/simple_psat) - This is a simple configuration using the
Kubernetes Kubernetes
[projected service account token (PSAT) attestor](https://github.com/spiffe/spire/blob/v1.5.1/doc/plugin_server_nodeattestor_k8s_psat.md) [projected service account token (PSAT) attestor](https://github.com/spiffe/spire/blob/main/doc/plugin_server_nodeattestor_k8s_psat.md).
that otherwise deploys SPIRE as in the **Simple SAT** example. + [Postgres](examples/k8s/postgres) - This expands on the **Simple PSAT** configuration by
+ [Postgres with SPIRE 1.5.1](examples/k8s/postgres) - This expands on the **Simple SAT** configuration by
moving the SPIRE datastore into a Postgres StatefulSet. The SPIRE server is moving the SPIRE datastore into a Postgres StatefulSet. The SPIRE server is
now a stateless Deployment that can be scaled. now a stateless Deployment that can be scaled.
+ [Kustomize with SPIRE 1.5.1](examples/k8s/k7e) - A set of SPIRE examples using [Kustomize](https://kustomize.io/) + [Kustomize](examples/k8s/k7e) - A set of SPIRE examples using [Kustomize](https://kustomize.io/)
as shown at the SPIFFE Community Day in May 2019. as shown at the SPIFFE Community Day in May 2019.
## EKS ## EKS
Examples showing how to deploy SPIRE on Amazon EKS. Examples showing how to deploy SPIRE on Amazon EKS.
+ [EKS-based SAT with SPIRE 1.5.1](examples/k8s/eks_sat) - This slightly modifies the **Kubernetes Simple SAT** configuration to + [EKS-based SAT](examples/k8s/eks_psat) - This slightly modifies the **Kubernetes Simple PSAT** configuration to
make it compatible with EKS platform. make it compatible with EKS platform.
## SystemD ## SystemD

View File

@ -1,4 +1,4 @@
# Envoy 1.17.0 SDS Example with SPIRE 1.5.1 # Envoy 1.17.0 SDS Example with SPIRE
[!WARNING] [!WARNING]
This example is no longer tested regularly. Some assembly may be required. Please let us know if changes are needed. This example is no longer tested regularly. Some assembly may be required. Please let us know if changes are needed.

View File

@ -1,4 +1,4 @@
FROM ghcr.io/spiffe/spire-agent:1.6.1 as spire FROM ghcr.io/spiffe/spire-agent:1.11.2 as spire
FROM envoyproxy/envoy:v1.25.1 FROM envoyproxy/envoy:v1.25.1
RUN mkdir -p /opt/spire/conf/agent RUN mkdir -p /opt/spire/conf/agent

View File

@ -1,4 +1,4 @@
FROM ghcr.io/spiffe/spire-server:1.6.1 FROM ghcr.io/spiffe/spire-server:1.11.2
# Override spire configurations # Override spire configurations
COPY conf/spire-server.conf /opt/spire/conf/server/server.conf COPY conf/spire-server.conf /opt/spire/conf/server/server.conf

View File

@ -1,4 +1,4 @@
FROM ghcr.io/spiffe/spire-agent:1.6.1 as spire FROM ghcr.io/spiffe/spire-agent:1.11.2 as spire
FROM envoyproxy/envoy:v1.25.1 FROM envoyproxy/envoy:v1.25.1
RUN mkdir -p /opt/spire/conf/agent RUN mkdir -p /opt/spire/conf/agent

View File

@ -23,12 +23,12 @@ spec:
- name: init - name: init
# This is a small image with wait-for-it, choose whatever image # This is a small image with wait-for-it, choose whatever image
# you prefer that waits for a service to be up. This image is built # you prefer that waits for a service to be up. This image is built
# from https://github.com/lqhl/wait-for-it # from https://github.com/chainguard-images/images/blob/main/images/wait-for-it
image: gcr.io/spiffe-io/wait-for-it image: cgr.dev/chainguard/wait-for-it
args: ["-t", "30", "spire-server:8081"] args: ["-t", "30", "spire-server:8081"]
containers: containers:
- name: spire-agent - name: spire-agent
image: ghcr.io/spiffe/spire-agent:1.6.1 image: ghcr.io/spiffe/spire-agent:1.11.2
args: ["-config", "/run/spire/config/agent.conf"] args: ["-config", "/run/spire/config/agent.conf"]
env: env:
- name: MY_NODE_NAME - name: MY_NODE_NAME

View File

@ -21,7 +21,7 @@ spec:
shareProcessNamespace: true shareProcessNamespace: true
containers: containers:
- name: spire-server - name: spire-server
image: ghcr.io/spiffe/spire-server:1.6.1 image: ghcr.io/spiffe/spire-server:1.11.2
args: args:
- -config - -config
- /run/spire/config/server.conf - /run/spire/config/server.conf

View File

@ -1,18 +1,18 @@
# SPIRE 1.5.1 deployment using SAT node attestor on EKS # SPIRE deployment using PSAT node attestor on EKS
This configuration is an example of a SPIRE 1.5.1 deployment for Kubernetes on EKS. This example is based on the [simple SAT](../simple_sat/README.md), with minor modifications to make it work on EKS platform. This configuration is an example of a SPIRE deployment for Kubernetes on EKS. This example is based on the [simple PSAT](../simple_psat/README.md), with minor modifications to make it work on EKS platform.
Compare the [simple SAT server](../simple_sat/spire-server.yaml) configuration with Compare the [simple PSAT server](../simple_psat/spire-server.yaml) configuration with
this [EKS SAT server](spire-server.yaml) to see the differences, which this [EKS PSAT server](spire-server.yaml) to see the differences, which
consist of: consist of:
+ Node attestation is done using the [SAT node attestor](https://github.com/spiffe/spire/blob/v1.5.1/doc/plugin_server_nodeattestor_k8s_sat.md) + Node attestation is done using the [PSAT node attestor](https://github.com/spiffe/spire/blob/main/doc/plugin_server_nodeattestor_k8s_psat.md)
with kubernetes token review validation enabled. with kubernetes token review validation enabled.
+ As a consequence of the above, volume and volume mounts for validation key are removed. + As a consequence of the above, volume and volume mounts for validation key are removed.
+ RBAC authorization policies are set to guarantee access to certain Kubernetes resources. + RBAC authorization policies are set to guarantee access to certain Kubernetes resources.
In the same way, the differences between the [simple SAT agent](../simple_sat/spire-agent.yaml) and [EKS SAT server](spire-agent.yaml) are: In the same way, the differences between the [simple PSAT agent](../simple_psat/spire-agent.yaml) and [EKS PSAT server](spire-agent.yaml) are:
+ Workload attestation is done using the [k8s workload attestor](https://github.com/spiffe/spire/blob/v1.5.1/doc/plugin_agent_workloadattestor_k8s.md) with the secure port configuration. + Workload attestation is done using the [k8s workload attestor](https://github.com/spiffe/spire/blob/main/doc/plugin_agent_workloadattestor_k8s.md) with the secure port configuration.
+ RBAC authorization policies are set to guarantee access to certain Kubernetes resources. + RBAC authorization policies are set to guarantee access to certain Kubernetes resources.
Both SPIRE agent and server run in the **spire** namespace, using service accounts of **spire-server** and **spire-agent**. Both SPIRE agent and server run in the **spire** namespace, using service accounts of **spire-server** and **spire-agent**.
@ -42,5 +42,5 @@ The server log shows the attestation result:
$ kubectl -n spire logs -f spire-server-0 $ kubectl -n spire logs -f spire-server-0
``` ```
``` ```
level=info msg="Node attestation request from 192.168.21.111:56628 completed using strategy k8s_sat" subsystem_name=node_api level=info msg="Node attestation request from 192.168.21.111:56628 completed using strategy k8s_psat" subsystem_name=node_api
``` ```

View File

@ -52,7 +52,7 @@ data:
} }
plugins { plugins {
NodeAttestor "k8s_sat" { NodeAttestor "k8s_psat" {
plugin_data { plugin_data {
cluster = "demo-cluster" cluster = "demo-cluster"
} }
@ -125,12 +125,12 @@ spec:
- name: init - name: init
# This is a small image with wait-for-it, choose whatever image # This is a small image with wait-for-it, choose whatever image
# you prefer that waits for a service to be up. This image is built # you prefer that waits for a service to be up. This image is built
# from https://github.com/lqhl/wait-for-it # from https://github.com/chainguard-images/images/blob/main/images/wait-for-it
image: gcr.io/spiffe-io/wait-for-it image: cgr.dev/chainguard/wait-for-it
args: ["-t", "30", "spire-server:8081"] args: ["-t", "30", "spire-server:8081"]
containers: containers:
- name: spire-agent - name: spire-agent
image: ghcr.io/spiffe/spire-agent:1.6.1 image: ghcr.io/spiffe/spire-agent:1.11.2
args: ["-config", "/run/spire/config/agent.conf"] args: ["-config", "/run/spire/config/agent.conf"]
env: env:
- name: MY_NODE_NAME - name: MY_NODE_NAME
@ -144,6 +144,8 @@ spec:
- name: spire-agent-socket - name: spire-agent-socket
mountPath: /run/spire/sockets mountPath: /run/spire/sockets
readOnly: false readOnly: false
- name: spire-token
mountPath: /var/run/secrets/tokens
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /live path: /live
@ -166,3 +168,10 @@ spec:
hostPath: hostPath:
path: /run/spire/sockets path: /run/spire/sockets
type: DirectoryOrCreate type: DirectoryOrCreate
- name: spire-token
projected:
sources:
- serviceAccountToken:
path: spire-agent
expirationSeconds: 7200
audience: spire-server

View File

@ -80,12 +80,11 @@ data:
} }
} }
NodeAttestor "k8s_sat" { NodeAttestor "k8s_psat" {
plugin_data { plugin_data {
clusters = { clusters = {
"demo-cluster" = { "demo-cluster" = {
service_account_allow_list = ["spire:spire-agent"] service_account_allow_list = ["spire:spire-agent"]
use_token_review_api_validation = true
} }
} }
} }
@ -152,7 +151,7 @@ spec:
serviceAccountName: spire-server serviceAccountName: spire-server
containers: containers:
- name: spire-server - name: spire-server
image: ghcr.io/spiffe/spire-server:1.6.1 image: ghcr.io/spiffe/spire-server:1.11.2
args: ["-config", "/run/spire/config/server.conf"] args: ["-config", "/run/spire/config/server.conf"]
ports: ports:
- containerPort: 8081 - containerPort: 8081

View File

@ -4,7 +4,7 @@ This directory contains various examples of deploying and configuring SPIRE to
Kubernetes using [kustomize](https://kustomize.io) which is part of Kubectl as Kubernetes using [kustomize](https://kustomize.io) which is part of Kubectl as
of 1.14. of 1.14.
+ [base_minikube_sat](base_minikube_sat) - A base configuration for SPIRE in + [base_minikube_psat](base_minikube_psat) - A base configuration for SPIRE in
minikube using the SAT attestor. This is also the base configuration from minikube using the SAT attestor. This is also the base configuration from
which all other configurations in this directory are derived. which all other configurations in this directory are derived.
+ [community_day_2019_may](community_day_2019_may) - This is the demo from + [community_day_2019_may](community_day_2019_may) - This is the demo from
@ -28,7 +28,7 @@ by kubectl, you can use the "kustomize" argument to `kubectl` along with the
directory of the configuration to apply. For example: directory of the configuration to apply. For example:
``` ```
$ kubectl kustomize base_minikube_sat $ kubectl kustomize base_minikube_psat
``` ```
## Apply Configuration to Kubernetes ## Apply Configuration to Kubernetes
@ -37,5 +37,5 @@ To apply a kustomize configuration with kubectl, use the "-k" option to the
"apply" option along with the directory of the configuration to apply: "apply" option along with the directory of the configuration to apply:
``` ```
$ kubectl apply -k base_minikube_sat $ kubectl apply -k base_minikube_psat
``` ```

View File

@ -9,7 +9,7 @@ agent {
} }
plugins { plugins {
NodeAttestor "k8s_sat" { NodeAttestor "k8s_psat" {
plugin_data { plugin_data {
cluster = "demo-cluster" cluster = "demo-cluster"
} }

View File

@ -19,11 +19,10 @@ plugins {
} }
} }
NodeAttestor "k8s_sat" { NodeAttestor "k8s_psat" {
plugin_data { plugin_data {
clusters = { clusters = {
"demo-cluster" = { "demo-cluster" = {
service_account_key_file = "/run/k8s-certs/sa.pub"
service_account_allow_list = ["spire:spire-agent"] service_account_allow_list = ["spire:spire-agent"]
} }
} }

View File

@ -23,12 +23,12 @@ spec:
- name: init - name: init
# This is a small image with wait-for-it, choose whatever image # This is a small image with wait-for-it, choose whatever image
# you prefer that waits for a service to be up. This image is built # you prefer that waits for a service to be up. This image is built
# from https://github.com/lqhl/wait-for-it # from https://github.com/chainguard-images/images/blob/main/images/wait-for-it
image: gcr.io/spiffe-io/wait-for-it image: cgr.dev/chainguard/wait-for-it
args: ["-t", "30", "spire-server:8081"] args: ["-t", "30", "spire-server:8081"]
containers: containers:
- name: spire-agent - name: spire-agent
image: ghcr.io/spiffe/spire-agent:1.6.1 image: ghcr.io/spiffe/spire-agent:1.11.2
imagePullPolicy: Always imagePullPolicy: Always
args: ["-config", "/run/spire/config/spire-agent.conf"] args: ["-config", "/run/spire/config/spire-agent.conf"]
env: env:
@ -46,6 +46,8 @@ spec:
- name: spire-agent-socket - name: spire-agent-socket
mountPath: /run/spire/sockets mountPath: /run/spire/sockets
readOnly: false readOnly: false
- name: spire-token
mountPath: /var/run/secrets/tokens
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /live path: /live
@ -71,3 +73,10 @@ spec:
hostPath: hostPath:
path: /run/spire/sockets path: /run/spire/sockets
type: DirectoryOrCreate type: DirectoryOrCreate
- name: spire-token
projected:
sources:
- serviceAccountToken:
path: spire-agent
expirationSeconds: 7200
audience: spire-server

View File

@ -20,7 +20,7 @@ spec:
serviceAccountName: spire-server serviceAccountName: spire-server
containers: containers:
- name: spire-server - name: spire-server
image: ghcr.io/spiffe/spire-server:1.6.1 image: ghcr.io/spiffe/spire-server:1.11.2
imagePullPolicy: Always imagePullPolicy: Always
args: ["-config", "/run/spire/config/spire-server.conf"] args: ["-config", "/run/spire/config/spire-server.conf"]
ports: ports:

View File

@ -8,3 +8,6 @@ rules:
resources: ["configmaps"] resources: ["configmaps"]
resourceNames: ["spire-bundle"] resourceNames: ["spire-bundle"]
verbs: ["get", "patch"] verbs: ["get", "patch"]
- apiGroups: ["authentication.k8s.io"]
resources: ["tokenreviews"]
verbs: ["create"]

View File

@ -1,10 +1,10 @@
# Demo from SPIRE Community Day, May 2019 # Demo from SPIRE Community Day, May 2019
This example will allow you to recreate the demo from SPIRE Community Day in This example will allow you to recreate the demo from SPIRE Community Day in
May, 2019. To run this example you'll need: May 2019. To run this example you'll need:
+ A working minikube. + A working minikube.
+ `kubectl` version 1.14 or later. + `kubectl` version 1.20 or later.
+ The [examples/k8s/k7e](/examples/k8s/k7e) directory tree from the SPIRE github + The [examples/k8s/k7e](/examples/k8s/k7e) directory tree from the SPIRE github
repository. repository.
@ -24,11 +24,11 @@ $ watch 'set -x; kubectl get pods -n spire; kubectl get pods'
### Deploy SPIRE ### Deploy SPIRE
To deploy SPIRE, apply the `base_minikube_sat` configuration from the parent To deploy SPIRE, apply the `base_minikube_psat` configuration from the parent
directory: directory:
``` ```
$ kubectl apply -k ../base_minikube_sat $ kubectl apply -k ../base_minikube_psat
``` ```
Within 30 seconds or so, you should now have pods in "Running" status for both Within 30 seconds or so, you should now have pods in "Running" status for both
@ -102,13 +102,13 @@ registration entries. We'll create two registration entries:
First, let's create the `node` registration entry: First, let's create the `node` registration entry:
``` ```
$ kubectl exec -n spire spire-server-0 -- /opt/spire/bin/spire-server entry create -node -spiffeID spiffe://example.org/cluster -selector k8s_sat:cluster:demo-cluster $ kubectl exec -n spire spire-server-0 -- /opt/spire/bin/spire-server entry create -node -spiffeID spiffe://example.org/cluster -selector k8s_psat:cluster:demo-cluster
Entry ID : 1685a30f-fb14-4242-a86a-568038407ed7 Entry ID : 1685a30f-fb14-4242-a86a-568038407ed7
SPIFFE ID : spiffe://example.org/cluster SPIFFE ID : spiffe://example.org/cluster
Parent ID : spiffe://example.org/spire/server Parent ID : spiffe://example.org/spire/server
TTL : 3600 TTL : 3600
Selector : k8s_sat:cluster:demo-cluster Selector : k8s_psat:cluster:demo-cluster
``` ```
Second, we'll create a registration entry for our client workload: Second, we'll create a registration entry for our client workload:

View File

@ -16,7 +16,7 @@ spec:
spec: spec:
containers: containers:
- name: client - name: client
image: ghcr.io/spiffe/spire-agent:1.6.1 image: ghcr.io/spiffe/spire-agent:1.11.2
imagePullPolicy: Always imagePullPolicy: Always
command: ["/opt/spire/bin/spire-agent"] command: ["/opt/spire/bin/spire-agent"]
args: ["api", "watch", "-socketPath", "/run/spire/sockets/agent.sock"] args: ["api", "watch", "-socketPath", "/run/spire/sockets/agent.sock"]

View File

@ -1,4 +1,4 @@
# Postgres SPIRE 1.5.1 deployment # Postgres SPIRE deployment
This configuration is an example of a SPIRE deployment for Kubernetes using This configuration is an example of a SPIRE deployment for Kubernetes using
Postgres as a datastore for the SPIRE server. This configuration provides Postgres as a datastore for the SPIRE server. This configuration provides
@ -8,13 +8,13 @@ better resiliency and allows for scaling up the number of SPIRE servers.
PersistentVolume. PersistentVolume.
+ The SPIRE [server](spire-server.yaml) runs as a stateless Deployment. + The SPIRE [server](spire-server.yaml) runs as a stateless Deployment.
+ The SPIRE agent runs as a DaemonSet - note this configuration is a symlink + The SPIRE agent runs as a DaemonSet - note this configuration is a symlink
to the [simple sat example](../simple_sat/spire-agent.yaml). to the [simple psat example](../simple_psat/spire-agent.yaml).
Both SPIRE agent and server, along with postgres, run in the **spire** Both SPIRE agent and server, along with postgres, run in the **spire**
namespace, using service accounts of **spire-database**, **spire-server**, and namespace, using service accounts of **spire-database**, **spire-server**, and
**spire-agent**. **spire-agent**.
Compare the [simple sat server](../simple_sat/spire-server.yaml) configuration with Compare the [simple psat server](../simple_psat/spire-server.yaml) configuration with
this [postgres backed server](spire-server.yaml) to see the differences, which this [postgres backed server](spire-server.yaml) to see the differences, which
consist of: a Deployment instead of a StatefulSet, a datastore plugin change, consist of: a Deployment instead of a StatefulSet, a datastore plugin change,
an InitContainer that waits for postgres to be up, and removal of the an InitContainer that waits for postgres to be up, and removal of the
@ -27,11 +27,11 @@ failures and scalability.
+ **stateless** - To run the SPIRE server stateless (as in this example), the + **stateless** - To run the SPIRE server stateless (as in this example), the
`UpstreamAuthority` plugin needs to be used. `UpstreamAuthority` plugin needs to be used.
+ **stateful** - To run the SPIRE server stateful, the directory specified in + **stateful** - To run the SPIRE server stateful, the directory specified in
`data_dir` must be persistent (such as in the [simple sat example](../simple_sat) `data_dir` must be persistent (such as in the [simple psat example](../simple_psat)
where a StatefulSet and PersistentVolumeClaim are used. where a StatefulSet and PersistentVolumeClaim are used.
In this example deployment, the SPIRE server is stateless, using the example In this example deployment, the SPIRE server is stateless, using the example
[dummy upstream authority](https://github.com/spiffe/spire/tree/v1.5.1/conf/server). [dummy upstream authority](https://github.com/spiffe/spire/tree/main/conf/server).
One other **important note**: In a production environment it is very important One other **important note**: In a production environment it is very important
to use a highly available Postgres configuration, unlike this configuration to use a highly available Postgres configuration, unlike this configuration

View File

@ -24,7 +24,7 @@ data:
} }
plugins { plugins {
NodeAttestor "k8s_sat" { NodeAttestor "k8s_psat" {
plugin_data { plugin_data {
cluster = "demo-cluster" cluster = "demo-cluster"
} }
@ -101,12 +101,12 @@ spec:
- name: init - name: init
# This is a small image with wait-for-it, choose whatever image # This is a small image with wait-for-it, choose whatever image
# you prefer that waits for a service to be up. This image is built # you prefer that waits for a service to be up. This image is built
# from https://github.com/lqhl/wait-for-it # from https://github.com/chainguard-images/images/blob/main/images/wait-for-it
image: gcr.io/spiffe-io/wait-for-it image: cgr.dev/chainguard/wait-for-it
args: ["-t", "30", "spire-server:8081"] args: ["-t", "30", "spire-server:8081"]
containers: containers:
- name: spire-agent - name: spire-agent
image: ghcr.io/spiffe/spire-agent:1.6.1 image: ghcr.io/spiffe/spire-agent:1.11.2
args: ["-config", "/run/spire/config/agent.conf"] args: ["-config", "/run/spire/config/agent.conf"]
env: env:
- name: MY_NODE_NAME - name: MY_NODE_NAME
@ -120,6 +120,8 @@ spec:
- name: spire-agent-socket - name: spire-agent-socket
mountPath: /run/spire/sockets mountPath: /run/spire/sockets
readOnly: false readOnly: false
- name: spire-token
mountPath: /var/run/secrets/tokens
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /live path: /live
@ -142,3 +144,10 @@ spec:
hostPath: hostPath:
path: /run/spire/sockets path: /run/spire/sockets
type: DirectoryOrCreate type: DirectoryOrCreate
- name: spire-token
projected:
sources:
- serviceAccountToken:
path: spire-agent
expirationSeconds: 7200
audience: spire-server

View File

@ -6,6 +6,36 @@ metadata:
--- ---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-server-cluster-role
rules:
- apiGroups: [""]
resources: ["pods", "nodes"]
verbs: ["get"]
- apiGroups: ["authentication.k8s.io"]
resources: ["tokenreviews"]
verbs: ["create"]
---
# Binds above cluster role to spire-server service account
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-server-cluster-role-binding
subjects:
- kind: ServiceAccount
name: spire-server
namespace: spire
roleRef:
kind: ClusterRole
name: spire-server-cluster-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@ -46,11 +76,10 @@ data:
} }
} }
NodeAttestor "k8s_sat" { NodeAttestor "k8s_psat" {
plugin_data { plugin_data {
clusters = { clusters = {
"demo-cluster" = { "demo-cluster" = {
service_account_key_file = "/run/k8s-certs/sa.pub"
service_account_allow_list = ["spire:spire-agent"] service_account_allow_list = ["spire:spire-agent"]
} }
} }
@ -119,12 +148,12 @@ spec:
- name: init - name: init
# This is a small image with wait-for-it, choose whatever image # This is a small image with wait-for-it, choose whatever image
# you prefer that waits for a service to be up. This image is built # you prefer that waits for a service to be up. This image is built
# from https://github.com/lqhl/wait-for-it # from https://github.com/chainguard-images/images/blob/main/images/wait-for-it
image: gcr.io/spiffe-io/wait-for-it image: cgr.dev/chainguard/wait-for-it
args: ["-t", "30", "spire-database:5432"] args: ["-t", "30", "spire-database:5432"]
containers: containers:
- name: spire-server - name: spire-server
image: ghcr.io/spiffe/spire-server:1.6.1 image: ghcr.io/spiffe/spire-server:1.11.2
args: ["-config", "/run/spire/config/server.conf"] args: ["-config", "/run/spire/config/server.conf"]
ports: ports:
- containerPort: 8081 - containerPort: 8081

View File

@ -1,6 +1,6 @@
# Simple SPIRE 1.5.1 deployment using PSAT node attestor # Simple SPIRE deployment using PSAT node attestor
This configuration is an example of a simple SPIRE 1.5.1 deployment for Kubernetes that uses [PSAT node attestor](https://github.com/spiffe/spire/blob/v1.5.1/doc/plugin_server_nodeattestor_k8s_psat.md). This configuration is an example of a simple SPIRE deployment for Kubernetes that uses [PSAT node attestor](https://github.com/spiffe/spire/blob/main/doc/plugin_server_nodeattestor_k8s_psat.md).
+ The SPIRE [server](spire-server.yaml) runs as a StatefulSet using a + The SPIRE [server](spire-server.yaml) runs as a StatefulSet using a
PersistentVolumeClaim. PersistentVolumeClaim.

View File

@ -129,12 +129,12 @@ spec:
- name: init - name: init
# This is a small image with wait-for-it, choose whatever image # This is a small image with wait-for-it, choose whatever image
# you prefer that waits for a service to be up. This image is built # you prefer that waits for a service to be up. This image is built
# from https://github.com/lqhl/wait-for-it # from https://github.com/chainguard-images/images/blob/main/images/wait-for-it
image: gcr.io/spiffe-io/wait-for-it image: cgr.dev/chainguard/wait-for-it
args: ["-t", "30", "spire-server:8081"] args: ["-t", "30", "spire-server:8081"]
containers: containers:
- name: spire-agent - name: spire-agent
image: ghcr.io/spiffe/spire-agent:1.6.1 image: ghcr.io/spiffe/spire-agent:1.11.2
args: ["-config", "/run/spire/config/agent.conf"] args: ["-config", "/run/spire/config/agent.conf"]
env: env:
- name: MY_NODE_NAME - name: MY_NODE_NAME

View File

@ -154,7 +154,7 @@ spec:
serviceAccountName: spire-server serviceAccountName: spire-server
containers: containers:
- name: spire-server - name: spire-server
image: ghcr.io/spiffe/spire-server:1.6.1 image: ghcr.io/spiffe/spire-server:1.11.2
args: ["-config", "/run/spire/config/server.conf"] args: ["-config", "/run/spire/config/server.conf"]
ports: ports:
- containerPort: 8081 - containerPort: 8081

View File

@ -1,33 +0,0 @@
# Simple SPIRE 1.5.1 deployment using SAT node attestor
This configuration is an example of a simple SPIRE v1.5.1 deployment for Kubernetes that uses [SAT node attestor](https://github.com/spiffe/spire/blob/v1.5.1/doc/plugin_server_nodeattestor_k8s_sat.md).
+ The SPIRE [server](spire-server.yaml) runs as a StatefulSet using a
PersistentVolumeClaim.
+ The SPIRE [agent](spire-agent.yaml) runs as a DaemonSet.
Both SPIRE agent and server run in the **spire** namespace, using service
accounts of **spire-server** and **spire-agent**.
## Usage
### Configuration
+ Set trust_domain and the cluster name for the k8s SAT NodeAttestor.
+ Modify the path in the *k8s-sa-cert* volume for SPIRE server as appropriate
for your deployment - this is the certificate used to verify service accounts
in the cluster. This example assumes minikube.
### Deployment
Start the server StatefulSet:
```
$ kubectl apply -f spire-server.yaml
```
Start the agent DaemonSet:
```
$ kubectl apply -f spire-agent.yaml
```

View File

@ -1,8 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: spire
resources:
- spire-server.yaml
- spire-agent.yaml

View File

@ -1,144 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: spire-agent
namespace: spire
---
apiVersion: v1
kind: ConfigMap
metadata:
name: spire-agent
namespace: spire
data:
agent.conf: |
agent {
data_dir = "/run/spire"
log_level = "DEBUG"
server_address = "spire-server"
server_port = "8081"
socket_path = "/run/spire/sockets/agent.sock"
trust_bundle_path = "/run/spire/config/bootstrap.crt"
trust_domain = "example.org"
}
plugins {
NodeAttestor "k8s_sat" {
plugin_data {
cluster = "demo-cluster"
}
}
KeyManager "memory" {
plugin_data {
}
}
WorkloadAttestor "k8s" {
plugin_data {
# Defaults to the secure kubelet port by default.
# Minikube does not have a cert in the cluster CA bundle that
# can authenticate the kubelet cert, so skip validation.
skip_kubelet_verification = true
node_name_env = "MY_NODE_NAME"
}
}
WorkloadAttestor "unix" {
plugin_data {
}
}
}
health_checks {
listener_enabled = true
bind_address = "0.0.0.0"
bind_port = "8080"
live_path = "/live"
ready_path = "/ready"
}
bootstrap.crt: |
-----BEGIN CERTIFICATE-----
MIICHzCCAaSgAwIBAgIJAJjG+BUpVpUbMAoGCCqGSM49BAMEMB4xCzAJBgNVBAYT
AlVTMQ8wDQYDVQQKDAZTUElGRkUwHhcNMjMwNjA5MjM0OTQxWhcNMjgwNjA3MjM0
OTQxWjAeMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGU1BJRkZFMHYwEAYHKoZIzj0C
AQYFK4EEACIDYgAERWdqmbBWmk7iKDFD7MuI8O2oBrXMpfZPC+Nz3dLRPWu44z3C
51MPk9GJDAoNsqpyZ9sHOnL8I+CdkmE41LqK/rigvKgvlrlqWJjf0/FAM/XLARaW
rzcpRty42WJgR5Yxo4GtMIGqMB0GA1UdDgQWBBRXKdGnbiP9nul87xm5F30yxRWT
VjAfBgNVHSMEGDAWgBRXKdGnbiP9nul87xm5F30yxRWTVjAPBgNVHRMBAf8EBTAD
AQH/MCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0
ZTAOBgNVHQ8BAf8EBAMCAQYwGQYDVR0RBBIwEIYOc3BpZmZlOi8vbG9jYWwwCgYI
KoZIzj0EAwQDaQAwZgIxAKHxaBfSjhDJksGXmgJKkcpepPCYfB58hUc3HkxPy3Zf
08dfaeAp7UdBCkpU20GSrQIxAJc0FMZs1BSSINku6oYZpsrcCuo7CijAJMLCBLXQ
VYYO6xcbDgbZVm5MXu3FWTt+7g==
-----END CERTIFICATE-----
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: spire-agent
namespace: spire
labels:
app: spire-agent
spec:
selector:
matchLabels:
app: spire-agent
template:
metadata:
namespace: spire
labels:
app: spire-agent
spec:
hostPID: true
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: spire-agent
initContainers:
- name: init
# This is a small image with wait-for-it, choose whatever image
# you prefer that waits for a service to be up. This image is built
# from https://github.com/lqhl/wait-for-it
image: gcr.io/spiffe-io/wait-for-it
args: ["-t", "30", "spire-server:8081"]
containers:
- name: spire-agent
image: ghcr.io/spiffe/spire-agent:1.6.1
args: ["-config", "/run/spire/config/agent.conf"]
env:
- name: MY_NODE_NAME
valueFrom:
fieldRef:
fieldPath: status.podIP
volumeMounts:
- name: spire-config
mountPath: /run/spire/config
readOnly: true
- name: spire-agent-socket
mountPath: /run/spire/sockets
readOnly: false
livenessProbe:
httpGet:
path: /live
port: 8080
failureThreshold: 2
initialDelaySeconds: 15
periodSeconds: 60
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: spire-config
configMap:
name: spire-agent
- name: spire-agent-socket
hostPath:
path: /run/spire/sockets
type: DirectoryOrCreate

View File

@ -1,195 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: spire
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: spire-server
namespace: spire
---
apiVersion: v1
kind: Secret
metadata:
name: spire-server
namespace: spire
type: Opaque
data:
bootstrap.key: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1JR2tBZ0VCQkRCN2FmUTBzS2xuVWZHZ01rcTRnZVFFdlUwOTV1aHJLZzNkVU1pSkQyVVVKNzBYYjVXTThXWmYKMEp3R2ZXVzVjTStnQndZRks0RUVBQ0toWkFOaUFBUkZaMnFac0ZhYVR1SW9NVVBzeTRqdzdhZ0d0Y3lsOWs4TAo0M1BkMHRFOWE3ampQY0xuVXcrVDBZa01DZzJ5cW5KbjJ3YzZjdndqNEoyU1lUalV1b3IrdUtDOHFDK1d1V3BZCm1OL1Q4VUF6OWNzQkZwYXZOeWxHM0xqWlltQkhsakU9Ci0tLS0tRU5EIEVDIFBSSVZBVEUgS0VZLS0tLS0K
---
apiVersion: v1
kind: ConfigMap
metadata:
name: spire-server
namespace: spire
data:
server.conf: |
server {
bind_address = "0.0.0.0"
bind_port = "8081"
trust_domain = "example.org"
data_dir = "/run/spire/data"
log_level = "DEBUG"
ca_subject = {
country = ["US"],
organization = ["SPIFFE"],
common_name = "",
}
}
plugins {
DataStore "sql" {
plugin_data {
database_type = "sqlite3"
connection_string = "/run/spire/data/datastore.sqlite3"
}
}
NodeAttestor "k8s_sat" {
plugin_data {
clusters = {
"demo-cluster" = {
service_account_key_file = "/run/k8s-certs/sa.pub"
service_account_allow_list = ["spire:spire-agent"]
}
}
}
}
KeyManager "disk" {
plugin_data {
keys_path = "/run/spire/data/keys.json"
}
}
UpstreamAuthority "disk" {
plugin_data {
key_file_path = "/run/spire/secrets/bootstrap.key"
cert_file_path = "/run/spire/config/bootstrap.crt"
}
}
}
health_checks {
listener_enabled = true
bind_address = "0.0.0.0"
bind_port = "8080"
live_path = "/live"
ready_path = "/ready"
}
bootstrap.crt: |
-----BEGIN CERTIFICATE-----
MIICHzCCAaSgAwIBAgIJAJjG+BUpVpUbMAoGCCqGSM49BAMEMB4xCzAJBgNVBAYT
AlVTMQ8wDQYDVQQKDAZTUElGRkUwHhcNMjMwNjA5MjM0OTQxWhcNMjgwNjA3MjM0
OTQxWjAeMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGU1BJRkZFMHYwEAYHKoZIzj0C
AQYFK4EEACIDYgAERWdqmbBWmk7iKDFD7MuI8O2oBrXMpfZPC+Nz3dLRPWu44z3C
51MPk9GJDAoNsqpyZ9sHOnL8I+CdkmE41LqK/rigvKgvlrlqWJjf0/FAM/XLARaW
rzcpRty42WJgR5Yxo4GtMIGqMB0GA1UdDgQWBBRXKdGnbiP9nul87xm5F30yxRWT
VjAfBgNVHSMEGDAWgBRXKdGnbiP9nul87xm5F30yxRWTVjAPBgNVHRMBAf8EBTAD
AQH/MCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0
ZTAOBgNVHQ8BAf8EBAMCAQYwGQYDVR0RBBIwEIYOc3BpZmZlOi8vbG9jYWwwCgYI
KoZIzj0EAwQDaQAwZgIxAKHxaBfSjhDJksGXmgJKkcpepPCYfB58hUc3HkxPy3Zf
08dfaeAp7UdBCkpU20GSrQIxAJc0FMZs1BSSINku6oYZpsrcCuo7CijAJMLCBLXQ
VYYO6xcbDgbZVm5MXu3FWTt+7g==
-----END CERTIFICATE-----
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: spire-server
namespace: spire
labels:
app: spire-server
spec:
replicas: 1
selector:
matchLabels:
app: spire-server
serviceName: spire-server
template:
metadata:
namespace: spire
labels:
app: spire-server
spec:
serviceAccountName: spire-server
containers:
- name: spire-server
image: ghcr.io/spiffe/spire-server:1.6.1
args: ["-config", "/run/spire/config/server.conf"]
ports:
- containerPort: 8081
volumeMounts:
- name: spire-config
mountPath: /run/spire/config
readOnly: true
- name: spire-secrets
mountPath: /run/spire/secrets
readOnly: true
- name: spire-data
mountPath: /run/spire/data
readOnly: false
- name: k8s-sa-cert
mountPath: /run/k8s-certs/sa.pub
readOnly: true
livenessProbe:
httpGet:
path: /live
port: 8080
failureThreshold: 2
initialDelaySeconds: 15
periodSeconds: 60
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: spire-config
configMap:
name: spire-server
- name: spire-secrets
secret:
secretName: spire-server
- name: k8s-sa-cert
hostPath:
path: /var/lib/minikube/certs/sa.pub
type: File
volumeClaimTemplates:
- metadata:
name: spire-data
namespace: spire
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
name: spire-server
namespace: spire
spec:
type: NodePort
ports:
- name: grpc
port: 8081
targetPort: 8081
protocol: TCP
selector:
app: spire-server

View File

@ -1,65 +0,0 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bold=$(tput bold) || true
norm=$(tput sgr0) || true
red=$(tput setaf 1) || true
green=$(tput setaf 2) || true
yellow=$(tput setaf 3) || true
fail() {
echo "${red}$*${norm}."
exit 1
}
delete-ns() {
echo "${bold}Cleaning up...${norm}"
kubectl delete --ignore-not-found namespace spire > /dev/null
}
cleanup() {
if [ -z "${GOOD}" ]; then
echo "${yellow}Dumping statefulset/spire-server logs...${norm}"
kubectl -nspire logs statefulset/spire-server --all-containers
echo "${yellow}Dumping daemonset/spire-agent logs...${norm}"
kubectl -nspire logs daemonset/spire-agent --all-containers
fi
delete-ns
if [ -n "${GOOD}" ]; then
echo "${green}Success.${norm}"
else
echo "${red}Failed.${norm}"
fi
}
trap cleanup EXIT
echo "${bold}Preparing environment...${norm}"
delete-ns
kubectl create namespace spire
echo "${bold}Applying configuration...${norm}"
kubectl apply -k "${DIR}"
LOGLINE="Agent attestation request completed"
for ((i=0;i<120;i++)); do
if ! kubectl -nspire rollout status statefulset/spire-server; then
sleep 1
continue
fi
if ! kubectl -nspire rollout status daemonset/spire-agent; then
sleep 1
continue
fi
if ! kubectl -nspire logs statefulset/spire-server -c spire-server | grep -e "$LOGLINE" ; then
sleep 1
continue
fi
echo "${bold}Node attested.${norm}"
GOOD=1
exit 0
done
echo "${red}Timed out waiting for node to attest.${norm}"
exit 1

View File

@ -1,16 +1,26 @@
ARG STEPVER="0.28.2" ARG STEPVER="0.28.2"
ARG STEPCAVER="0.28.4"
FROM docker.io/library/almalinux:9 AS rpm-builder FROM docker.io/library/almalinux:9 AS rpm-builder
ARG STEPVER ARG STEPVER
ARG STEPCAVER
WORKDIR /tmp WORKDIR /tmp
COPY *.spec /tmp COPY rpms/*.spec /tmp
ADD rpms/rpm.pub /tmp/rpm.pub
ADD rpms/rpmmacros /root/.rpmmacros
RUN \ COPY systemd /tmp/systemd
dnf install -y rpmdevtools rpm-build git make && \
RUN --mount=type=secret,id=gpg \
mkdir -p /root/rpmbuild/SOURCES && \
tar -zcvf /root/rpmbuild/SOURCES/spire-extras-systemd.tar.gz systemd && \
dnf install -y which rpmdevtools rpm-build rpm-sign git make && \
spectool -g -R spire.spec && \ spectool -g -R spire.spec && \
rpmbuild -ba spire.spec && \ rpmbuild -ba spire.spec && \
spectool -g -R spire-controller-manager.spec && \
rpmbuild -ba spire-controller-manager.spec && \
spectool -g -R spiffe-helper.spec && \ spectool -g -R spiffe-helper.spec && \
rpmbuild -ba spiffe-helper.spec && \ rpmbuild -ba spiffe-helper.spec && \
spectool -g -R spiffe-step-ssh.spec && \ spectool -g -R spiffe-step-ssh.spec && \
@ -24,14 +34,29 @@ RUN \
spectool -g -R spire-server-nodeattestor-tpmdirect.spec && \ spectool -g -R spire-server-nodeattestor-tpmdirect.spec && \
rpmbuild -ba spire-server-nodeattestor-tpmdirect.spec && \ rpmbuild -ba spire-server-nodeattestor-tpmdirect.spec && \
spectool -g -R spire-agent-nodeattestor-tpmdirect.spec && \ spectool -g -R spire-agent-nodeattestor-tpmdirect.spec && \
rpmbuild -ba spire-agent-nodeattestor-tpmdirect.spec rpmbuild -ba spire-agent-nodeattestor-tpmdirect.spec && \
spectool -g -R spire-server-attestor-tpm.spec && \
rpmbuild -ba spire-server-attestor-tpm.spec && \
spectool -g -R spire-credentialcomposer-cel.spec && \
rpmbuild -ba spire-credentialcomposer-cel.spec && \
spectool -g -R aws-spiffe-workload-helper.spec && \
rpmbuild -ba aws-spiffe-workload-helper.spec && \
if [ -f /run/secrets/gpg ]; then \
gpg --import /run/secrets/gpg && \
gpg --import rpm.pub && \
rpm --addsign /root/rpmbuild/RPMS/*/*.rpm; \
else \
true; \
fi
RUN \ RUN \
dnf localinstall -y https://github.com/smallstep/cli/releases/download/v${STEPVER}/step-cli-${STEPVER}-1.$(uname -i).rpm && \ dnf localinstall -y https://github.com/smallstep/cli/releases/download/v${STEPVER}/step-cli-${STEPVER}-1.$(uname -i).rpm && \
dnf localinstall -y https://github.com/smallstep/certificates/releases/download/v${STEPCAVER}/step-ca-${STEPCAVER}-1.$(uname -i).rpm && \
dnf localinstall -y /root/rpmbuild/RPMS/*/*.rpm dnf localinstall -y /root/rpmbuild/RPMS/*/*.rpm
FROM docker.io/library/ubuntu:latest AS deb-builder FROM docker.io/library/ubuntu:latest AS deb-builder
ARG STEPVER ARG STEPVER
ARG STEPCAVER
COPY --from=rpm-builder /root/rpmbuild/RPMS /root/rpmbuild/RPMS COPY --from=rpm-builder /root/rpmbuild/RPMS /root/rpmbuild/RPMS
@ -48,7 +73,9 @@ RUN \
RUN \ RUN \
curl -L -o step-cli.deb https://github.com/smallstep/cli/releases/download/v${STEPVER}/step-cli_${STEPVER}-1_$(dpkg --print-architecture).deb && \ curl -L -o step-cli.deb https://github.com/smallstep/cli/releases/download/v${STEPVER}/step-cli_${STEPVER}-1_$(dpkg --print-architecture).deb && \
curl -L -o step-ca.deb https://github.com/smallstep/certificates/releases/download/v${STEPCAVER}/step-ca_${STEPCAVER}-1_$(dpkg --print-architecture).deb && \
apt-get install -y ./step-cli.deb && \ apt-get install -y ./step-cli.deb && \
apt-get install -y ./step-ca.deb && \
apt-get install -y /root/debbuild/*/*.deb apt-get install -y /root/debbuild/*/*.deb
FROM docker.io/library/nginx:latest FROM docker.io/library/nginx:latest

View File

@ -0,0 +1,46 @@
FROM docker.io/library/almalinux:9 AS rpm-builder9
WORKDIR /tmp
COPY RPMS /tmp/packages/RPMS
COPY DEBS /tmp/packages/DEBS
RUN \
dnf install -y createrepo_c && \
mkdir -p /tmp/packages/RPMS/x86_64/el9 && \
mkdir -p /tmp/packages/RPMS/aarch64/el9 && \
cd /tmp/packages/RPMS/x86_64 && \
createrepo -u https://spiffe.github.io/spire-examples/RPMS/x86_64 -o el9/ . && \
cd /tmp/packages/RPMS/aarch64 && \
createrepo -u https://spiffe.github.io/spire-examples/RPMS/aarch64 -o el9/ .
FROM docker.io/library/almalinux:10 AS rpm-builder10
WORKDIR /tmp
COPY RPMS /tmp/packages/RPMS
RUN \
dnf install -y createrepo_c && \
mkdir -p /tmp/packages/RPMS/x86_64/el10 && \
mkdir -p /tmp/packages/RPMS/aarch64/el10 && \
cd /tmp/packages/RPMS/x86_64 && \
createrepo -u https://spiffe.github.io/spire-examples/RPMS/x86_64 -o el10/ . && \
cd /tmp/packages/RPMS/aarch64 && \
createrepo -u https://spiffe.github.io/spire-examples/RPMS/aarch64 -o el10/ .
FROM docker.io/library/almalinux:8 AS rpm-builder8
WORKDIR /tmp
COPY RPMS /tmp/packages/RPMS
RUN \
dnf install -y createrepo_c && \
mkdir -p /tmp/packages/RPMS/x86_64/el8 && \
mkdir -p /tmp/packages/RPMS/aarch64/el8 && \
cd /tmp/packages/RPMS/x86_64 && \
createrepo -u https://spiffe.github.io/spire-examples/RPMS/x86_64 -o el8/ . && \
cd /tmp/packages/RPMS/aarch64 && \
createrepo -u https://spiffe.github.io/spire-examples/RPMS/aarch64 -o el8/ .
FROM docker.io/library/nginx:latest
RUN rm -rf /usr/share/nginx/html/*
COPY --from=rpm-builder9 /tmp/packages/RPMS /usr/share/nginx/html/RPMS
COPY --from=rpm-builder9 /tmp/packages/DEBS /usr/share/nginx/html/DEBS
COPY --from=rpm-builder10 /tmp/packages/RPMS/x86_64/el10 /usr/share/nginx/html/RPMS/x86_64/el10
COPY --from=rpm-builder10 /tmp/packages/RPMS/aarch64/el10 /usr/share/nginx/html/RPMS/aarch64/el10
COPY --from=rpm-builder8 /tmp/packages/RPMS/x86_64/el8 /usr/share/nginx/html/RPMS/x86_64/el8
COPY --from=rpm-builder8 /tmp/packages/RPMS/aarch64/el8 /usr/share/nginx/html/RPMS/aarch64/el8

View File

@ -0,0 +1,54 @@
##############################################################################
#
# To you, dear reader:
#
# If you are a normal user, we recommend not reading further. Its probably not
# the file your looking for.
#
# If you are looking at using this file as a base for your own work, please
# don't. It is a horrible example. Please look elsewhere.
#
# If you are a package maintainer, please read on. We recognize this spec file
# is blasphemous, a terrible abomination, a crime against nature, and more. We
# regret needing to produce it, but had to in order to attract enough users to
# find you. We beseech thee, kind and generous package maintainer, please help
# us mend our wicked ways by joining us and help us produce proper packaging.
# You are our only hope.
#
##############################################################################
%define ARCH %(echo %{_arch} | sed s/aarch64/arm64/)
Summary: AWS SPIFFE Workload Helper
Name: aws-spiffe-workload-helper
Version: 0.0.4
Release: 1
Group: Applications/Internet
License: Apache-2.0
URL: https://spiffe.io
Source0: https://github.com/spiffe/aws-spiffe-workload-helper/releases/download/v%{version}/aws-spiffe-workload-helper_Linux_%{ARCH}.tar.gz
%global __strip /bin/true
%description
AWS SPIFFE Workload Helper
%global _missing_build_ids_terminate_build 0
%global debug_package %{nil}
%prep
%setup -c
%build
%install
mkdir -p "%{buildroot}/usr/bin"
cp -a aws-spiffe-workload-helper %{buildroot}/usr/bin
%clean
rm -rf %{buildroot}
%files
/usr/bin/aws-spiffe-workload-helper

View File

@ -19,9 +19,9 @@
%define ARCH %(echo %{_arch} | sed s/aarch64/arm64/) %define ARCH %(echo %{_arch} | sed s/aarch64/arm64/)
Summary: K8s SPIFFE Workload Auth Config Summary: Kubernetes SPIFFE Workload Auth Config
Name: k8s-spiffe-workload-auth-config Name: k8s-spiffe-workload-auth-config
Version: 0.0.8 Version: 0.2.1
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
@ -29,8 +29,22 @@ URL: https://spiffe.io
Source0: https://github.com/spiffe/k8s-spiffe-workload-auth-config/releases/download/v%{version}/k8s-spiffe-workload-auth-config_Linux_%{ARCH}.tar.gz Source0: https://github.com/spiffe/k8s-spiffe-workload-auth-config/releases/download/v%{version}/k8s-spiffe-workload-auth-config_Linux_%{ARCH}.tar.gz
Requires: spiffe-helper Requires: spiffe-helper
%global __strip /bin/true
%description %description
K8s SPIFFE Workload Auth Config Kubernetes SPIFFE Workload Auth Config
%package -n k8s-spiffe-oidc-discovery-provider
Summary: Kubernetes SPIFFE OIDC Discovery Provider
Requires: spiffe-helper spiffe-oidc-discovery-provider
%description -n k8s-spiffe-oidc-discovery-provider
Kubernetes SPIFFE OIDC Discovery Provider
%package -n k8s-spire-agent
Summary: Kubernetes SPIRE Agent
Requires: spiffe-helper
%description -n k8s-spire-agent
Kubernetes SPIRE Agent
%global _missing_build_ids_terminate_build 0 %global _missing_build_ids_terminate_build 0
%global debug_package %{nil} %global debug_package %{nil}
@ -46,10 +60,15 @@ mkdir -p "%{buildroot}/usr/bin"
mkdir -p "%{buildroot}/etc/spiffe" mkdir -p "%{buildroot}/etc/spiffe"
mkdir -p "%{buildroot}/etc/kubernetes" mkdir -p "%{buildroot}/etc/kubernetes"
mkdir -p "%{buildroot}/usr/lib/systemd/system" mkdir -p "%{buildroot}/usr/lib/systemd/system"
mkdir -p "%{buildroot}/usr/libexec/spiffe/k8s-oidc-discovery-provider"
cp -a k8s-spiffe-workload-auth-config %{buildroot}/usr/bin cp -a k8s-spiffe-workload-auth-config %{buildroot}/usr/bin
cp -a config/k8s-spiffe-workload-auth-config.env %{buildroot}/etc/spiffe cp -a config/k8s-spiffe-workload-auth-config.env %{buildroot}/etc/spiffe/k8s-workload-auth-config.env
cp -a config/auth-config.yaml %{buildroot}/etc/kubernetes/ cp -a config/auth-config.yaml %{buildroot}/etc/kubernetes/
cp -a config/k8s-spiffe-oidc-discovery-provider-helper.conf %{buildroot}/usr/libexec/spiffe/k8s-oidc-discovery-provider/helper.conf
cp -a config/k8s-spiffe-oidc-discovery-provider.conf %{buildroot}/etc/spiffe/k8s-oidc-discovery-provider.conf
cp -a systemd/k8s-spiffe-workload-auth-config.service %{buildroot}/usr/lib/systemd/system cp -a systemd/k8s-spiffe-workload-auth-config.service %{buildroot}/usr/lib/systemd/system
cp -a systemd/k8s-spiffe-oidc-discovery-provider.service %{buildroot}/usr/lib/systemd/system
cp -a systemd/k8s-spire-agent@.service %{buildroot}/usr/lib/systemd/system
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -57,5 +76,13 @@ rm -rf %{buildroot}
%files %files
/usr/bin/k8s-spiffe-workload-auth-config /usr/bin/k8s-spiffe-workload-auth-config
/usr/lib/systemd/system/k8s-spiffe-workload-auth-config.service /usr/lib/systemd/system/k8s-spiffe-workload-auth-config.service
%config(noreplace) /etc/spiffe/k8s-spiffe-workload-auth-config.env %config(noreplace) /etc/spiffe/k8s-workload-auth-config.env
%config(noreplace) /etc/kubernetes/auth-config.yaml %config(noreplace) /etc/kubernetes/auth-config.yaml
%files -n k8s-spiffe-oidc-discovery-provider
/usr/lib/systemd/system/k8s-spiffe-oidc-discovery-provider.service
/usr/libexec/spiffe/k8s-oidc-discovery-provider/helper.conf
%config(noreplace) /etc/spiffe/k8s-oidc-discovery-provider.conf
%files -n k8s-spire-agent
/usr/lib/systemd/system/k8s-spire-agent@.service

View File

@ -21,13 +21,15 @@
Summary: K8s SPIFFE Workload JWT Exec Auth Plugin Summary: K8s SPIFFE Workload JWT Exec Auth Plugin
Name: k8s-spiffe-workload-jwt-exec-auth Name: k8s-spiffe-workload-jwt-exec-auth
Version: 0.0.4 Version: 0.0.7
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
URL: https://spiffe.io URL: https://spiffe.io
Source0: https://github.com/spiffe/k8s-spiffe-workload-jwt-exec-auth/releases/download/v%{version}/k8s-spiffe-workload-jwt-exec-auth_Linux_%{ARCH}.tar.gz Source0: https://github.com/spiffe/k8s-spiffe-workload-jwt-exec-auth/releases/download/v%{version}/k8s-spiffe-workload-jwt-exec-auth_Linux_%{ARCH}.tar.gz
%global __strip /bin/true
%description %description
K8s SPIFFE Workload JWT Exec Auth Plugin K8s SPIFFE Workload JWT Exec Auth Plugin

51
examples/rpms/rpm.pub Normal file
View File

@ -0,0 +1,51 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGefjVIBEACpBWcQ51kffvULrryaeZNNnOEBzQdEEwoV85YVzTaugzbIYZlh
csF8IpBbEKAclVBbnT27HVdop+OtRJ2qMIxnCc+onWNZwnXDacKzzKOzj4cfZVhM
LecdmPI6vJWJIyF/nnkh5/x+7e7RWAG/+4dxfMKOGQN6ReUFWDpQQxf3XqRYdlV/
/KE25gFqBmn9aoG2C3KjlT6m2cKWySMEGFRkSBDXiY5OaQ99+AJJ0Qhe4t4lcm2Q
e5ow7Y7UbmSHf2Kj9DF8heJQNJWqC8SbdWmBzyxQ9cbTnC3xN7vo1PQgfXZ9xEkI
BZhF4YCen2vbpKuUPRbVXEnOPlehwAAeHLeqm0Au4GIF367rULi6/WR1L1ohFAc/
/55byXoSJX3tvLK3QE546yC1VzGubt0Mb2lHeYlEuuNF+QKxIjSkHg5qoyk40JvB
greij5TBcXSGAYNzTwfm5CgxZmmtcoSSGUR/Gcg7wDSc/FDa2hJ4Aczh5Yn6b2h4
A4dgR7u3tu1z0CVJsPbV70nrjbLK4F/PMiPouyG4STowiCOfz2G+pjsZpqIGENPp
9xkUUt+T4bu4s+0TulLmcZ/evMsYrGVvqBRAf+joJZM9h6/RSOq9y2QHZCTBC0Kd
njxISJ3T/AEA7lWKHt1xE8rdhSKoJeBBUTRLRCVCGivY8YdToT0/sbJvGwARAQAB
tBdTUElSRS1FWEFNUExFUyBQYWNrYWdlc4kCUgQTAQgAPBYhBOCDvv82eL8HHATG
AdNMNfirI2ZFBQJnn41SAhsDBQsJCAcCAyICAQYVCgkICwIEFgIDAQIeBwIXgAAK
CRDTTDX4qyNmRUh6D/43aSnn5beKm26L/rHxMV+rwGu4i7lwSY6jNXvaZueuGpBt
IUiZbD4JFLHO2mCNvq3gbCVlOCT19qBFotQeJBbIXpK0ChMhupXrQQKOSj1qMbIb
lX5c7LPRb08SmMKXsC2pgy8FvdtZb3VVn94UgU4mP13EWcMAztOXAXd9C+QjhsI4
rvv+m1CKnL16/wFpy+gdIJK6K4r7O5UVyM+rOhQArswbfLdOGMxspsR7OLzqghJ4
9IHWHAB+nNsXDgc2yb4OQi80zMf4n5iSuyu4hUTOBwScWamiFyOfvbVKFDwmNUCd
QlO0wwsh7xflXSpi9nHNrCfKWkt7xyKt49gkz905NNaKZBeBtwR6FZ8rN4dDSSbU
ybxamRLLD61WuEGGvCFwkUEUtCAPRYKLDaHnJGK7FNHwhfvyL4D4puWOkIeZYmqS
UbuScNvnRGuYm/ursT6Wh2SkvN/j8oYjf8IP2VUkglbPMeW+gfa1pNrwtg3Ig4Yp
Y+0JwCW5b4ZubupdReTG0uixWWxsTyasnutC0vIY99nto/A+RY2evlbwdwATMDce
sdNVPh3IWOsGO1pd83xJyU8aIU+BiVJZ4lgCHIBO1mKmAyjjmWG6XhhqErkcR2A/
gTwtQe0NuVeA8TYWigQ3gfHXfvVPL/7I45InDuUSHa+Dqa1sldjkEQSEMNMhSbkC
DQRnn41SARAA1uHjcC8y+45h8HV6OHugHbRYKkVUXfROBUpCyQ6JQw0cj7sSdRXY
XGW6Gk485v/PCKm2KdGleNCZAi/nrFnUcqO8enu3jU5fb0A/4PbmfTco08LuP6iw
6dxoSKmALj15sVLw+4rPz3QmdS9op/WimDQ84UTJwCZMUV9knCudhAM4tuVrDfxn
f8OjstOqkjGCY2jaey2hVKu7lUCBQ1r03kLqvPd99my4B+StcnTFmZTR3bNFUsGz
dbHJzStj+fa1omu2Lqh8DCfvAyvHnM43v0s0+FMph9hhgK189bMwUX96QfH3/hr1
07/G8s5PSxaoIQxMNwlIMwFVS683earb0l5DLbWbUFK9/HKrssurwITCbWAPh5z2
wju0VewGXYgAX6+qr4xLUCB/R058Z9px5p4V/+yBWmQzhFgCaORnU1B3R+tapUcD
LhC8khM7sHRL40pToOqPCjPg8YiD16sppeZts2ndLbAatSLtFtgHzYH9+C4GWatM
SYpzmvqNBPYTfq8tVjTWi/R74GgfFHAAguSQyFnG/JhAeVyMWUb0QiYo/ihjjjGZ
u5DxTkd3MgYuy8XRJ4RY1Mw4U4A2z1zTvn3MS/97d0VheJXdDRBts9RpZa7EGmsA
KezlkJ001qCZRn46E4V8u4O6PehgcemClvYpCJjWBt95avAgcheZV8EAEQEAAYkC
NgQYAQgAIBYhBOCDvv82eL8HHATGAdNMNfirI2ZFBQJnn41SAhsMAAoJENNMNfir
I2ZFVFgP/1wc9HbFGfDY9xXIWlZ+Xp02llgJuv3EEvXRV+bsr7baylGzpnzyT+/x
/WAxW+RFp6NiSqxg3QX7NKSDuxYwMcwJO0Gek9k5JmUW2m4f0JGjZUuX+EBG8nlr
YT+ZpObb/pqidbNS0rFR7Nltfs0wM+/a583T/1Iy+7C2DNgP64lProI6ugEVVEhy
SpqTLrm1mGq3cC6Nrd0pO572QiR7IVmaW0LwzWSscHL2c+wyE1ebutxX3uiopy7U
swqww40YphYprZXDYF94mnVUrRBVTeytQ7RvS1MFZkkhYP5I3IKMt1nCaDL6IPAu
alh+CUpQYCjjVPJGBIT+fnLvyiJpHk4xKwVBpN4l4i+rzzWfavEitEQTQPao8h11
ftwgfkqAwhfVqgQLJXeZcST6OoMI8N8TTX1NPepbQPrmiLv1Trs44KtwpW9X4amu
neYNfZjfU7Q0WM64yXKKvZAC2hQOXgkyufe6iQ/rNHsXMwq98f/Q7XElCt1OYS4x
TxwtxbI6AoQm/JxhsI99hA+s/YCWTvwMplqNGDEF9t7DGPv+27qnN4L79miST3lv
kwXmlnDER7rjJRv7bP5x+80/ZGybyzfMCOluE0SAXQbYoXTYISr430YVI2yQ1/47
1402Cky2VgHj+fmI1lHqsz/xLESk5gUG4AKTr0HBPd6AOQ7dGW0u
=mnaT
-----END PGP PUBLIC KEY BLOCK-----

3
examples/rpms/rpmmacros Normal file
View File

@ -0,0 +1,3 @@
%_signature gpg
%_gpg_name SPIRE-EXAMPLES Packages
%_gpgbin /usr/bin/gpg

View File

@ -21,13 +21,14 @@
Summary: SPIFFE Helper Summary: SPIFFE Helper
Name: spiffe-helper Name: spiffe-helper
Version: 0.9.0 Version: 0.10.0
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
URL: https://spiffe.io URL: https://spiffe.io
#FIXME grab binaries once they are available Source0: https://github.com/spiffe/spiffe-helper/releases/download/v%{version}/spiffe-helper_v%{version}_Linux-%{ARCH}.tar.gz
Source0: https://github.com/spiffe/spiffe-helper/archive/refs/tags/v%{version}.tar.gz
%global __strip /bin/true
%description %description
SPIFFE Helper SPIFFE Helper
@ -40,12 +41,10 @@ SPIFFE Helper
%setup -c %setup -c
%build %build
cd spiffe-helper-%{version}
make
%install %install
mkdir -p %{buildroot}/usr/bin mkdir -p %{buildroot}/usr/bin
cp spiffe-helper-%{version}/spiffe-helper %{buildroot}/usr/bin cp spiffe-helper %{buildroot}/usr/bin
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}

View File

@ -21,7 +21,7 @@
Summary: SPIFFE Step SSH Summary: SPIFFE Step SSH
Name: spiffe-step-ssh Name: spiffe-step-ssh
Version: 0.0.5 Version: 0.0.9
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
@ -30,9 +30,18 @@ Source0: https://github.com/spiffe/spiffe-step-ssh/archive/refs/tags/v%{versi
Requires: step-cli Requires: step-cli
Requires: spiffe-helper Requires: spiffe-helper
%global __strip /bin/true
%description %description
SPIFFE Step SSH SPIFFE Step SSH
%package -n spiffe-step-ssh-server
Summary: SPIFFE Step SSH Server
Requires: step-ca
Requires: spiffe-helper
%description -n spiffe-step-ssh-server
SPIFFE Step SSH Server
%global _missing_build_ids_terminate_build 0 %global _missing_build_ids_terminate_build 0
%global debug_package %{nil} %global debug_package %{nil}
@ -45,6 +54,7 @@ SPIFFE Step SSH
%install %install
cd spiffe-step-ssh-%{version} cd spiffe-step-ssh-%{version}
make install DESTDIR="%{buildroot}" make install DESTDIR="%{buildroot}"
make install-server DESTDIR="%{buildroot}"
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -55,3 +65,14 @@ rm -rf %{buildroot}
/usr/lib/systemd/system/spiffe-step-ssh@.service /usr/lib/systemd/system/spiffe-step-ssh@.service
/usr/lib/systemd/system/spiffe-step-ssh-cleanup.service /usr/lib/systemd/system/spiffe-step-ssh-cleanup.service
%config(noreplace) /etc/spiffe/step-ssh %config(noreplace) /etc/spiffe/step-ssh
%files -n spiffe-step-ssh-server
/usr/lib/systemd/system/spiffe-step-ssh-server@.service
/usr/lib/systemd/system/spiffe-step-ssh-fetchca@.service
/usr/libexec/spiffe/step-ssh-server/main
/usr/libexec/spiffe/step-ssh-server/ssh_x5c.tpl
/usr/libexec/spiffe/step-ssh-server/nginx-fetchca.conf
/usr/libexec/spiffe/step-ssh-server/helper-fetchca.conf
/usr/sbin/setup-spiffe-step-ssh-server
/usr/sbin/spiffe-step-ssh-get-cert-authority
%config(noreplace) /etc/spiffe/step-ssh-server

View File

@ -21,16 +21,18 @@
Summary: SPIRE Agent Node Attestor TPM Direct Summary: SPIRE Agent Node Attestor TPM Direct
Name: spire-agent-nodeattestor-tpmdirect Name: spire-agent-nodeattestor-tpmdirect
Version: 1.8.7 Version: 1.9.0
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
URL: https://spiffe.io URL: https://spiffe.io
Source0: https://github.com/boxboat/spire-tpm-plugin/releases/download/v%{version}/spire_tpm_plugin_tpm_attestor_agent_linux_%{ARCH}_v%{version}.tar.gz Source0: https://github.com/spiffe/spire-tpm-plugin/releases/download/v%{version}/spire_tpm_plugin_tpm_attestor_agent_linux_%{ARCH}_v%{version}.tar.gz
Source1: https://github.com/boxboat/spire-tpm-plugin/releases/download/v%{version}/spire_tpm_plugin_get_tpm_pubhash_linux_%{ARCH}_v%{version}.tar.gz Source1: https://github.com/spiffe/spire-tpm-plugin/releases/download/v%{version}/spire_tpm_plugin_get_tpm_pubhash_linux_%{ARCH}_v%{version}.tar.gz
%global __strip /bin/true
%description %description
K8s SPIFFE Workload JWT Exec Auth Plugin SPIRE Agent Node Attestor TPM Direct
%global _missing_build_ids_terminate_build 0 %global _missing_build_ids_terminate_build 0
%global debug_package %{nil} %global debug_package %{nil}

View File

@ -0,0 +1,74 @@
##############################################################################
#
# To you, dear reader:
#
# If you are a normal user, we recommend not reading further. Its probably not
# the file your looking for.
#
# If you are looking at using this file as a base for your own work, please
# don't. It is a horrible example. Please look elsewhere.
#
# If you are a package maintainer, please read on. We recognize this spec file
# is blasphemous, a terrible abomination, a crime against nature, and more. We
# regret needing to produce it, but had to in order to attract enough users to
# find you. We beseech thee, kind and generous package maintainer, please help
# us mend our wicked ways by joining us and help us produce proper packaging.
# You are our only hope.
#
##############################################################################
%define ARCH %(echo %{_arch} | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
Summary: SPIRE Controller Manager
Name: spire-controller-manager
Version: 0.6.2
Release: 1
Group: Applications/Internet
License: Apache-2.0
URL: https://spiffe.io
Requires: spire-common
#FIXME Switch to binaries once released
Source0: https://github.com/spiffe/spire-controller-manager/archive/refs/tags/v%{version}.tar.gz
Source1: spire-extras-systemd.tar.gz
%global __strip /bin/true
%description
SPIRE Controller Manager
%global _missing_build_ids_terminate_build 0
%global debug_package %{nil}
%prep
%setup
%setup -T -D -a 1
%build
curl -L -o go.tar.gz https://go.dev/dl/go1.24.2.linux-%{ARCH}.tar.gz
tar -xvf go.tar.gz
export PATH=$PATH:$(pwd)/go/bin
export CGO_ENABLED=0
go build -o spire-controller-manager cmd/main.go
%install
mkdir -p %{buildroot}/usr/bin
cp spire-controller-manager %{buildroot}/usr/bin
cd systemd
make install DESTDIR="%{buildroot}"
rm -f "%{buildroot}/etc/spiffe/default-trust-domain.env"
rm -f "%{buildroot}/etc/spire/agent/default".*
rm -f "%{buildroot}/etc/spire/server/default".*
rm -f "%{buildroot}/usr/lib/systemd/system/spire-agent"*
rm -f "%{buildroot}/usr/lib/systemd/system/spire-server"*
rm -f "%{buildroot}/usr/lib/systemd/system/spire.target"
rm -f "%{buildroot}/usr/libexec/spire/server/start.sh"
%clean
rm -rf %{buildroot}
%files
/usr/lib/systemd/system/spire-controller-manager@.service
/usr/bin/spire-controller-manager
/usr/libexec/spire/controller-manager/start.sh
%config(noreplace) /etc/spire/controller-manager/default.conf

View File

@ -0,0 +1,53 @@
##############################################################################
#
# To you, dear reader:
#
# If you are a normal user, we recommend not reading further. Its probably not
# the file your looking for.
#
# If you are looking at using this file as a base for your own work, please
# don't. It is a horrible example. Please look elsewhere.
#
# If you are a package maintainer, please read on. We recognize this spec file
# is blasphemous, a terrible abomination, a crime against nature, and more. We
# regret needing to produce it, but had to in order to attract enough users to
# find you. We beseech thee, kind and generous package maintainer, please help
# us mend our wicked ways by joining us and help us produce proper packaging.
# You are our only hope.
#
##############################################################################
%define ARCH %(echo %{_arch} | sed s/aarch64/arm64/)
Summary: SPIRE Credential Composer CEL
Name: spire-credentialcomposer-cel
Version: 0.0.2
Release: 1
Group: Applications/Internet
License: Apache-2.0
URL: https://spiffe.io
Source0: https://github.com/spiffe/spire-credentialcomposer-cel/releases/download/v%{version}/spire-credentialcomposer-cel_Linux_%{ARCH}.tar.gz
%global __strip /bin/true
%description
SPIRE Credential Composer CEL
%global _missing_build_ids_terminate_build 0
%global debug_package %{nil}
%prep
%setup -c
%build
%install
mkdir -p "%{buildroot}/usr/libexec/spire/plugins"
cp -a spire-credentialcomposer-cel %{buildroot}/usr/libexec/spire/plugins/credentialcomposer-cel
%clean
rm -rf %{buildroot}
%files
/usr/libexec/spire/plugins/credentialcomposer-cel

View File

@ -0,0 +1,5 @@
[spire-examples]
name=spire-examples rpms
baseurl=https://spiffe.github.io/spire-examples/RPMS/$basearch/el$releasever
enabled=1
gpgcheck=0

View File

@ -21,7 +21,7 @@
Summary: SPIRE HA Agent Summary: SPIRE HA Agent
Name: spire-ha-agent Name: spire-ha-agent
Version: 0.0.11 Version: 0.0.13
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
@ -29,6 +29,8 @@ URL: https://spiffe.io
Source0: https://github.com/spiffe/spire-ha-agent/releases/download/v%{version}/spire-ha-agent_Linux_%{ARCH}.tar.gz Source0: https://github.com/spiffe/spire-ha-agent/releases/download/v%{version}/spire-ha-agent_Linux_%{ARCH}.tar.gz
Source1: https://github.com/spiffe/spire-ha-agent/releases/download/v%{version}/spire-trust-sync-helper_Linux_%{ARCH}.tar.gz Source1: https://github.com/spiffe/spire-ha-agent/releases/download/v%{version}/spire-trust-sync-helper_Linux_%{ARCH}.tar.gz
%global __strip /bin/true
%description %description
SPIRE HA Agent SPIRE HA Agent

View File

@ -0,0 +1,101 @@
##############################################################################
#
# To you, dear reader:
#
# If you are a normal user, we recommend not reading further. Its probably not
# the file your looking for.
#
# If you are looking at using this file as a base for your own work, please
# don't. It is a horrible example. Please look elsewhere.
#
# If you are a package maintainer, please read on. We recognize this spec file
# is blasphemous, a terrible abomination, a crime against nature, and more. We
# regret needing to produce it, but had to in order to attract enough users to
# find you. We beseech thee, kind and generous package maintainer, please help
# us mend our wicked ways by joining us and help us produce proper packaging.
# You are our only hope.
#
##############################################################################
%define ARCH %(echo %{_arch} | sed s/aarch64/arm64/)
Summary: SPIRE Server Attestor TPM Sign
Name: spire-server-attestor-tpm-sign
Version: 0.0.4
Release: 1
Group: Applications/Internet
License: Apache-2.0
URL: https://spiffe.io
Source0: https://github.com/spiffe/spire-server-attestor-tpm/releases/download/v%{version}/spire-server-attestor-tpm-sign_Linux_%{ARCH}.tar.gz
Source1: https://github.com/spiffe/spire-server-attestor-tpm/releases/download/v%{version}/spire-server-attestor-tpm-signer-http_Linux_%{ARCH}.tar.gz
Source2: https://github.com/spiffe/spire-server-attestor-tpm/releases/download/v%{version}/spire-server-attestor-tpm-signer-unix_Linux_%{ARCH}.tar.gz
Source3: https://github.com/spiffe/spire-server-attestor-tpm/releases/download/v%{version}/spire-server-attestor-tpm-verifier_Linux_%{ARCH}.tar.gz
%global __strip /bin/true
%description
SPIRE Server Attestor TPM Sign
%package -n spire-server-attestor-tpm-signer-http
Summary: SPIRE Server Attestor TPM Signer HTTP service
Requires: spire-server-attestor-tpm-signer-unix
%description -n spire-server-attestor-tpm-signer-http
SPIRE Server Attestor TPM Signer HTTP service
%package -n spire-server-attestor-tpm-signer-unix
Summary: SPIRE Server Attestor TPM Signer Unix service
%description -n spire-server-attestor-tpm-signer-unix
SPIRE Server Attestor TPM Signer Unix service
%package -n spire-server-attestor-tpm-verifier
Summary: SPIRE Server Attestor TPM Verifier service
%description -n spire-server-attestor-tpm-verifier
SPIRE Server Attestor TPM Verifier service
%global _missing_build_ids_terminate_build 0
%global debug_package %{nil}
%prep
%setup -c
%setup -T -D -a 1
%setup -T -D -a 2
%setup -T -D -a 3
%build
%install
mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}/usr/lib/systemd/system
mkdir -p %{buildroot}/etc/spire/server-attestor-tpm
cp -a spire-server-attestor-tpm-sign %{buildroot}/usr/bin
cp -a spire-server-attestor-tpm-signer-http %{buildroot}/usr/bin
cp -a spire-server-attestor-tpm-signer-unix %{buildroot}/usr/bin
cp -a spire-server-attestor-tpm-verifier %{buildroot}/usr/bin
cp -a systemd/spire-server-attestor-tpm-signer-http.service %{buildroot}/usr/lib/systemd/system
cp -a systemd/spire-server-attestor-tpm-signer-unix.service %{buildroot}/usr/lib/systemd/system
cp -a systemd/spire-server-attestor-tpm-verifier.service %{buildroot}/usr/lib/systemd/system
cp -a conf/signer-http.conf %{buildroot}/etc/spire/server-attestor-tpm/
cp -a conf/signer-unix.conf %{buildroot}/etc/spire/server-attestor-tpm/
cp -a conf/verifier.conf %{buildroot}/etc/spire/server-attestor-tpm/
%clean
rm -rf %{buildroot}
%files
/usr/bin/spire-server-attestor-tpm-sign
%files -n spire-server-attestor-tpm-signer-http
/usr/bin/spire-server-attestor-tpm-signer-http
/usr/lib/systemd/system/spire-server-attestor-tpm-signer-http.service
%config(noreplace) /etc/spire/server-attestor-tpm/signer-http.conf
%files -n spire-server-attestor-tpm-signer-unix
/usr/bin/spire-server-attestor-tpm-signer-unix
/usr/lib/systemd/system/spire-server-attestor-tpm-signer-unix.service
%config(noreplace) /etc/spire/server-attestor-tpm/signer-unix.conf
%files -n spire-server-attestor-tpm-verifier
/usr/bin/spire-server-attestor-tpm-verifier
/usr/lib/systemd/system/spire-server-attestor-tpm-verifier.service
%config(noreplace) /etc/spire/server-attestor-tpm/verifier.conf

View File

@ -21,15 +21,17 @@
Summary: SPIRE Server Node Attestor TPM Direct Summary: SPIRE Server Node Attestor TPM Direct
Name: spire-server-nodeattestor-tpmdirect Name: spire-server-nodeattestor-tpmdirect
Version: 1.8.7 Version: 1.9.0
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
URL: https://spiffe.io URL: https://spiffe.io
Source0: https://github.com/boxboat/spire-tpm-plugin/releases/download/v%{version}/spire_tpm_plugin_tpm_attestor_server_linux_%{ARCH}_v%{version}.tar.gz Source0: https://github.com/spiffe/spire-tpm-plugin/releases/download/v%{version}/spire_tpm_plugin_tpm_attestor_server_linux_%{ARCH}_v%{version}.tar.gz
%global __strip /bin/true
%description %description
K8s SPIFFE Workload JWT Exec Auth Plugin SPIRE Server Node Attestor TPM Direct
%global _missing_build_ids_terminate_build 0 %global _missing_build_ids_terminate_build 0
%global debug_package %{nil} %global debug_package %{nil}

View File

@ -21,13 +21,16 @@
Summary: SPIRE components Summary: SPIRE components
Name: spire-common Name: spire-common
Version: 1.11.1 Version: 1.12.4
Release: 1 Release: 1
Group: Applications/Internet Group: Applications/Internet
License: Apache-2.0 License: Apache-2.0
URL: https://spiffe.io URL: https://spiffe.io
Source0: https://github.com/spiffe/spire/releases/download/v%{version}/spire-%{version}-linux-%{ARCH}-musl.tar.gz Source0: https://github.com/spiffe/spire/releases/download/v%{version}/spire-%{version}-linux-%{ARCH}-musl.tar.gz
Source1: https://github.com/spiffe/spire/releases/download/v%{version}/spire-extras-%{version}-linux-%{ARCH}-musl.tar.gz Source1: https://github.com/spiffe/spire/releases/download/v%{version}/spire-extras-%{version}-linux-%{ARCH}-musl.tar.gz
Source2: spire-extras-systemd.tar.gz
%global __strip /bin/true
%description %description
SPIRE Common SPIRE Common
@ -79,6 +82,7 @@ SPIFFE OIDC Discovery Provider
%setup -c %setup -c
%setup -T -D -a 1 %setup -T -D -a 1
%setup -T -D -a 2
%build %build
@ -87,10 +91,11 @@ SPIFFE OIDC Discovery Provider
mkdir -p "%{buildroot}/bin" mkdir -p "%{buildroot}/bin"
cp "spire-%{version}"/bin/* "%{buildroot}/bin" cp "spire-%{version}"/bin/* "%{buildroot}/bin"
cp "spire-extras-%{version}"/bin/oidc-discovery-provider "%{buildroot}/bin/spiffe-oidc-discovery-provider" cp "spire-extras-%{version}"/bin/oidc-discovery-provider "%{buildroot}/bin/spiffe-oidc-discovery-provider"
git clone https://github.com/spiffe/spire-examples cd systemd
cd spire-examples
cd examples/systemd
make install DESTDIR="%{buildroot}" make install DESTDIR="%{buildroot}"
rm -f "%{buildroot}/etc/spire/controller-manager/default.conf"
rm -f "%{buildroot}/usr/lib/systemd/system/spire-controller-manager@.service"
rm -f "%{buildroot}/usr/libexec/spire/controller-manager/start.sh"
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -102,7 +107,9 @@ rm -rf %{buildroot}
%files -n spire-server %files -n spire-server
/usr/lib/systemd/system/spire-server@.service /usr/lib/systemd/system/spire-server@.service
/bin/spire-server /bin/spire-server
/usr/libexec/spire/server/start.sh
%config(noreplace) /etc/spire/server/default.conf %config(noreplace) /etc/spire/server/default.conf
%config(noreplace) /etc/spire/server/default.env
%files -n spire-agent %files -n spire-agent
/usr/lib/systemd/system/spire-agent@.service /usr/lib/systemd/system/spire-agent@.service

View File

@ -4,7 +4,13 @@ default:
install: install:
mkdir -p $(DESTDIR)/usr/lib/systemd/system/ mkdir -p $(DESTDIR)/usr/lib/systemd/system/
mkdir -p $(DESTDIR)/usr/libexec/spire/server/
mkdir -p $(DESTDIR)/usr/libexec/spire/controller-manager/
install scripts/server/start.sh $(DESTDIR)/usr/libexec/spire/server/
install scripts/controller-manager/start.sh $(DESTDIR)/usr/libexec/spire/controller-manager/
install system/* $(DESTDIR)/usr/lib/systemd/system/ install system/* $(DESTDIR)/usr/lib/systemd/system/
([ ! -f $(DESTDIR)/etc/spire/agent/default.conf ] && mkdir -p $(DESTDIR)/etc/spire/agent && install conf/agent/default.conf $(DESTDIR)/etc/spire/agent/default.conf) || true ([ ! -f $(DESTDIR)/etc/spire/agent/default.conf ] && mkdir -p $(DESTDIR)/etc/spire/agent && install conf/agent/default.conf $(DESTDIR)/etc/spire/agent/default.conf) || true
([ ! -f $(DESTDIR)/etc/spire/server/default.conf ] && mkdir -p $(DESTDIR)/etc/spire/server && install conf/server/default.conf $(DESTDIR)/etc/spire/server/default.conf) || true ([ ! -f $(DESTDIR)/etc/spire/server/default.conf ] && mkdir -p $(DESTDIR)/etc/spire/server && install conf/server/default.conf $(DESTDIR)/etc/spire/server/default.conf) || true
([ ! -f $(DESTDIR)/etc/spire/server/default.env ] && mkdir -p $(DESTDIR)/etc/spire/server && install conf/server/default.env $(DESTDIR)/etc/spire/server/default.env) || true
([ ! -f $(DESTDIR)/etc/spire/controller-manager/default.conf ] && mkdir -p $(DESTDIR)/etc/spire/controller-manager && install conf/controller-manager/default.conf $(DESTDIR)/etc/spire/controller-manager/default.conf) || true
([ ! -f $(DESTDIR)/etc/spiffe/default-trust-domain.env ] && mkdir -p $(DESTDIR)/etc/spiffe && install conf/spiffe/default-trust-domain.env $(DESTDIR)/etc/spiffe/default-trust-domain.env) || true ([ ! -f $(DESTDIR)/etc/spiffe/default-trust-domain.env ] && mkdir -p $(DESTDIR)/etc/spiffe && install conf/spiffe/default-trust-domain.env $(DESTDIR)/etc/spiffe/default-trust-domain.env) || true

View File

@ -0,0 +1,16 @@
apiVersion: spire.spiffe.io/v1alpha1
kind: ControllerManagerConfig
metadata:
name: config
metrics:
bindAddress: 0.0.0.0:9123
health:
healthProbeBindAddress: 0.0.0.0:9124
trustDomain: "${SPIFFE_TRUST_DOMAIN}"
entryIDPrefix: "scm-${INSTANCE}"
clusterName: "scm-${INSTANCE}"
clusterDomain: local
watchClassless: true
spireServerSocketPath: "/var/run/spire/server/sockets/${SYSTEMD_INSTANCE}/private/api.sock"
staticManifestPath: "/etc/spire/server/${SYSTEMD_INSTANCE}/manifests"
logLevel: info

View File

@ -1,9 +1,9 @@
server { server {
bind_address = "0.0.0.0" bind_address = "${SPIRE_BIND_ADDRESS}"
bind_port = "8081" bind_port = "${SPIRE_BIND_PORT}"
trust_domain = "${SPIFFE_TRUST_DOMAIN}" trust_domain = "${SPIFFE_TRUST_DOMAIN}"
jwt_issuer = "https://oidc-discovery-provider.${SPIFFE_TRUST_DOMAIN}" jwt_issuer = "https://oidc-discovery-provider.${SPIFFE_TRUST_DOMAIN}"
log_level = "DEBUG" log_level = "${SPIRE_LOG_LEVEL}"
ca_ttl = "168h" ca_ttl = "168h"
default_x509_svid_ttl = "48h" default_x509_svid_ttl = "48h"
} }

View File

@ -0,0 +1,3 @@
SPIRE_BIND_ADDRESS=0.0.0.0
SPIRE_BIND_PORT=8081
SPIRE_LOG_LEVEL=DEBUG

View File

@ -0,0 +1,17 @@
#!/bin/bash
# Set default variables
export INSTANCE="${INSTANCE:-${SYSTEMD_INSTANCE}}"
export SCM_CLASSNAME="${SCM_CLASSNAME:-scm-${SYSTEMD_INSTANCE}}"
export SCM_ENTRYID_PREFIX="${SCM_ENTRYID_PREFIX:-${SCM_CLASSNAME}}"
export SCM_CLUSTERNAME="${SCM_CLUSTERNAME:-${SCM_CLASSNAME}}"
mkdir -p "/var/lib/spire/controller-manager/${SYSTEMD_INSTANCE}"
if [ -f "/etc/spire/controller-manager/${SYSTEMD_INSTANCE}.conf" ]; then
cp -a "/etc/spire/controller-manager/${SYSTEMD_INSTANCE}.conf" "/var/lib/spire/controller-manager/${SYSTEMD_INSTANCE}/config"
else
cp -a /etc/spire/controller-manager/default.conf "/var/lib/spire/controller-manager/${SYSTEMD_INSTANCE}/config"
fi
/bin/spire-controller-manager -config "/var/lib/spire/controller-manager/${SYSTEMD_INSTANCE}/config" -expand-env

View File

@ -0,0 +1,18 @@
#!/bin/bash
# Set default variables
export INSTANCE="${INSTANCE:-${SYSTEMD_INSTANCE}}"
mkdir -p "/var/lib/spire/server/${SYSTEMD_INSTANCE}" "/run/spire/server/${SYSTEMD_INSTANCE}/private" "/etc/spire/server/${SYSTEMD_INSTANCE}/tpm-direct/certs" "/etc/spire/server/${SYSTEMD_INSTANCE}/tpm-direct/hashes"
if [ -f "/etc/spire/server/${SYSTEMD_INSTANCE}/config" ]; then
cp -a "/etc/spire/server/${SYSTEMD_INSTANCE}/config" "/var/lib/spire/server/${SYSTEMD_INSTANCE}/config"
else
if [ -f "/etc/spire/server/${SYSTEMD_INSTANCE}.conf" ]; then
cp -a "/etc/spire/server/${SYSTEMD_INSTANCE}.conf" "/var/lib/spire/server/${SYSTEMD_INSTANCE}/config"
else
cp -a "/etc/spire/server/default.conf" "/var/lib/spire/server/${SYSTEMD_INSTANCE}/config"
fi
fi
/bin/spire-server run -config "/var/lib/spire/server/${SYSTEMD_INSTANCE}/config" -dataDir "/var/lib/spire/server/${SYSTEMD_INSTANCE}" -socketPath "/run/spire/server/sockets/${SYSTEMD_INSTANCE}/private/api.sock" -expandEnv

View File

@ -0,0 +1,47 @@
[Unit]
Description=SPIRE Controller Manager Daemon %i
PartOf=spire-server.target
After=network-online.target local-fs.target time-sync.target
Before=remote-fs-pre.target
Wants=network-online.target local-fs.target time-sync.target remote-fs-pre.target spire-server.target
StartLimitIntervalSec=0
[Service]
WorkingDirectory=/var/lib/spire/controller-manager/%i
StateDirectory=spire/controller-manager/%i
RuntimeDirectory=spire/controller-manager/sockets/%i
RuntimeDirectoryPreserve=true
ConfigurationDirectory=spire/controller-manager
EnvironmentFile=-/etc/spiffe/default-trust-domain.env
EnvironmentFile=-/etc/spiffe/server/default.env
EnvironmentFile=-/etc/spire/server/%i.env
EnvironmentFile=-/etc/spire/server/%i/env
EnvironmentFile=-/etc/spire/controller-manager/%i.env
EnvironmentFile=-/etc/spire/server/%i/controller-manager.env
Environment=SYSTEMD_INSTANCE=%i
ExecStart=/usr/libexec/spire/controller-manager/start.sh
# https://gist.github.com/ageis/f5595e59b1cddb1513d1b425a323db04
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=false
# Needed by plugins
PrivateTmp=false
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=strict
ReadOnlyPaths=/
Restart=always
RestartSec=5s
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=true
RestrictRealtime=yes
RestrictSUIDSGID=yes
TasksMax=infinity
[Install]
WantedBy=spire-server.target

View File

@ -12,11 +12,11 @@ RuntimeDirectory=spire/server/sockets/%i
RuntimeDirectoryPreserve=true RuntimeDirectoryPreserve=true
ConfigurationDirectory=spire/server ConfigurationDirectory=spire/server
EnvironmentFile=-/etc/spiffe/default-trust-domain.env EnvironmentFile=-/etc/spiffe/default-trust-domain.env
EnvironmentFile=-/etc/spire/server/default.env
EnvironmentFile=-/etc/spire/server/%i.env EnvironmentFile=-/etc/spire/server/%i.env
Environment=INSTANCE=%i EnvironmentFile=-/etc/spire/server/%i/env
ExecStart=/bin/spire-server run -config /var/lib/spire/server/%i/config -dataDir /var/lib/spire/server/%i -socketPath /run/spire/server/sockets/%i/private/api.sock -expandEnv Environment=SYSTEMD_INSTANCE=%i
ExecStartPre=mkdir -p /var/lib/spire/server/%i /run/spire/server/%i/private /etc/spire/server/%i/tpm-direct/hashes ExecStart=/usr/libexec/spire/server/start.sh
ExecStartPre=/bin/bash -c "if [ -f /etc/spire/server/%i.conf ]; then cp -a /etc/spire/server/%i.conf /var/lib/spire/server/%i/config; else cp -a /etc/spire/server/default.conf /var/lib/spire/server/%i/config; fi"
# https://gist.github.com/ageis/f5595e59b1cddb1513d1b425a323db04 # https://gist.github.com/ageis/f5595e59b1cddb1513d1b425a323db04
LockPersonality=true LockPersonality=true
MemoryDenyWriteExecute=true MemoryDenyWriteExecute=true