Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
2bd4353
update dependency version floors for ruby 3.4 compatibility
Esity Mar 13, 2026
174a7e4
rubocop -A auto-corrections
Esity Mar 13, 2026
d273352
fix rubocop offenses: rename iv parameter, move dev deps to gemfile, …
Esity Mar 13, 2026
c6e2bc9
reindex documentation to reflect current codebase
Esity Mar 13, 2026
ddbb2f8
expand settings spec coverage
Esity Mar 13, 2026
59fb0eb
add jwt support to legion-crypt
Esity Mar 13, 2026
84e0d3f
switch to org-level reusable ci workflow
Esity Mar 13, 2026
f1cb0bc
reindex documentation to reflect current codebase state
Esity Mar 13, 2026
9db1a13
add vault jwt auth backend, update cluster secret and crypt entry point
Esity Mar 14, 2026
80eac66
trigger ci with updated shared workflow
Esity Mar 15, 2026
ced7887
add release job to ci workflow
Esity Mar 15, 2026
dc94cdb
fix flaky cluster_secret spec and add vault_jwt_auth specs
Esity Mar 15, 2026
ba29bf7
add leases key to vault default settings
Esity Mar 16, 2026
e702598
add LeaseManager core: singleton, start, fetch, shutdown # pipeline-c…
Esity Mar 16, 2026
084606c
add push_to_settings with reverse index for lease rotation
Esity Mar 16, 2026
400c5f8
add background renewal thread with rotation detection
Esity Mar 16, 2026
cc853a8
wire LeaseManager into crypt start and shutdown lifecycle
Esity Mar 16, 2026
4112a27
bump legion-crypt to 1.3.0: vault lease manager
Esity Mar 16, 2026
af43d16
update readme with lease manager docs
Esity Mar 16, 2026
6c7a38e
add jwks-based jwt validation for external identity providers
Esity Mar 16, 2026
32d5401
update readme with jwks external token verification docs
Esity Mar 16, 2026
06206e8
update claude.md with jwks client and external token verification docs
Esity Mar 16, 2026
7ad4ba2
add mock vault for local development mode
Esity Mar 16, 2026
7d01831
add ed25519, partition keys, erasure, and attestation modules
Esity Mar 16, 2026
47d7985
add tls configuration module for mtls between components
Esity Mar 17, 2026
83e03e7
add VaultKerberosAuth for SPNEGO-based Vault token exchange
Esity Mar 18, 2026
9b0033e
add default and clusters keys to vault settings schema
Esity Mar 18, 2026
e9b6244
add VaultCluster module with multi-cluster client management
Esity Mar 18, 2026
1234013
add LdapAuth module for per-cluster LDAP authentication
Esity Mar 18, 2026
d3bd1e9
wire VaultCluster and LdapAuth into Legion::Crypt with multi-cluster …
Esity Mar 18, 2026
7440700
update VaultRenewer to support multi-cluster token renewal with singl…
Esity Mar 18, 2026
9e39a64
bump to 1.4.4, add changelog for multi-cluster vault
Esity Mar 18, 2026
1be3169
reindex documentation to reflect current codebase state
Esity Mar 19, 2026
49296e5
refactor: standardize TLS module with resolve pattern
Esity Mar 20, 2026
4a52393
add codeowners
Esity Mar 22, 2026
4c85896
fix vault url construction when address contains scheme
Esity Mar 22, 2026
c3331d6
expand codeowners with path-based template
Esity Mar 22, 2026
2298e79
add comprehensive logging across crypt operations
Esity Mar 22, 2026
d2a4b1e
add logging to silent rescue blocks
Esity Mar 22, 2026
9812e2b
add Legion::Crypt::Helper module for injectable vault mixin (v1.4.9)
Esity Mar 23, 2026
5be98b1
add Legion::Crypt.delete for Vault KV path deletion
Esity Mar 24, 2026
b6373ce
bump legion-crypt 1.4.10 — add Crypt.delete for Vault KV deletion
Esity Mar 24, 2026
4eb1519
add .worktrees to gitignore
Esity Mar 24, 2026
d49769b
add Crypt::Mtls module for Vault PKI cert issuance
Esity Mar 24, 2026
84ab922
add Crypt::Mtls and CertRotation for Vault PKI mTLS
Esity Mar 24, 2026
4166f2f
bump version to 1.4.11, update CHANGELOG
Esity Mar 24, 2026
e640657
merge feature/mtls-internal-comms into main
Esity Mar 25, 2026
c779561
fix ruby 4.0 frozen hash in vault gem setup (1.4.12)
Esity Mar 25, 2026
f8293c2
add repo governance files (CODEOWNERS, dependabot, CI)
Esity Mar 25, 2026
e6eff15
add kerberos settings defaults to vault config
Esity Mar 26, 2026
e7a2110
add KerberosAuth module for Vault auto-auth via SPNEGO
Esity Mar 26, 2026
216ed87
add auth_method dispatch to connect_all_clusters (kerberos, ldap, tok…
Esity Mar 26, 2026
86602b9
add TokenRenewer with three-layer lifecycle (renew, re-auth, backoff)…
Esity Mar 26, 2026
7293313
wire KerberosAuth and TokenRenewer into Crypt start/shutdown lifecycle
Esity Mar 26, 2026
3e55afe
bump to 1.4.13, add changelog for kerberos auto-auth
Esity Mar 26, 2026
8ad9bc7
fix vault kerberos auth: header, namespace, accessor, bump to 1.4.14
Esity Mar 26, 2026
5cf5e40
update CLAUDE.md version to 1.4.14
Esity Mar 26, 2026
8f8a898
route vault kv operations through default cluster client (#1)
Esity Mar 26, 2026
4244c45
add vault namespace-aware kerberos auth, lease manager cluster routin…
Esity Mar 26, 2026
55c76e8
apply copilot review suggestions (#2)
Esity Mar 26, 2026
ee9871a
apply copilot review suggestions (#2)
Esity Mar 26, 2026
eb811c0
Merge pull request #2 from LegionIO/feature/vault-namespace-kerberos
Esity Mar 26, 2026
ffa6e87
add kerberos principal storage and vault namespace routing (#3)
Esity Mar 26, 2026
cc99a0f
fix vault cluster auth pipeline bugs (#4)
Esity Mar 27, 2026
9bb2c81
fix kv v2 envelope unwrapping and add vault debug logging
Esity Mar 27, 2026
f46c388
replace split error logging with log_exception
Esity Mar 27, 2026
2c41c11
apply copilot review suggestions, bump version to 1.4.21 (#5)
Esity Mar 27, 2026
8c21244
apply copilot review suggestions round 2 (#5)
Esity Mar 27, 2026
11f840f
apply copilot review suggestions round 3 (#5)
Esity Mar 27, 2026
cf73dd6
apply copilot review suggestions round 4 (#5)
Esity Mar 27, 2026
e999c98
apply copilot review suggestions round 5 (#5)
Esity Mar 27, 2026
7f279f5
Merge pull request #5 from LegionIO/feature/structured-exception-logging
Esity Mar 27, 2026
d2bc724
fix vault health check to accept standby nodes (429, 472, 473)
Esity Mar 27, 2026
5af83a4
Merge branch 'main' into feature/structured-exception-logging
Esity Mar 28, 2026
25ab20a
Merge pull request #7 from LegionIO/feature/structured-exception-logging
Esity Mar 28, 2026
9f4219f
fix lease proliferation: cache and reuse Vault dynamic credentials (c…
Esity Mar 28, 2026
b2b3623
route Vault KV through default cluster client in multi-cluster mode (…
Esity Mar 29, 2026
ab56054
add optional SPIFFE workload identity support (closes #8)
Esity Mar 29, 2026
3faadd9
Merge pull request #9 from LegionIO/feature/structured-exception-logging
Esity Mar 29, 2026
0335e87
rescue vault errors in push_cs_to_vault
Esity Mar 29, 2026
81c0d02
fix connect_vault namespace for namespaced vault environments
Esity Mar 31, 2026
618b4b7
fix vault_write to accept keyword args for Crypt.write compatibility
Esity Mar 31, 2026
93bf505
disable cluster secret by default, fix || true settings bug
Esity Mar 31, 2026
22b42c6
clean up dev dependencies: add rubocop-legion
Esity Mar 31, 2026
de298f9
start 1.5.0 release line
Esity Apr 2, 2026
fd3c814
add legion-logging runtime support
Esity Apr 2, 2026
ace0f9a
uplift helper-based logging across legion-crypt
Esity Apr 2, 2026
1e289d9
fix cluster secret vault synchronization
Esity Apr 2, 2026
32ed7c0
harden external jwt and jwks verification
Esity Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Auto-generated from team-config.yml
# Team: core
#
# To apply: scripts/apply-codeowners.sh legion-crypt

* @LegionIO/maintainers
* @LegionIO/core
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: bundler
directory: /
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
labels:
- "type:dependencies"
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
labels:
- "type:dependencies"
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 9 * * 1'

jobs:
ci:
uses: LegionIO/.github/.github/workflows/ci.yml@main

lint:
uses: LegionIO/.github/.github/workflows/lint-patterns.yml@main

security:
uses: LegionIO/.github/.github/workflows/security-scan.yml@main

version-changelog:
uses: LegionIO/.github/.github/workflows/version-changelog.yml@main

dependency-review:
uses: LegionIO/.github/.github/workflows/dependency-review.yml@main

stale:
if: github.event_name == 'schedule'
uses: LegionIO/.github/.github/workflows/stale.yml@main

release:
needs: [ci, lint]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: LegionIO/.github/.github/workflows/release.yml@main
secrets:
rubygems-api-key: ${{ secrets.RUBYGEMS_API_KEY }}
41 changes: 0 additions & 41 deletions .github/workflows/rubocop-analysis.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/sourcehawk-scan.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
# rspec failure tracking
.rspec_status
legionio.key

# git worktrees
.worktrees/
55 changes: 41 additions & 14 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,53 @@
AllCops:
TargetRubyVersion: 3.4
NewCops: enable
SuggestExtensions: false

Layout/LineLength:
Max: 140
Max: 160

Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: space

Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table

Metrics/MethodLength:
Max: 50

Metrics/ClassLength:
Max: 1500

Metrics/ModuleLength:
Max: 1500

Metrics/BlockLength:
Max: 50
Metrics/CyclomaticComplexity:
Max: 14
Max: 40
Exclude:
- 'spec/**/*'

Metrics/AbcSize:
Max: 17
Max: 60

Metrics/CyclomaticComplexity:
Max: 15

Metrics/PerceivedComplexity:
Max: 16
Naming/MethodParameterName:
Enabled: false
Max: 17

Style/Documentation:
Enabled: false
AllCops:
TargetRubyVersion: 2.6
NewCops: enable
SuggestExtensions: false

Style/SymbolArray:
Enabled: true

Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: always

Naming/FileName:
Enabled: false

Naming/PredicateMethod:
Enabled: false
Gemspec/RequiredRubyVersion:
Enabled: false
38 changes: 38 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# legion-crypt Agent Notes

## Scope

`legion-crypt` handles cryptography and secret workflows for Legion: cipher ops, Vault integration, JWT/JWKS verification, key lifecycle, mTLS, and lease/token renewers.

## Fast Start

```bash
bundle install
bundle exec rspec
bundle exec rubocop
```

## Primary Entry Points

- `lib/legion/crypt.rb`
- `lib/legion/crypt/cipher.rb`
- `lib/legion/crypt/jwt.rb`
- `lib/legion/crypt/jwks_client.rb`
- `lib/legion/crypt/vault.rb`
- `lib/legion/crypt/lease_manager.rb`
- `lib/legion/crypt/token_renewer.rb`
- `lib/legion/crypt/mtls.rb`

## Guardrails

- Treat all changes as security-sensitive. Never log secrets, tokens, private keys, or decrypted plaintext.
- Preserve JWT behavior across HS256/RS256 and external JWKS validation.
- Keep Vault-dependent logic optional and safely guarded for environments without Vault.
- Background renewal/rotation threads must stop cleanly on shutdown and handle failure with bounded retry.
- Maintain compatibility for Kerberos, LDAP, and JWT Vault auth paths.
- Cryptographic defaults and key lifecycle behavior are contract-sensitive; change only with test coverage.

## Validation

- Run targeted specs for changed auth/crypto paths first.
- Before handoff, run full `bundle exec rspec` and `bundle exec rubocop`.
Loading
Loading