Add SPIFFE workload identity examples with Vouch OIDC integration#42
Closed
jplock wants to merge 1 commit into
Closed
Add SPIFFE workload identity examples with Vouch OIDC integration#42jplock wants to merge 1 commit into
jplock wants to merge 1 commit into
Conversation
Four new examples demonstrating SPIFFE integration with Vouch: - spiffe/go-mtls: SPIFFE mTLS (X.509-SVIDs) + Vouch JWT user auth using go-spiffe v2 and go-oidc - spiffe/python-jwt: Dual-issuer JWT validation accepting both SPIFFE JWT-SVIDs and Vouch OIDC tokens with auto-detection - spiffe/rust-mtls: SPIFFE mTLS via spiffe-rustls + Vouch JWT validation using jsonwebtoken, with peer identity extraction - spiffe/oidc-federation: OIDC federation trusting both SPIRE and Vouch as identity providers for workloads and humans respectively Each example integrates with Vouch, follows the repo's Docker/port-3000 conventions, and includes a README. Updated CI matrix, Dependabot config, root README, and CLAUDE.md. https://claude.ai/code/session_01DzZ8a12tEy81AFa36jVheU
| try: | ||
| issuer = identify_issuer(token) | ||
| except Exception as e: | ||
| return jsonify({'error': f'Invalid token format: {e}'}), 401 |
| if k not in ('iss', 'exp', 'iat', 'nbf')}, | ||
| }) | ||
| except Exception as e: | ||
| return jsonify({'error': f'SPIRE token verification failed: {e}'}), 401 |
| 'hardware_verified': claims.get('hardware_verified', False), | ||
| }) | ||
| except Exception as e: | ||
| return jsonify({'error': f'Vouch token verification failed: {e}'}), 401 |
| 'hint': 'Use this token as a Bearer token on /resource to access as a SPIFFE workload', | ||
| }) | ||
| except Exception as e: | ||
| return jsonify({'error': f'Failed to fetch JWT-SVID: {e}'}), 500 |
| try: | ||
| unverified = decode_token_unverified(token) | ||
| except Exception as e: | ||
| return jsonify({'error': f'Invalid token format: {e}'}), 401 |
| 'claims': result.get('claims', {}), | ||
| }) | ||
| except Exception as e: | ||
| return jsonify({'error': f'SPIFFE JWT-SVID verification failed: {e}'}), 401 |
| 'issuer': claims.get('iss'), | ||
| }) | ||
| except Exception as e: | ||
| return jsonify({'error': f'Vouch JWT verification failed: {e}'}), 401 |
| 'token': svid.token, | ||
| }) | ||
| except Exception as e: | ||
| return jsonify({'error': f'Failed to fetch JWT-SVID: {e}'}), 500 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four new examples demonstrating SPIFFE integration with Vouch:
go-spiffe v2 and go-oidc
JWT-SVIDs and Vouch OIDC tokens with auto-detection
using jsonwebtoken, with peer identity extraction
as identity providers for workloads and humans respectively
Each example integrates with Vouch, follows the repo's Docker/port-3000
conventions, and includes a README. Updated CI matrix, Dependabot config,
root README, and CLAUDE.md.
https://claude.ai/code/session_01DzZ8a12tEy81AFa36jVheU