Skip to content

Commit

Permalink
Updated metadata for various Azure components (#2855)
Browse files Browse the repository at this point in the history
Fixes #2613

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Mark Fussell <markfussell@gmail.com>
  • Loading branch information
ItalyPaleAle and msfussell committed Oct 5, 2022
1 parent 3cbf087 commit d5a8227
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ spec:
type: bindings.azure.blobstorage
version: v1
metadata:
- name: storageAccount
- name: accountName
value: myStorageAccountName
- name: storageAccessKey
- name: accountKey
value: ***********
- name: container
- name: containerName
value: container1
- name: decodeBase64
value: <bool>
- name: getBlobRetryCount
value: <integer>
- name: publicAccessLevel
value: <publicAccessLevel>
# - name: decodeBase64
# value: <bool>
# - name: getBlobRetryCount
# value: <integer>
# - name: publicAccessLevel
# value: <publicAccessLevel>
```
{{% alert title="Warning" color="warning" %}}
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
Expand All @@ -42,14 +42,16 @@ The above example uses secrets as plain strings. It is recommended to use a secr

| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|--------|---------|---------|
| storageAccount | Y | Output | The Blob Storage account name | `myexmapleaccount` |
| storageAccessKey | Y | Output | The Blob Storage access key | `access-key` |
| container | Y | Output | The name of the Blob Storage container to write to | `myexamplecontainer` |
| decodeBase64 | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` |
| getBlobRetryCount | N | Output | Specifies the maximum number of HTTP GET requests that will be made while reading from a RetryReader Defaults to `10` | `1`, `2`
| publicAccessLevel | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only used if the container is created by Dapr). Defaults to `none` | `blob`, `container`, `none`
| `accountName` | Y | Input/Output | The name of the Azure Storage account | `"myexmapleaccount"` |
| `accountKey` | Y* | Input/Output | The access key of the Azure Storage account. Only required when not using Azure AD authentication. | `"access-key"` |
| `containerName` | Y | Output | The name of the Blob Storage container to write to | `myexamplecontainer` |
| `endpoint` | N | Input/Output | Optional custom endpoint URL. This is useful when using the [Azurite emulator](https://github.com/Azure/azurite) or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (`http://` or `https://`), the IP or FQDN, and optional port. | `"http://127.0.0.1:10000"`
| `decodeBase64` | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). Defaults to `false` | `true`, `false` |
| `getBlobRetryCount` | N | Output | Specifies the maximum number of HTTP GET requests that will be made while reading from a RetryReader Defaults to `10` | `1`, `2`
| `publicAccessLevel` | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only used if the container is created by Dapr). Defaults to `none` | `blob`, `container`, `none`

### Azure Active Directory (AAD) authentication

The Azure Blob Storage binding component supports authentication using all Azure Active Directory mechanisms. For further information and the relevant component metadata fields to provide depending on the choice of AAD authentication mechanism, see the [docs for authenticating to Azure]({{< ref authenticating-azure.md >}}).

## Binding support
Expand Down Expand Up @@ -130,11 +132,11 @@ spec:
type: bindings.azure.blobstorage
version: v1
metadata:
- name: storageAccount
- name: accountName
value: myStorageAccountName
- name: storageAccessKey
- name: accountKey
value: ***********
- name: container
- name: containerName
value: container1
- name: decodeBase64
value: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,25 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|------------|-----|---------|
| connectionString | Y | Output | The Azure SignalR connection string | `"Endpoint=https://<your-azure-signalr>.service.signalr.net;AccessKey=<your-access-key>;Version=1.0;"`. If the connection string does not contain the `AccessKey` option, Azure Active Directory authentication will be attempted. |
| hub | N | Output | Defines the hub in which the message will be send. The hub can be dynamically defined as a metadata value when publishing to an output binding (key is "hub") | `"myhub"` |
| `connectionString` | Y | Output | The Azure SignalR connection string | `"Endpoint=https://<your-azure-signalr>.service.signalr.net;AccessKey=<your-access-key>;Version=1.0;"` |
| `hub` | N | Output | Defines the hub in which the message will be send. The hub can be dynamically defined as a metadata value when publishing to an output binding (key is "hub") | `"myhub"` |
| `endpoint` | N | Output | Endpoint of Azure SignalR; required if not included in the `connectionString` or if using Azure AD | `https://<your-azure-signalr>.service.signalr.net`
| `accessKey` | N | Output | Access key | `your-access-key`

### Azure Active Directory (Azure AD) authentication

The Azure SignalR binding component supports authentication using all Azure Active Directory mechanisms. See the [docs for authenticating to Azure]({{< ref authenticating-azure.md >}}) to learn more about the relevant component metadata fields based on your choice of Azure AD authentication mechanism.

You have two options to authenticate this component with Azure AD:

- Pass individual metadata keys:
- `endpoint` for the endpoint
- If needed: `azureClientId`, `azureTenantId` and `azureClientSecret`
- Pass a connection string with `AuthType=aad` specified:
- System-assigned managed identity: `Endpoint=https://<servicename>.service.signalr.net;AuthType=aad;Version=1.0;`
- User-assigned managed identity: `Endpoint=https://<servicename>.service.signalr.net;AuthType=aad;ClientId=<clientid>;Version=1.0;`
- Azure AD application: `Endpoint=https://<servicename>.service.signalr.net;AuthType=aad;ClientId=<clientid>;ClientSecret=<clientsecret>;TenantId=<tenantid>;Version=1.0;`
Note that you cannot use a connection string if your application's ClientSecret contains a `;` character.

## Binding support

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ spec:
type: bindings.azure.storagequeues
version: v1
metadata:
- name: storageAccount
- name: accountName
value: "account1"
- name: storageAccessKey
- name: accountKey
value: "***********"
- name: queue
- name: queueName
value: "myqueue"
- name: ttlInSeconds
value: "60"
- name: decodeBase64
value: "false"
- name: queueEndpointUrl
value: "https://account1.example.com:10001"
# - name: ttlInSeconds
# value: "60"
# - name: decodeBase64
# value: "false"
# - name: endpoint
# value: "http://127.0.0.1:10000"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -43,16 +43,16 @@ The above example uses secrets as plain strings. It is recommended to use a secr

| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|------------|-----|---------|
| storageAccount | Y | Input/Output | The Azure Storage account name | `"account1"` |
| storageAccessKey | Y* | Input/Output | The Azure Storage access key. Only required when not using Azure AD authentication. | `"accessKey"` |
| queue | Y | Input/Output | The name of the Azure Storage queue | `"myqueue"` |
| ttlInSeconds | N | Output | Parameter to set the default message time to live. If this parameter is omitted, messages will expire after 10 minutes. See [also](#specifying-a-ttl-per-message) | `"60"` |
| decodeBase64 | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` |
| queueEndpointUrl | N | Input/Output | Optional custom endpoint URL. This is useful, for example, with "[production-style URLs](https://github.com/Azure/azurite#production-style-url)" when using the [Storage emulator](https://github.com/Azure/azurite). This is also potentially useful when using custom domains for Azure Storage, although this hasn't been tested (yet). Other possible use-cases include integration testing, debugging, or any other scenario in which one might have the inclination to instruct this Dapr binding to direct its API requests to a specific URL. | `"https://accountName.queue.example.com:10001"` |
| `accountName` | Y | Input/Output | The name of the Azure Storage account | `"account1"` |
| `accountKey` | Y* | Input/Output | The access key of the Azure Storage account. Only required when not using Azure AD authentication. | `"access-key"` |
| `queueName` | Y | Input/Output | The name of the Azure Storage queue | `"myqueue"` |
| `ttlInSeconds` | N | Output | Parameter to set the default message time to live. If this parameter is omitted, messages will expire after 10 minutes. See [also](#specifying-a-ttl-per-message) | `"60"` |
| `decodeBase64` | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` |
| `endpoint` | N | Input/Output | Optional custom endpoint URL. This is useful when using the [Azurite emulator](https://github.com/Azure/azurite) or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (`http://` or `https://`), the IP or FQDN, and optional port. | `"http://127.0.0.1:10000"` or `"https://accountName.queue.example.com"` |

### Azure Active Directory (Azure AD) authentication

The Azure Storage queue binding component supports authentication using all Azure Active Directory mechanisms. See the [docs for authenticating to Azure]({{< ref authenticating-azure.md >}}) to learn more about the relevant component metadata fields based on your choice of Azure AD authentication mechanism.
The Azure Storage Queue binding component supports authentication using all Azure Active Directory mechanisms. See the [docs for authenticating to Azure]({{< ref authenticating-azure.md >}}) to learn more about the relevant component metadata fields based on your choice of Azure AD authentication mechanism.

## Binding support

Expand Down Expand Up @@ -85,6 +85,7 @@ curl -X POST http://localhost:3500/v1.0/bindings/myStorageQueue \
"operation": "create"
}'
```

## Related links

- [Basic schema for a Dapr component]({{< ref component-schema >}})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| Field | Required | Details | Example |
|--------------------|:--------:|---------|---------|
| accountName | Y | The storage account name | `"mystorageaccount"`.
| accountKey | Y (unless using Azure AD) | Primary or secondary storage key | `"key"`
| containerName | Y | The name of the container to be used for Dapr state. The container will be created for you if it doesn't exist | `"container"`
| `accountName` | Y | The storage account name | `"mystorageaccount"`.
| `accountKey` | Y (unless using Azure AD) | Primary or secondary storage key | `"key"`
| `containerName` | Y | The name of the container to be used for Dapr state. The container will be created for you if it doesn't exist | `"container"`
| `azureEnvironment` | N | Optional name for the Azure environment if using a different Azure cloud | `"AZUREPUBLICCLOUD"` (default value), `"AZURECHINACLOUD"`, `"AZUREUSGOVERNMENTCLOUD"`, `"AZUREGERMANCLOUD"`
| ContentType | N | The blob's content type | `"text/plain"`
| ContentMD5 | N | The blob's MD5 hash | `"vZGKbMRDAnMs4BIwlXaRvQ=="`
| ContentEncoding | N | The blob's content encoding | `"UTF-8"`
| ContentLanguage | N | The blob's content language | `"en-us"`
| ContentDisposition | N | The blob's content disposition. Conveys additional information about how to process the response payload | `"attachment"`
| CacheControl | N | The blob's cache control | `"no-cache"`
| `endpoint` | N | Optional custom endpoint URL. This is useful when using the [Azurite emulator](https://github.com/Azure/azurite) or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (`http://` or `https://`), the IP or FQDN, and optional port. | `"http://127.0.0.1:10000"`
| `ContentType` | N | The blob's content type | `"text/plain"`
| `ContentMD5` | N | The blob's MD5 hash | `"vZGKbMRDAnMs4BIwlXaRvQ=="`
| `ContentEncoding` | N | The blob's content encoding | `"UTF-8"`
| `ContentLanguage` | N | The blob's content language | `"en-us"`
| `ContentDisposition` | N | The blob's content disposition. Conveys additional information about how to process the response payload | `"attachment"`
| `CacheControl` | N | The blob's cache control | `"no-cache"`

## Setup Azure Blob Storage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ spec:
value: <REPLACE-WITH-ACCOUNT-KEY>
- name: tableName
value: <REPLACE-WITH-TABLE-NAME>
- name: cosmosDbMode
value: false
# - name: cosmosDbMode
# value: false
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -38,12 +38,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr

| Field | Required | Details | Example |
|--------------------|:--------:|---------|---------|
| accountName | Y | The storage account name | `"mystorageaccount"`.
| accountKey | Y | Primary or secondary storage key | `"key"`
| tableName | Y | The name of the table to be used for Dapr state. The table will be created for you if it doesn't exist | `"table"`
| cosmosDbMode | N | If enabled, connects to Cosmos DB Table API instead of Azure Tables (Storage Accounts). Defaults to `false`. | `"false"`
| serviceURL | N | The full storage service endpoint URL. Useful for Azure environments other than public cloud. | `"https://mystorageaccount.table.core.windows.net/"`
| skipCreateTable | N | Skips the check for and, if necessary, creation of the specified storage table. This is useful when using active directory authentication with minimal privileges. Defaults to `false`. | `"true"`
| `accountName` | Y | The storage account name | `"mystorageaccount"`.
| `accountKey` | Y | Primary or secondary storage key | `"key"`
| `tableName` | Y | The name of the table to be used for Dapr state. The table will be created for you if it doesn't exist | `"table"`
| `cosmosDbMode` | N | If enabled, connects to Cosmos DB Table API instead of Azure Tables (Storage Accounts). Defaults to `false`. | `"false"`
| `serviceURL` | N | The full storage service endpoint URL. Useful for Azure environments other than public cloud. | `"https://mystorageaccount.table.core.windows.net/"`
| `skipCreateTable` | N | Skips the check for and, if necessary, creation of the specified storage table. This is useful when using active directory authentication with minimal privileges. Defaults to `false`. | `"true"`

### Azure Active Directory (Azure AD) authentication

Expand Down

0 comments on commit d5a8227

Please sign in to comment.