Store the CryptoHub credentials
Store the endpoint username and password in the AppViewX vault so the workflow reads them at run time rather than carrying them inline. The CryptoHub login endpoint expects the password Base64 encoded. Store the encoded value.Shell
Configure the authentication call
AppViewX authenticates against/home/v1/login with authType set to userpass.
Request
token and its expiry in tokenExpiration.
The response is similar to the following:
Response
If the identity belongs to a role that requires multiple identities, the session reports
fullyLoggedIn: false until enough identities have authenticated. The endpoint identity used for unattended automation should be scoped so that a single login fully authenticates the session.Carry the token on subsequent calls
Send the token in theAuthorization header on each following request:
Shell
tokenExpiration and re-authenticate when the token expires, rather than assuming a fixed lifetime. For the token handling patterns CryptoHub supports, including the stateless and session-based flows, see Using bearer tokens.
The token lifetime is set by CryptoHub, not by the client, and is deployment dependent. In testing against CryptoHub 7.0.3.x the token remained valid for roughly 24 hours, well beyond the fixed 10-minute interval some workflow templates assume. Always honor the
tokenExpiration timestamp returned at login rather than a hardcoded lifetime.Handle authentication failure
If authentication fails, the workflow must stop rather than continue to the key generation step. A failed login leaves no CryptoHub objects behind, so no cleanup is required. Verify the following when a login fails:- The password is Base64 encoded.
- The username matches the endpoint identity, not an administrator identity.
- The endpoint’s partition is enabled.
- The CryptoHub address resolves and is reachable over HTTPS from the AppViewX host.

