Skip to content

Commit 662ee93

Browse files
authored
Merge pull request #4856 from marcduiker/upmerge-09-03
Upmerge from 1.15 into 1.16
2 parents 20ae93a + c593c77 commit 662ee93

File tree

29 files changed

+614
-93
lines changed

29 files changed

+614
-93
lines changed

daprdocs/content/en/concepts/dapr-services/placement.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,22 @@ updatedAt | timestamp | Timestamp of the actor registered/updated.
9393
}
9494
```
9595

96+
## Disabling the Placement service
97+
98+
99+
The Placement service can be disabled with the following setting:
100+
101+
102+
```
103+
global.actors.enabled=false
104+
```
105+
106+
The Placement service is not deployed with this setting in Kubernetes mode. This not only disables actor deployment, but also disables workflows, given that workflows use actors. This setting only applies in Kubernetes mode, however initializing Dapr with `--slim` excludes the Placement service from being deployed in self-hosted mode.
107+
108+
109+
For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page](https://docs.dapr.io/operations/hosting/kubernetes/).
110+
111+
96112
## Related links
97113

98-
[Learn more about the Placement API.]({{% ref placement_api %}})
114+
[Learn more about the Placement API.]({{% ref placement_api %}})

daprdocs/content/en/developing-applications/building-blocks/bindings/howto-bindings.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ The code examples below leverage Dapr SDKs to invoke the output bindings endpoin
112112

113113
Here's an example of using a console app with top-level statements in .NET 6+:
114114

115-
Here's an example of using a console app with top-level statements in .NET 6+:
116-
117115
```csharp
118116
using System.Text;
119117
using System.Threading.Tasks;

daprdocs/content/en/developing-applications/building-blocks/bindings/howto-triggers.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ Below are code examples that leverage Dapr SDKs to demonstrate an input binding.
121121

122122
The following example demonstrates how to configure an input binding using ASP.NET Core controllers.
123123

124-
The following example demonstrates how to configure an input binding using ASP.NET Core controllers.
125-
126124
```csharp
127125
using System.Collections.Generic;
128126
using System.Threading.Tasks;
@@ -152,6 +150,15 @@ app.MapPost("checkout", ([FromBody] int orderId) =>
152150
});
153151
```
154152

153+
The following example demonstrates how to configure the same input binding using a minimal API approach:
154+
```csharp
155+
app.MapPost("checkout", ([FromBody] int orderId) =>
156+
{
157+
Console.WriteLine($"Received Message: {orderId}");
158+
return $"CID{orderId}"
159+
});
160+
```
161+
155162
{{% /tab %}}
156163

157164
{{% tab "Java" %}}

daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Want to put the Dapr conversation API to the test? Walk through the following qu
5959

6060
| Quickstart/tutorial | Description |
6161
| ------------------- | ----------- |
62-
| [Conversation quickstart]({{% ref conversation-quickstart %}}) | Learn how to interact with Large Language Models (LLMs) using the conversation API. |
62+
| [Conversation quickstart]({{% ref conversation-quickstart %}}) | Learn how to interact with Large Language Models (LLMs) using the conversation API. |
6363

6464
### Start using the conversation API directly in your app
6565

daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-raw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Dapr apps can subscribe to raw messages from pub/sub topics, even if they weren
111111

112112
### Programmatically subscribe to raw events
113113

114-
When subscribing programmatically, add the additional metadata entry for `rawPayload` to allow the subscriber to receive a message that is not wrapped by a CloudEvent. For .NET, this metadata entry is called `rawPayload`.
114+
When subscribing programmatically, add the additional metadata entry for `rawPayload` to allow the subscriber to receive a message that is not wrapped by a CloudEvent. For .NET, this metadata entry is called `isRawPayload`.
115115

116116
When using raw payloads the message is always base64 encoded with content type `application/octet-stream`.
117117

daprdocs/content/en/developing-applications/integrations/Azure/azure-authentication/authenticating-azure.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,41 @@ aliases:
99
weight: 10000
1010
---
1111

