Commits
Andris Mednis authored 43ce052d51a
.......PS. [ZBXNEXT-10224] simplified zbx_vault_token_lookup_self() by moving error handling to caller functions
Before this change the zbx_vault_token_lookup_self() function was called in
2 places and had error handling to serve different contexts.
It was over-specialized, unsuitable for zbx_vault_renew_token_hashicorp()
which did its own lookup-self request implementation.
This change:
1) simplifies zbx_vault_token_lookup_self() by moving HTTP response code
handling out, to caller function. zbx_vault_token_lookup_self() becomes
minimal and reusable.
2) modifies the caller function zbx_vault_get_kvs_hashicorp() by adding
error handling which was formerly in zbx_vault_token_lookup_self().
3) modifies zbx_vault_renew_token_hashicorp() to use the modified
zbx_vault_token_lookup_self() instead of internal 'lookup-self' implementation.
4) removes the 2nd call of zbx_vault_token_lookup_self() from
zbx_vault_renew_token_hashicorp() in case 'renew-self' request fails.
zbx_vault_app_role_login_hashicorp() is called straight away, without
zbx_vault_token_lookup_self().