code wiki / _hdl_build / nx_vault_auth.nx

nx_vault_auth.nx

buildroot/runtime/_hdl_build/nx_vault_auth.nx

1534 B30 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic vault
docsdependenciesstructsconstsfunctions

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

nx_vault_lease.nx nx_syscalls.nx nx_vault_auth.nx nx_vault_auth_test.nx nx_vault_suite_test.nx

imports: nx_vault_lease.nxnx_syscalls.nx

imported by: nx_vault_auth_test.nxnx_vault_suite_test.nx

structs

none

consts

10const AM_TOKEN: i64 = 1
11const AM_USERPASS: i64 = 2
12const AM_APPROLE: i64 = 3

functions

15func auth_login(methods: *i64, id_h: *i64, sec_h: *i64, policy: *i64, n: i64, req_method: i64, req_id: i64, req_sec: i64) -> i64
called by 2: mainmain
30func auth_session_valid(now: i64, issued_at: i64, ttl: i64) -> i64 { return lease_valid(now, issued_at, ttl, 0) }
called by 1: main calls 1: lease_valid