code wiki / _hdl_build / nx_vault_auth.nx
nx_vault_auth.nx
buildroot/runtime/_hdl_build/nx_vault_auth.nx
about
nx_vault_auth.nx -- sovereign MULTI-AUTH methods (HashiCorp Vault "auth methods" gap from
vault_capability_census.tsv). A login presents a credential via a method (token / userpass / approle);
on success the vault issues a SESSION bound to a POLICY (composes nx_vault_acl) and a LEASE (composes
nx_vault_lease, session TTL). token = the token IS the secret; userpass + approle = BOTH an id and a
secret must match. Deny on wrong-secret, wrong-method, or unknown-id. Credentials are i64 hashes here
(production hashes the real secret via nx_sha256 / nx_machine_key). license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_vault_lease.nxnx_syscalls.nx
imported by: nx_vault_auth_test.nxnx_vault_suite_test.nx
structs
| none |
consts
| 10 | const AM_TOKEN: i64 = 1 |
| 11 | const AM_USERPASS: i64 = 2 |
| 12 | const AM_APPROLE: i64 = 3 |
functions
| 15 | func auth_login(methods: *i64, id_h: *i64, sec_h: *i64, policy: *i64, n: i64, req_method: i64, req_id: i64, req_sec: i64) -> i64 |
| 30 | func auth_session_valid(now: i64, issued_at: i64, ttl: i64) -> i64 { return lease_valid(now, issued_at, ttl, 0) } |