Question:
How does API authentication work in Vault?
Answer:
Authentication servers are not Vault or Domain specific, so any valid URL can be used to access the Authentication servers. Authentication only inspects the username and password. The Authentication endpoints will authenticate the user to the Vault specified in the vault_subdomain. For example, https://{vault_subdomain}/api/{version}/auth. You can also override this domain with the vaultDNS parameter, which generates a session for the subdomain specified.
If the specified Vault is invalid or inactive, a Session ID may be returned for an alternate default Vault. For this reason, it’s important to verify that the currently authenticated Vault shown by the “vaultId” field is the expected one.
Related Documentation:
Vault API Documentation: API Authentication
Veeva Connect Post: Session Best Practices