Storage authentication
Request accessStorage authentication
This page provides instructions on how to authenticate to the storage using the credentials obtained from the GET /storages/{id}/credentials API endpoint.
Prerequisites
- Storage wrapped token obtained from
GET /storages/{id}/credentialsAPI endpoint (see Get storage credentials documentation) curlcommand-line tool installed for making API requests- Azure CLI installed for unwrapping the Vault token and accessing storage with the obtained credentials
Unwrapping the token
The returned token is a HashiCorp Vault wrapped token. You must unwrap it to obtain the actual storage credentials:
post
Unwrap vault token
curl -X POST "https://hcp-vault.tomtomgroup.com/v1/sys/wrapping/unwrap" \ -H "X-Vault-Token: <YOUR_WRAPPED_TOKEN>"Unwrapped credentials response
{ "request_id":"abc123", "lease_id":"", "renewable": false, "lease_duration":0, "data": { "credentials":{ "clientId":"<client_id>", "clientSecret":"<client_secret>" }, "id":"<storage_id>", "tenant_id":"<tenant_id>", "url":"https://<storage_id>.blob.core.windows.net/default/" }, "wrap_info":null, "warnings":null, "auth":null, "mount_type":"ns_system"}Unwrapped credentials fields
| Field | Type | Description |
|---|---|---|
data.credentials.clientId | string | Client ID for accessing Azure storage |
data.credentials.clientSecret | string | Client secret for Azure storage authentication |
data.id | string | Storage identifier (matches storage ID) |
data.tenant_id | string | null | Azure tenant ID (if applicable) |
data.url | string | Azure Blob Storage URL for the storage location |
Using the credentials
With the unwrapped credentials, you can authorize to the storage using:
az login --service-principal \ --username <client_id> \ --password <client_secret> \ --tenant <tenant_id>Error responses
| HTTP Status | Error | Cause | Solution |
|---|---|---|---|
| 401 | Unauthorized | Invalid credentials | Refresh API key or token |
| 403 | Forbidden | Insufficient permissions | Check your access rights |
| 404 | Not Found | Storage not found | Verify storage ID |
| 500 | Internal Server Error | Server-side issue | Retry the request |
Next steps
- Private Data Gateway API - Learn how to manage your storage
- GEM API - Learn how to run and monitor matching jobs