12-
Most Azure components for Dapr support authenticating with Microsoft Entra ID. Thanks to this:
13-
14-
- Administrators can leverage all the benefits of fine-tuned permissions with Azure Role-Based Access Control (RBAC).
15-
- Applications running on Azure services such as Azure Container Apps, Azure Kubernetes Service, Azure VMs, or any other Azure platform services can leverage [Managed Identities (MI)](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) and [Workload Identity](https://learn.microsoft.com/azure/aks/workload-identity-overview). These offer the ability to authenticate your applications without having to manage sensitive credentials.
16-
1712
## About authentication with Microsoft Entra ID
1813

19-
Microsoft Entra ID is Azure's identity and access management (IAM) solution, which is used to authenticate and authorize users and services.
14+
Microsoft Entra ID is Azure's identity and access management (IAM) solution, which is used to authenticate and authorize users and services. It's built on top of open standards such OAuth 2.0, which allows services (applications) to obtain access tokens to make requests to Azure services, including Azure Storage, Azure Service Bus, Azure Key Vault, Azure Cosmos DB, Azure Database for Postgres, Azure SQL, etc.
2015

21-
Microsoft Entra ID is built on top of open standards such OAuth 2.0, which allows services (applications) to obtain access tokens to make requests to Azure services, including Azure Storage, Azure Service Bus, Azure Key Vault, Azure Cosmos DB, Azure Database for Postgres, Azure SQL, etc.
16+
## Options to authenticate
2217

23-
> In Azure terminology, an application is also called a "Service Principal".
18+
Applications can authenticate with Microsoft Entra ID and obtain an access token to make requests to Azure services through several methods:
2419

25-
Some Azure components offer alternative authentication methods, such as systems based on "shared keys" or "access tokens". Although these are valid and supported by Dapr, you should authenticate your Dapr components using Microsoft Entra ID whenever possible to take advantage of many benefits, including:
20+
- [Workload identity federation]({{< ref howto-wif.md >}}) - The recommended way to configure your Microsoft Entra ID tenant to trust an external identity provider. This includes service accounts from Kubernetes or AKS clusters. [Learn more about workload identity federation](https://learn.microsoft.com/entra/workload-id/workload-identities-overview).
21+
- [System and user assigned managed identities]({{< ref howto-mi.md >}}) - Less granular than workload identity federation, but retains some of the benefits. [Learn more about system and user assigned managed identities](https://learn.microsoft.com/azure/aks/use-managed-identity).
22+
- [Client ID and secret]({{ < ref howto-aad.md >}}) - Not recommended as it requires you to maintian and associate credentials at the application level.
23+
- Pod Identities - [Deprecated approach for authenticating applications running on Kubernetes pods](https://learn.microsoft.com/azure/aks/use-azure-ad-pod-identity) at a pod level. This should no longer be used.
2624

27-
- [Managed Identities and Workload Identity](#managed-identities-and-workload-identity)
28-
- [Role-Based Access Control](#role-based-access-control)
29-
- [Auditing](#auditing)
30-
- [(Optional) Authentication using certificates](#optional-authentication-using-certificates)
25+
If you are just getting started, it is recommended to use workload identity federation.
26+
27+
## Managed identities and workload identity federation
3128

32-
### Managed Identities and Workload Identity
29+
When your application is running on a supported Azure service (such as Azure VMs, Azure Container Apps, Azure Web Apps, etc), an identity for your application can be assigned at the infrastructure level.
3330

34-
With Managed Identities (MI), your application can authenticate with Microsoft Entra ID and obtain an access token to make requests to Azure services. When your application is running on a supported Azure service (such as Azure VMs, Azure Container Apps, Azure Web Apps, etc), an identity for your application can be assigned at the infrastructure level.
31+
This is done through [system or user assigned managed identities]({{< ref howto-mi.md >}}), or [workload identity federation]({{< ref howto-wif.md >}}).
3532

36-
Once using MI, your code doesn't have to deal with credentials, which:
33+
Once using managed identities, your code doesn't have to deal with credentials, which:
3734

3835
- Removes the challenge of managing credentials safely
3936
- Allows greater separation of concerns between development and operations teams
4037
- Reduces the number of people with access to credentials
4138
- Simplifies operational aspects–especially when multiple environments are used
4239

43-
Applications running on Azure Kubernetes Service can similarly leverage [Workload Identity](https://learn.microsoft.com/azure/aks/workload-identity-overview) to automatically provide an identity to individual pods.
40+
While some Dapr Azure components offer alternative authentication methods, such as systems based on "shared keys" or "access tokens", you should always try to authenticate your Dapr components using Microsoft Entra ID whenever possible. This offers many benefits, including:
41+
42+
- [Role-Based Access Control](#role-based-access-control)
43+
- [Auditing](#auditing)
44+
- [(Optional) Authentication using certificates](#optional-authentication-using-certificates)
45+
46+
It's recommended that applications running on Azure Kubernetes Service leverage [workload identity federation](https://learn.microsoft.com/entra/workload-id/workload-identity-federation) to automatically provide an identity to individual pods.
4447

4548
### Role-Based Access Control
4649

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
type: docs
3+
title: "How to: Use workload identity federation"
4+
linkTitle: "How to: Use workload identity federation"
5+
weight: 20000
6+
description: "Learn how to configure Dapr to use workload identity federation on Azure."
7+
---
8+
9+
This guide will help you configure your Kubernetes cluster to run Dapr with Azure workload identity federation.
10+
11+
## What is it?
12+
13+
[Workload identity federation](https://learn.microsoft.com/entra/workload-id/workload-identities-overview)
14+
is a way for your applications to authenticate to Azure without having to store or manage credentials as part of
15+
your releases.
16+
17+
By using workload identity federation, any Dapr components running on Kubernetes and AKS that target Azure can authenticate transparently
18+
with no extra configuration.
19+
20+
## Guide
21+
22+
We'll show how to configure an Azure Key Vault resource against your AKS cluster. You can adapt this guide for different
23+
Dapr Azure components by substituting component definitions as necessary.
24+
25+
For this How To, we'll use this [Dapr AKS secrets sample app](https://github.com/dapr/samples/dapr-aks-workload-identity-federation).
26+
27+
### Prerequisites
28+
29+
- AKS cluster with workload identity enabled
30+
- Microsoft Entra ID tenant
31+
32+
### 1 - Enable workload identity federation
33+
34+
Follow [the Azure documentation for enabling workload identity federation on your AKS cluster](https://learn.microsoft.com/azure/aks/workload-identity-deploy-cluster#deploy-your-application4).
35+
36+
The HowTo walks through configuring your Azure Entra ID tenant to trust an identity that originates from your AKS cluster issuer.
37+
It also guides you in setting up a [Kubernetes service account](https://kubernetes.io/docs/concepts/security/service-accounts/) which
38+
is associated with an Azure managed identity you create.
39+
40+
Once completed, return here to continue with step 2.
41+
42+
### 2 - Add a secret to Azure Key Vault
43+
44+
In the Azure Key Vault you created and add a secret called `dapr` with the value of `Hello Dapr!`.
45+
46+
### 3 - Configure the Azure Key Vault dapr component
47+
48+
By this point, you should have a Kubernetes service account with a name similar to `workload-identity-sa0a1b2c`.
49+
50+
Apply the following to your Kubernetes cluster, remembering to update `your-key-vault` with the name of your key vault:
51+
52+
```yaml
53+
---
54+
apiVersion: dapr.io/v1alpha1
55+
kind: Component
56+
metadata:
57+
name: demo-secret-store # Be sure not to change this, as our app will be looking for it.
58+
spec:
59+
type: secretstores.azure.keyvault
60+
version: v1
61+
metadata:
62+
- name: vaultName
63+
value: your-key-vault # Replace
64+
```
65+
66+
You'll notice that we have not provided any details specific to authentication in the component definition. This is intentional, as Dapr is able to leverage the Kubernetes service account to transparently authenticate to Azure.
67+
68+
### 4 - Deploy the test application
69+
70+
Go to the [workload identity federation sample application](https://github.com/dapr/samples/dapr-aks-workload-identity-federation) and prepare a build of the image.
71+
72+
Make sure the image is pushed up to a registry that your AKS cluster has visibility and permission to pull from.
73+
74+
Next, create a deployment for our sample AKS secrets app container along with a Dapr sidecar.
75+
76+
Remember to update `dapr-wif-k8s-service-account` with your service account name and `dapraksworkloadidentityfederation` with an image your cluster can resolve:
77+
78+
79+
```yaml
80+
---
81+
apiVersion: apps/v1
82+
kind: Deployment
83+
metadata:
84+
name: aks-dapr-wif-secrets
85+
labels:
86+
app: aks-dapr-wif-secrets
87+
spec:
88+
replicas: 1
89+
selector:
90+
matchLabels:
91+
app: aks-dapr-wif-secrets
92+
template:
93+
metadata:
94+
labels:
95+
app: aks-dapr-wif-secrets
96+
azure.workload.identity/use: "true" # Important
97+
annotations:
98+
dapr.io/enabled: "true" # Enable Dapr
99+
dapr.io/app-id: "aks-dapr-wif-secrets"
100+
spec:
101+
serviceAccountName: dapr-wif-k8s-service-account # Remember to replace
102+
containers:
103+
- name: workload-id-demo
104+
image: dapraksworkloadidentityfederation # Remember to replace
105+
imagePullPolicy: Always
106+
```
107+
Once the application is up and running, it should output the following:
108+
109+
```
110+
Fetched Secret: Hello dapr!
111+
```

daprdocs/content/en/developing-applications/local-development/sdk-serialization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Content-Length: 12
8181
client.saveState("MyStateStore", "MyKey", "My Message").block();
8282
```
8383

84+
In this example, `My Message` is saved. It is not quoted because Dapr's API internally parse the JSON request object before saving it.
85+
8486
{{% /tab %}}
8587

8688
{{< /tabpane >}}
@@ -100,9 +102,7 @@ serving it.
100102
await client.PublishEventAsync("MyPubSubName", "TopicName", "My Message");
101103
```
102104

103-
The event is published and the content is serialized to `byte[]` and sent to Dapr sidecar. The subscriber receives it
104-
as a [CloudEvent](https://github.com/cloudevents/spec). Cloud event defines `data` as string. The Dapr SDK also provides a built-in deserializer
105-
for the `CloudEvent` object.
105+
The event is published and the content is serialized to `byte[]` and sent to Dapr sidecar. The subscriber receives it as a [CloudEvent](https://github.com/cloudevents/spec). Cloud event defines `data` as string. The Dapr SDK also provides a built-in deserializer for the `CloudEvent` object.
106106

107107
```csharp
108108
public async Task<IActionResult> HandleMessage(string message)

daprdocs/content/en/operations/configuration/secret-scope.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ description: "Define secret scopes by augmenting the existing configuration reso
77
description: "Define secret scopes by augmenting the existing configuration resource with restrictive permissions."
88
---
99

10-
In addition to [scoping which applications can access a given component]({{% ref "component-scopes.md"%}}), you can also scope a named secret store component to one or more secrets for an application. By defining `allowedSecrets` and/or `deniedSecrets` lists, you restrict applications to access only specific secrets.
1110
In addition to [scoping which applications can access a given component]({{% ref "component-scopes.md"%}}), you can also scope a named secret store component to one or more secrets for an application. By defining `allowedSecrets` and/or `deniedSecrets` lists, you restrict applications to access only specific secrets.
1211

1312
For more information about configuring a Configuration resource:

daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ kubectl delete pvc -n dapr-system dapr-scheduler-data-dir-dapr-scheduler-server-
8585
Persistent Volume Claims are not deleted automatically with an [uninstall]({{< ref dapr-uninstall.md >}}). This is a deliberate safety measure to prevent accidental data loss.
8686
{{% /alert %}}
8787

88+
{{% alert title="Note" color="primary" %}}
89+
For storage providers that do NOT support dynamic volume expansion: If Dapr has ever been installed on the cluster before, the Scheduler's Persistent Volume Claims must be manually uninstalled in order for new ones with increased storage size to be created.
90+
```bash
91+
kubectl delete pvc -n dapr-system dapr-scheduler-data-dir-dapr-scheduler-server-0 dapr-scheduler-data-dir-dapr-scheduler-server-1 dapr-scheduler-data-dir-dapr-scheduler-server-2
92+
```
93+
Persistent Volume Claims are not deleted automatically with an [uninstall]({{< ref dapr-uninstall.md >}}). This is a deliberate safety measure to prevent accidental data loss.
94+
{{% /alert %}}
95+
8896
#### Increase existing Scheduler Storage Size
8997

9098
{{% alert title="Warning" color="warning" %}}

0 commit comments

Comments
 (0)