lex-kerberos 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/CLAUDE.md +4 -4
- data/lib/legion/extensions/kerberos/helpers/spnego.rb +7 -2
- data/lib/legion/extensions/kerberos/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b532fa3b7470e4f7048bbe88b98ad670ff261992a45aac9b32af5e48077f1369
|
|
4
|
+
data.tar.gz: 451c7b9c3df3f0b84af43d85c4d3aeca1ec1b6a2e3f3fe1b5e41ce074c0e169c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cade08384530ed4f865dbbc52669c14f57256dd7805bd87011ed24ac69aea637e8b122b28cef5acbc880a1300c11ca76ef3dd12683aab8a7e1450580a5fd66a3
|
|
7
|
+
data.tar.gz: 59ea5d8ae529436830f799f3cba04e7c9a17c69d19f4fd3509de5cbd1c3c306edc488e3e54837d73c35896093db5beeeece32f8e163df203e1f3f9de97840ee4
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.7] - 2026-03-26
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Move `disable_gssapi_finalizers` to `ensure` block in `init_spnego_context` and `negotiate` so finalizers are disabled even when GSSAPI operations fail (e.g., expired Kerberos credentials), preventing segfault in `gss_release_name` during later GC
|
|
9
|
+
|
|
5
10
|
## [0.1.6] - 2026-03-26
|
|
6
11
|
|
|
7
12
|
### Fixed
|
data/CLAUDE.md
CHANGED
|
@@ -10,7 +10,7 @@ Legion Extension that provides Kerberos/SPNEGO authentication. Validates SPNEGO
|
|
|
10
10
|
|
|
11
11
|
**GitHub**: https://github.com/LegionIO/lex-kerberos
|
|
12
12
|
**License**: MIT
|
|
13
|
-
**Version**: 0.1.
|
|
13
|
+
**Version**: 0.1.6
|
|
14
14
|
|
|
15
15
|
## Architecture
|
|
16
16
|
|
|
@@ -35,7 +35,7 @@ Legion::Extensions::Kerberos
|
|
|
35
35
|
| File | Purpose |
|
|
36
36
|
|------|---------|
|
|
37
37
|
| `lib/legion/extensions/kerberos.rb` | Entry point, requires all helpers/runners/actors, extends Core |
|
|
38
|
-
| `lib/legion/extensions/kerberos/helpers/spnego.rb` | GSSAPI token acceptance via `gssapi` gem; `accept_spnego_token`, `extract_username`, `extract_realm` |
|
|
38
|
+
| `lib/legion/extensions/kerberos/helpers/spnego.rb` | GSSAPI token acceptance and acquisition via `gssapi` gem; `accept_spnego_token`, `obtain_spnego_token`, `extract_username`, `extract_realm`; macOS Heimdal segfault fix via `disable_gssapi_finalizers` |
|
|
39
39
|
| `lib/legion/extensions/kerberos/helpers/ldap.rb` | LDAP group lookup + profile via `net-ldap`; `lookup_groups` returns groups + org attributes via `PROFILE_MAP` |
|
|
40
40
|
| `lib/legion/extensions/kerberos/helpers/keytab.rb` | Multi-source keytab resolution; vault:// URI, file path, Base64 blob; writes to `~/.legionio/kerberos/legion.keytab` |
|
|
41
41
|
| `lib/legion/extensions/kerberos/helpers/client.rb` | `DEFAULTS` constant and `settings` method that merges with `Legion::Settings[:kerberos]` |
|
|
@@ -43,7 +43,7 @@ Legion::Extensions::Kerberos
|
|
|
43
43
|
| `lib/legion/extensions/kerberos/runners/authenticate.rb` | `validate_spnego` runner + `negotiate` (full HTTP Negotiate auth flow with response headers, RBAC mapping, JWT issuance) |
|
|
44
44
|
| `lib/legion/extensions/kerberos/actors/keytab_refresh.rb` | Hourly actor that calls `resolve_keytab` to re-cache from Vault; `run_now? false` (no immediate run at boot) |
|
|
45
45
|
| `lib/legion/extensions/kerberos/client.rb` | Standalone `Client` class with `authenticate(token:)` and `resolve_groups(username:)` |
|
|
46
|
-
| `lib/legion/extensions/kerberos/version.rb` | `VERSION = '0.1.
|
|
46
|
+
| `lib/legion/extensions/kerberos/version.rb` | `VERSION = '0.1.6'` |
|
|
47
47
|
|
|
48
48
|
## Key Patterns
|
|
49
49
|
|
|
@@ -116,7 +116,7 @@ Optional framework dependencies (guarded with `defined?`, not in gemspec):
|
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
118
|
bundle install
|
|
119
|
-
bundle exec rspec #
|
|
119
|
+
bundle exec rspec # 58 specs across 10 spec files
|
|
120
120
|
bundle exec rubocop # Clean
|
|
121
121
|
```
|
|
122
122
|
|
|
@@ -48,9 +48,12 @@ module Legion
|
|
|
48
48
|
token_bytes = ctx.init_context
|
|
49
49
|
raise GSSAPI::GssApiError, 'init_context returned nil token' if token_bytes.nil?
|
|
50
50
|
|
|
51
|
-
# Prevent macOS Heimdal segfault in gss_release_name during GC (FFI autopointer finalizer).
|
|
52
|
-
disable_gssapi_finalizers(ctx) if RUBY_PLATFORM.include?('darwin')
|
|
53
51
|
token_bytes
|
|
52
|
+
ensure
|
|
53
|
+
# Prevent macOS Heimdal segfault in gss_release_name during GC (FFI autopointer finalizer).
|
|
54
|
+
# Must run in ensure so finalizers are disabled even when init_context fails
|
|
55
|
+
# (e.g., expired Kerberos credentials).
|
|
56
|
+
disable_gssapi_finalizers(ctx) if ctx && RUBY_PLATFORM.include?('darwin')
|
|
54
57
|
end
|
|
55
58
|
|
|
56
59
|
def disable_gssapi_finalizers(ctx)
|
|
@@ -67,6 +70,8 @@ module Legion
|
|
|
67
70
|
ctx.acquire_credentials
|
|
68
71
|
output_bytes = ctx.accept_context(input_bytes)
|
|
69
72
|
[ctx.display_name, output_bytes]
|
|
73
|
+
ensure
|
|
74
|
+
disable_gssapi_finalizers(ctx) if ctx && RUBY_PLATFORM.include?('darwin')
|
|
70
75
|
end
|
|
71
76
|
|
|
72
77
|
def build_token_result(principal, output_bytes)
|