Chilkat.AuthAzureStorage Class Overview
Chilkat.AuthAzureStorage is a credential object for Azure Storage
Services authentication. It stores the Azure storage account name, the base64
account access key, the Azure Storage service type, the authentication scheme, and
the Azure Storage API version header used when authenticating REST requests.
What the Class Is Used For
Use Chilkat.AuthAzureStorage as a way to specify
Azure Storage Services credentials for the Chilkat.Rest
class. The object supplies the information needed for Azure Storage authentication,
including the storage account, access key, service type, signing scheme, and
optional x-ms-version request header.
Storage Account
Set Account to the Azure storage account name.
Access Key
Set AccessKey to the account’s base64 access key.
Storage Service
Set Service to
Blob, Queue,
File, or Table.
Authentication Scheme
Set Scheme to
SharedKey or
SharedKeyLite.
Use with Chilkat.Rest
AuthAzureStorage is used to provide Azure Storage
authentication credentials to Chilkat.Rest. The
Rest object handles the HTTP communication, while the
AuthAzureStorage object supplies the Azure-specific
credential and signing settings needed for the request.
| Responsibility |
Handled By |
Description |
| Store Azure credentials |
AuthAzureStorage |
Holds the storage account name and base64 access key.
|
| Specify service and scheme |
AuthAzureStorage |
Identifies the Azure Storage service and whether
SharedKey or
SharedKeyLite authentication is used.
|
| Add Azure API version header |
AuthAzureStorage |
Can automatically add the x-ms-version HTTP
request header.
|
| Send the HTTP request |
Chilkat.Rest |
Performs the REST call to Azure Storage using the configured credentials.
|
Practical role:
Think of AuthAzureStorage as the Azure Storage
credential configuration object used by Chilkat.Rest
when making authenticated Azure Storage REST requests.
Typical Workflow
-
Create a Chilkat.AuthAzureStorage object.
-
Set Account to the Azure storage account name.
-
Set AccessKey to the valid base64 access key for
the storage account.
-
Set Service to the target Azure Storage service:
Blob, Queue,
File, or Table.
-
Optionally set Scheme to
SharedKey or
SharedKeyLite. The default is
SharedKey.
-
Optionally set XMsVersion to control the
x-ms-version HTTP request header.
-
Use the configured object with Chilkat.Rest for
authenticated Azure Storage requests.
-
If authentication or request behavior is unexpected, inspect
LastErrorText and the HTTP response returned by
Azure.
Core Concepts
| Concept |
Meaning |
Important Members |
| Storage Account |
The Azure storage account containing containers, blobs, queues, files, or
tables depending on the service being used.
|
Account |
| Access Key |
The valid base64 key for the Azure storage account.
|
AccessKey |
| Storage Service |
The Azure Storage service targeted by the request.
|
Service |
| Authentication Scheme |
The Azure Storage authentication scheme used for request signing.
|
Scheme |
| Azure API Version Header |
The x-ms-version HTTP request header used with
Azure Storage requests.
|
XMsVersion |
| REST Credential Object |
The object used by Chilkat.Rest to provide Azure
Storage authentication settings.
|
AuthAzureStorage with
Chilkat.Rest
|
Properties
| Property |
Default / Values |
Purpose and Guidance |
| Account |
Azure storage account name |
Identifies the Azure storage account. A storage account may contain
containers, and a container may contain blobs with binary data, properties,
and metadata.
|
| AccessKey |
Valid base64 access key |
The Azure storage account access key used for authentication. Treat this as a
private secret.
|
| Service |
Blob,
Queue,
File, or
Table
Default: Blob
|
Specifies which Azure Storage service is being accessed.
|
| Scheme |
SharedKey or
SharedKeyLite
Default: SharedKey
|
Specifies the Azure Storage authentication scheme.
|
| XMsVersion |
Default: 2014-02-14
|
If set, automatically adds the
x-ms-version HTTP request header to Azure
Storage requests.
|
| LastErrorText |
Read-only diagnostic text |
Provides diagnostic information for the last method or property access.
Check after failures or unexpected behavior.
|
Azure Storage Service Selection
| Service Value |
Meaning |
Use When |
| Blob |
Azure Blob Storage.
|
Use when authenticating requests for containers and blobs.
|
| Queue |
Azure Queue Storage.
|
Use when authenticating queue service requests.
|
| File |
Azure File Storage.
|
Use when authenticating file service requests.
|
| Table |
Azure Table Storage.
|
Use when authenticating table service requests.
|
Version note:
Authentication for the Azure Table service did not work in Chilkat versions prior
to v9.5.0.83.
Authentication Scheme
| Scheme Value |
Meaning |
Guidance |
| SharedKey |
Azure Storage Shared Key authentication.
|
This is the default value.
|
| SharedKeyLite |
Azure Storage Shared Key Lite authentication.
|
Use when the REST request requires the SharedKeyLite scheme.
|
Azure Version Header
The XMsVersion property controls the
x-ms-version HTTP request header. If this property is
set, Chilkat automatically adds the header to Azure Storage requests.
| Property |
Header Added |
Default |
| XMsVersion |
x-ms-version |
2014-02-14 |
Practical use:
Set XMsVersion when a particular Azure Storage REST
operation requires or expects a specific service version.
Methods
| Method |
Purpose |
Notes |
| Noop |
Does nothing.
|
Present for technical reasons because all Chilkat classes must have at least
one method.
|
Configuration class:
AuthAzureStorage is primarily property-based. The
important work is done by configuring its credential properties and using the object
with Chilkat.Rest.
Method and Property Summary by Category
| Category |
Members |
Purpose |
| Account credentials |
Account,
AccessKey
|
Identify the Azure storage account and provide the base64 account key.
|
| Authentication options |
Scheme,
Service
|
Select the authentication scheme and Azure Storage service type.
|
| Azure request version |
XMsVersion |
Automatically add the x-ms-version request
header when set.
|
| Required method |
Noop |
No operation; present only because Chilkat classes require at least one
method.
|
| Diagnostics |
LastErrorText |
Read diagnostic information after failed or unexpected behavior.
|
Security Notes
| Item |
Security Guidance |
| AccessKey |
Treat the access key as a secret. Do not expose it in client-side code, logs,
public repositories, or error messages.
|
| Storage account access |
The configured account and key authorize Azure Storage requests made through
Chilkat.Rest, so protect the object and key
accordingly.
|
| Diagnostics |
Be careful when logging diagnostics in production. Avoid logging secrets or
request details that may expose credentials.
|
Diagnostics and Troubleshooting
| Problem Area |
Member |
What to Check |
| Azure rejects the request |
Account,
AccessKey,
Service,
Scheme
|
Verify the account name, access key, target service, and authentication scheme
match the Azure Storage request being made.
|
| Wrong service selected |
Service |
Confirm the value is correct for the requested Azure Storage service:
Blob, Queue,
File, or Table.
|
| Unexpected authentication behavior |
Scheme |
Confirm whether the request should use
SharedKey or
SharedKeyLite.
|
| Azure version-specific behavior |
XMsVersion |
Check whether the operation requires a specific
x-ms-version header.
|
| Need operation details after failure |
LastErrorText |
Check diagnostic text after failed or unexpected property configuration or
REST authentication behavior.
|
Common Pitfalls
| Pitfall |
Better Approach |
| Using the wrong Azure Storage service value. |
Set Service to the service being accessed:
Blob, Queue,
File, or Table.
|
| Assuming the authentication scheme is always interchangeable. |
Use the scheme expected by the request:
SharedKey or
SharedKeyLite.
|
| Forgetting that AccessKey must be base64. |
Provide a valid base64 access key for the Azure storage account.
|
| Exposing the account access key. |
Keep AccessKey private and avoid logging it.
|
| Looking for operational methods on the credential object. |
Use AuthAzureStorage for credential
configuration and Chilkat.Rest for REST
requests.
|
| Ignoring Azure's HTTP response when troubleshooting. |
Authentication configuration may be correct or incorrect depending on the
request details. Inspect the Azure REST response along with
LastErrorText.
|
Best Practices
| Recommendation |
Reason |
| Use AuthAzureStorage with Chilkat.Rest. |
The class is designed to specify Azure Storage credentials for REST requests.
|
| Set Account and AccessKey explicitly. |
These are the core credentials needed for Azure Storage authentication.
|
| Choose Service carefully. |
Authentication depends on the Azure Storage service being accessed.
|
| Leave Scheme at SharedKey unless another scheme is required. |
SharedKey is the default.
|
| Set XMsVersion when a request requires a specific Azure Storage service version. |
It automatically adds the x-ms-version request
header.
|
| Protect the AccessKey. |
The access key authorizes Azure Storage requests and should be treated as a
secret.
|
| Check LastErrorText and Azure's HTTP response when troubleshooting. |
Chilkat diagnostics and the server response together provide the clearest
explanation of authentication or request failures.
|
Summary
Chilkat.AuthAzureStorage is a property-based
credential class used with Chilkat.Rest for Azure
Storage Services authentication. It stores the Azure storage account name, base64
access key, target service, authentication scheme, and optional
x-ms-version header value.
The most important practical guidance is to treat
AccessKey as a private secret, set
Service to the correct Azure Storage service, use the
proper Scheme, set
XMsVersion when required, and remember that this class
configures credentials while Chilkat.Rest performs the
actual REST request.