Skip to content

Add SPIFFE workload identity examples with Vouch OIDC integration#42

Closed
jplock wants to merge 1 commit into
mainfrom
claude/spiffe-integration-examples-6Vu2u
Closed

Add SPIFFE workload identity examples with Vouch OIDC integration#42
jplock wants to merge 1 commit into
mainfrom
claude/spiffe-integration-examples-6Vu2u

Conversation

@jplock
Copy link
Copy Markdown
Contributor

@jplock jplock commented Apr 10, 2026

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

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
@jplock jplock closed this Apr 10, 2026
@jplock jplock deleted the claude/spiffe-integration-examples-6Vu2u branch April 10, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants