Effective Milvus auth token from resolved addon config.
Milvus with authorizationEnabled answers 401 to any request without
a bearer token. The token was only ever read from MILVUS_TOKEN, so a
server launched without that env var (any launcher but the blw
wrapper) ran unauthenticated and every memory read failed.
effective-token closes that gap:
Effective Milvus auth token from resolved addon config.
Milvus with `authorizationEnabled` answers 401 to any request without
a bearer token. The token was only ever read from MILVUS_TOKEN, so a
server launched without that env var (any launcher but the blw
wrapper) ran unauthenticated and every memory read failed.
`effective-token` closes that gap:
1. an explicit :token wins (plain or "pass:<path>");
2. else :user + :password compose "user:password", the Milvus
basic-auth bearer form (password plain or "pass:<path>").
Secrets never enter logs or error messages.(effective-token cfg)(effective-token {:keys [token user password]} pass-fn)Bearer token for cfg, or nil when no credentials are configured.
Bearer token for `cfg`, or nil when no credentials are configured.
(resolve-secret v)(resolve-secret v pass-fn)Plain string as-is, "pass:<path>" through password-store, blank → nil.
Plain string as-is, "pass:<path>" through password-store, blank → nil.
(with-effective-token cfg)(with-effective-token cfg pass-fn)cfg with :token set to the effective token and :password dropped,
so the raw password does not travel further than this namespace.
`cfg` with :token set to the effective token and :password dropped, so the raw password does not travel further than this namespace.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |