Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upmerge 1.12 --> 1.13 #3976

Merged
merged 42 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
27e481b
update 1.11 docs branch for release
hhunter-ms Sep 20, 2023
47b9d7d
Merge branch 'v1.11' into endgame_v1.11
hhunter-ms Oct 10, 2023
c482024
Merge pull request #3751 from hhunter-ms/endgame_v1.11
hhunter-ms Oct 11, 2023
f0ef4b9
update s3 bindings links (#3782)
martbln Oct 17, 2023
d9ee1f3
1.11 update supported releases up to 1.11.6
JoshVanL Nov 20, 2023
d68b3bc
v1.11 fix links (#3877)
JoshVanL Nov 21, 2023
b814217
Merge branch 'v1.11' into v1.11-supported-releases-1.11.6
msfussell Nov 21, 2023
60f4fe3
Merge pull request #3874 from JoshVanL/v1.11-supported-releases-1.11.6
hhunter-ms Nov 21, 2023
910e69b
Add new operations in the query request for state component
luigirende Dec 16, 2023
710933b
Merge branch 'v1.12' into v1.12
hhunter-ms Dec 21, 2023
6bcddf9
add latest version (#3936)
hhunter-ms Jan 3, 2024
06ac5ac
Merge branch 'v1.12' into v1.12
msfussell Jan 4, 2024
08939fc
Update multi-app-template.md (#3943)
farshaddavoudi Jan 5, 2024
20494df
Specifying the behaviour of the ConsumerID field when configuring Kaf…
KrylixZA Jan 5, 2024
174c510
[AWS SSM parameter store] Add prefix option (#3920)
hhunter-ms Jan 6, 2024
5c132e6
Adding write performance optimization section to Cosmos DB state stor…
KrylixZA Jan 9, 2024
dca4801
Merge branch 'v1.12' into v1.12
msfussell Jan 9, 2024
2602ab4
Merge pull request #3906 from luigirende/v1.12
hhunter-ms Jan 10, 2024
946c2c8
Add devcontainer to improve developer experience for contributors (#3…
marcduiker Jan 11, 2024
390de66
Describing Kafka consumer behaviour when consuming from multiple topi…
KrylixZA Jan 11, 2024
71a5b99
New hotfix patch for v1.12.4 (#3960)
msfussell Jan 18, 2024
4a528ad
Add link to Docs contributor video and update CodeSpaces page (#3963)
marcduiker Jan 21, 2024
18785e4
Update kubernetes-deploy.md (#3964)
ytimocin Jan 21, 2024
3dc5218
Added Crypto API reference documentation (#3952)
WhitWaldo Jan 23, 2024
2322207
Update step 5 of pubsub-quickstart.md
jhberge Jan 23, 2024
928acb3
Added note explaining that use of the SDKs is preferred over HTTP API…
WhitWaldo Jan 24, 2024
4b389d3
Add Instructions to add Kubernetes Metrics server to Kind (#3970)
prashantrewar Jan 26, 2024
d600ba6
resolve merge conflict
hhunter-ms Jan 26, 2024
c43c36b
go submodules
hhunter-ms Jan 26, 2024
0b03f6f
java submodule
hhunter-ms Jan 26, 2024
482dbc1
js submodule
hhunter-ms Jan 26, 2024
b5dbf2e
dotnet submodules
hhunter-ms Jan 26, 2024
8137597
python submodule
hhunter-ms Jan 26, 2024
d02f303
Update daprdocs/content/en/getting-started/quickstarts/pubsub-quickst…
hhunter-ms Jan 26, 2024
9a1c4f3
Merge branch 'v1.12' into patch-1
hhunter-ms Jan 26, 2024
42908ba
Merge pull request #3966 from jhberge/patch-1
hhunter-ms Jan 26, 2024
fdca99f
Merge branch 'v1.12' into upmerge_01-26b
hhunter-ms Jan 26, 2024
712d916
Merge branch 'v1.12' into submodules_1.12_01-26
hhunter-ms Jan 26, 2024
f056b0b
Merge pull request #3973 from hhunter-ms/upmerge_01-26b
hhunter-ms Jan 26, 2024
eafe414
Merge branch 'v1.12' into submodules_1.12_01-26
hhunter-ms Jan 26, 2024
29801a9
Merge pull request #3974 from hhunter-ms/submodules_1.12_01-26
hhunter-ms Jan 26, 2024
0fcbd0a
upmerge
hhunter-ms Jan 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/hugo:1": {
"extended": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
"nvmVersion": "latest"
}
},
"customizations": {
"vscode": {
"extensions": [
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"davidanson.vscode-markdownlint",
"budparr.language-hugo-vscode"
],
"settings": {
"git.alwaysSignOff": true
}
}
},
"forwardPorts": [1313],
"postAttachCommand": "bash scripts/init-container.sh"
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,44 @@ The Dapr docs are built using [Hugo](https://gohugo.io/) with the [Docsy](https:

The [daprdocs](./daprdocs) directory contains the hugo project, markdown files, and theme configurations.

## Pre-requisites
## Setup with a devcontainer

- [Hugo extended version](https://gohugo.io/getting-started/installing)
- [Node.js](https://nodejs.org/en/)
This repository comes with a [devcontainer](/.devcontainer/devcontainer.json) configuration that automatically installs all the required dependencies and VSCode extensions to build and run the docs.

This devcontainer can be used to develop locally with VSCode or via GitHub Codespaces completely in the browser. Other IDEs that support [devcontainers](https://containers.dev/) can be used but won't have the extensions preconfigured and will likely have different performance characteristics.

### Pre-requisites

## Environment setup
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
- [VSCode](https://code.visualstudio.com/download)

1. Ensure pre-requisites are installed
2. Clone this repository
### Environment setup

1. [Fork](https://github.com/dapr/docs/fork) and clone this repository.

1. Open the forked repository in VS Code

```sh
git clone https://github.com/dapr/docs.git
code .
```

3. Change to daprdocs directory:
1. When prompted, click "Reopen in Container" to open the repository in the devcontainer.

Continue with the [Run local server](#run-local-server) steps.

## Setup without a devcontainer

### Pre-requisites

- [Hugo extended version](https://gohugo.io/getting-started/installing)
- [Node.js](https://nodejs.org/en/)

### Environment setup

1. Ensure pre-requisites are installed.
1. [Fork](https://github.com/dapr/docs/fork) and clone this repository.

1. Change to daprdocs directory:

```sh
cd ./daprdocs
Expand All @@ -63,7 +86,7 @@ npm install

## Run local server

1. Make sure you're still in the `daprdocs` directory
1. Make sure you're in the `daprdocs` directory
2. Run

```sh
Expand All @@ -72,14 +95,13 @@ hugo server

3. Navigate to `http://localhost:1313/`


## Update docs

1. Fork repo into your account
1. Create new branch
1. Commit and push changes to forked branch
1. Submit pull request from downstream branch to the upstream branch for the correct version you are targeting
1. Staging site will automatically get created and linked to PR to review and test
1. Ensure you are in your forked repo
2. Create new branch
3. Commit and push changes to forked branch
4. Submit pull request from downstream branch to the upstream branch for the correct version you are targeting
5. Staging site will automatically get created and linked to PR to review and test

## Code of Conduct

Expand Down
1 change: 1 addition & 0 deletions daprdocs/content/en/contributing/codespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ If you haven't already forked the repo, creating the Codespace will also create
- [dapr/dapr](https://github.com/dapr/dapr)
- [dapr/components-contrib](https://github.com/dapr/components-contrib)
- [dapr/cli](https://github.com/dapr/cli)
- [dapr/docs](https://github.com/dapr/docs)
- [dapr/python-sdk](https://github.com/dapr/python-sdk)

## Developing Dapr Components in a Codespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ description: Get started with contributing to the Dapr docs

In this guide, you'll learn how to contribute to the [Dapr docs repository](https://github.com/dapr/docs). Since Dapr docs are published to [docs.dapr.io](https://docs.dapr.io), you must make sure your contributions compile and publish correctly.

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/uPYuXcaEs-c" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

## Prerequisites

Before contributing to the Dapr docs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@ Watch this [demo video of the Cryptography API from the Dapr Community Call #83]

## Related links
- [Cryptography overview]({{< ref cryptography-overview.md >}})
- [Cryptography component specs]({{< ref supported-cryptography >}})
- [Cryptography component specs]({{< ref supported-cryptography >}})
- [Cryptography API reference doc]({{< ref cryptography_api >}})
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ The `filter` specifies the query conditions in the form of a tree, where each no

The following operations are supported:

| Operator | Operands | Description |
|----------|-------------|--------------|
| `EQ` | key:value | key == value |
| Operator | Operands | Description |
|----------|-------------|--------------------------------------------------------------|
| `EQ` | key:value | key == value |
| `NEQ` | key:value | key != value |
| `GT` | key:value | key > value |
| `GTE` | key:value | key >= value |
| `LT` | key:value | key < value |
| `LTE` | key:value | key <= value |
| `IN` | key:[]value | key == value[0] OR key == value[1] OR ... OR key == value[n] |
| `AND` | []operation | operation[0] AND operation[1] AND ... AND operation[n] |
| `OR` | []operation | operation[0] OR operation[1] OR ... OR operation[n] |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ apps:

The following rules apply for all the paths present in the template file:
- If the path is absolute, it is used as is.
- All relative paths under command section should be provided relative to the template file path.
- All relative paths under common section should be provided relative to the template file path.
- `appDirPath` under apps section should be provided relative to the template file path.
- All relative paths under app section should be provided relative to the `appDirPath`.
- All other relative paths under apps section should be provided relative to the `appDirPath`.

{{% /codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ with DaprClient() as client:

### Step 5: View the Pub/sub outputs

Notice, as specified in the code above, the publisher pushes a random number to the Dapr sidecar while the subscriber receives it.
The publisher sends orders to the Dapr sidecar while the subscriber receives them.

Publisher output:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,43 @@ If you are using Docker Desktop, verify that you have [the recommended settings]

1. Navigate to `http://localhost:9999` to validate a successful setup.

## Install metrics-server on the Kind Kubernetes Cluster

1. Get metrics-server manifests

```bash
wget https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
```

1. Add insecure TLS parameter to the components.yaml file

```yaml
metadata:
labels:
k8s-app: metrics-server
spec:
containers:
- args:
- --cert-dir=/tmp
- --secure-port=4443
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --kubelet-insecure-tls <==== Add this
- --metric-resolution=15s
image: k8s.gcr.io/metrics-server/metrics-server:v0.6.2
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /livez
```

1. Apply modified manifest

```bash
kubectl apply -f components.yaml
```

## Related links
- [Try out a Dapr quickstart]({{< ref quickstarts.md >}})
- Learn how to [deploy Dapr on your cluster]({{< ref kubernetes-deploy.md >}})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ To use Mariner-based images for Dapr, you need to add `-mariner` to your Docker
In the Dapr CLI, you can switch to using Mariner-based images with the `--image-variant` flag.

```sh
dapr init --image-variant mariner
dapr init -k --image-variant mariner
```

{{% /codetab %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The table below shows the versions of Dapr releases that have been tested togeth

| Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes |
|--------------------|:--------:|:--------|---------|---------|---------|------------|
| January 17th 2024 | 1.12.4</br> | 1.12.0 | Java 1.10.0 </br>Go 1.9.1 </br>PHP 1.2.0 </br>Python 1.12.0 </br>.NET 1.12.0 </br>JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.4) |
| January 2nd 2024 | 1.12.3</br> | 1.12.0 | Java 1.10.0 </br>Go 1.9.1 </br>PHP 1.2.0 </br>Python 1.12.0 </br>.NET 1.12.0 </br>JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.3) |
| November 18th 2023 | 1.12.2</br> | 1.12.0 | Java 1.10.0 </br>Go 1.9.1 </br>PHP 1.2.0 </br>Python 1.12.0 </br>.NET 1.12.0 </br>JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.2) |
| November 16th 2023 | 1.12.1</br> | 1.12.0 | Java 1.10.0 </br>Go 1.9.1 </br>PHP 1.2.0 </br>Python 1.12.0 </br>.NET 1.12.0 </br>JS 3.2.0 | 0.14.0 | Supported | [v1.12.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.1) |
| October 11th 2023 | 1.12.0</br> | 1.12.0 | Java 1.10.0 </br>Go 1.9.0 </br>PHP 1.1.0 </br>Python 1.11.0 </br>.NET 1.12.0 </br>JS 3.1.2 | 0.14.0 | Supported | [v1.12.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.0) |
Expand Down Expand Up @@ -120,7 +122,8 @@ General guidance on upgrading can be found for [self hosted mode]({{< ref self-h
| 1.9.0 | N/A | 1.9.6 |
| 1.10.0 | N/A | 1.10.8 |
| 1.11.0 | N/A | 1.11.4 |
| 1.12.0 | N/A | 1.12.0 |
| 1.12.0 | N/A | 1.12.4 |



## Upgrade on Hosting platforms
Expand Down
131 changes: 131 additions & 0 deletions daprdocs/content/en/reference/api/cryptography_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
type: docs
title: "Cryptography API reference"
linkTitle: "Cryptography API"
description: "Detailed documentation on the cryptography API"
weight: 1300
---

Dapr provides cross-platform and cross-language support for encryption and decryption support via the
cryptography building block. Besides the [language specific SDKs]({{<ref sdks>}}), a developer can invoke these capabilities using
the HTTP API endpoints below.

> The HTTP APIs are intended for development and testing only. For production scenarios, the use of the SDKs is strongly
> recommended as they implement the gRPC APIs providing higher performance and capability than the HTTP APIs.

## Encrypt Payload

This endpoint lets you encrypt a value provided as a byte array using a specified key and crypto component.

### HTTP Request

```
PUT http://localhost:<daprPort>/v1.0/crypto/<crypto-store-name>/encrypt
```

#### URL Parameters
| Parameter | Description |
|-------------------|-------------------------------------------------------------|
| daprPort | The Dapr port |
| crypto-store-name | The name of the crypto store to get the encryption key from |

> Note, all URL parameters are case-sensitive.

#### Headers
Additional encryption parameters are configured by setting headers with the appropriate
values. The following table details the required and optional headers to set with every
encryption request.

| Header Key | Description | Allowed Values | Required |
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|----------------------------------------------------------|
| dapr-key-name | The name of the key to use for the encryption operation | | Yes |
| dapr-key-wrap-algorithm | The key wrap algorithm to use | `A256KW`, `A128CBC`, `A192CBC`, `RSA-OAEP-256` | Yes |
| dapr-omit-decryption-key-name | If true, omits the decryption key name from header `dapr-decryption-key-name` from the output. If false, includes the specified decryption key name specified in header `dapr-decryption-key-name`. | The following values will be accepted as true: `y`, `yes`, `true`, `t`, `on`, `1` | No |
| dapr-decryption-key-name | If `dapr-omit-decryption-key-name` is true, this contains the name of the intended decryption key to include in the output. | | Required only if `dapr-omit-decryption-key-name` is true |
| dapr-data-encryption-cipher | The cipher to use for the encryption operation | `aes-gcm` or `chacha20-poly1305` | No |

### HTTP Response

#### Response Body
The response to an encryption request will have its content type header set to `application/octet-stream` as it
returns an array of bytes with the encrypted payload.

#### Response Codes
| Code | Description |
|------|-------------------------------------------------------------------------|
| 200 | OK |
| 400 | Crypto provider not found |
| 500 | Request formatted correctly, error in dapr code or underlying component |

### Examples
```shell
curl http://localhost:3500/v1.0/crypto/myAzureKeyVault/encrypt \
-X PUT \
-H "dapr-key-name: myCryptoKey" \
-H "dapr-key-wrap-algorithm: aes-gcm" \
-H "Content-Type: application/octet-string" \
--data-binary "\x68\x65\x6c\x6c\x6f\x20\x77\x6f\x72\x6c\x64"
```

> The above command sends an array of UTF-8 encoded bytes representing "hello world" and would return
> a stream of 8-bit values in the response similar to the following containing the encrypted payload:

```bash
gAAAAABhZfZ0Ywz4dQX8y9J0Zl5v7w6Z7xq4jV3cW9o2l4pQ0YD1LdR0Zk7zIYi4n2Ll7t6f0Z4X7r8x9o6a8GyL0X1m9Q0Z0A==
```

## Decrypt Payload

This endpoint lets you decrypt a value provided as a byte array using a specified key and crypto component.

#### HTTP Request

```
PUT curl http://localhost:3500/v1.0/crypto/<crypto-store-name>/decrypt
```

#### URL Parameters

| Parameter | Description |
|-------------------|-------------------------------------------------------------|
| daprPort | The Dapr port |
| crypto-store-name | The name of the crypto store to get the decryption key from |

> Note all parameters are case-sensitive.

#### Headers
Additional decryption parameters are configured by setting headers with the appropriate values. The following table
details the required and optional headers to set with every decryption request.

| Header Key | Description | Required |
|---------------|----------------------------------------------------------|----------|
| dapr-key-name | The name of the key to use for the decryption operation. | Yes |

### HTTP Response

#### Response Body
The response to a decryption request will have its content type header to set `application/octet-stream` as it
returns an array of bytes representing the decrypted payload.

#### Response Codes
| Code | Description |
|------|-------------------------------------------------------------------------|
| 200 | OK |
| 400 | Crypto provider not found |
| 500 | Request formatted correctly, error in dapr code or underlying component |

### Examples
```bash
curl http://localhost:3500/v1.0/crypto/myAzureKeyVault/decrypt \
-X PUT
-H "dapr-key-name: myCryptoKey"\
-H "Content-Type: application/octet-stream" \
--data-binary "gAAAAABhZfZ0Ywz4dQX8y9J0Zl5v7w6Z7xq4jV3cW9o2l4pQ0YD1LdR0Zk7zIYi4n2Ll7t6f0Z4X7r8x9o6a8GyL0X1m9Q0Z0A=="
```

> The above command sends a base-64 encoded string of the encrypted message payload and would return a response with
> the content type header set to `application/octet-stream` returning the response body `hello world`.

```bash
hello world
```
Loading
Loading