-
Notifications
You must be signed in to change notification settings - Fork 756
Configuring middleware in the component #3937
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
Open
hhunter-ms
wants to merge
16
commits into
dapr:v1.13
Choose a base branch
from
hhunter-ms:issue_3917
base: v1.13
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+264
−214
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d337f08
set up docs for configuring middleware components
hhunter-ms 7130359
initial edits
hhunter-ms f72007e
remove new doc; unnecessary
hhunter-ms 338d268
updates
hhunter-ms 9aff7f8
Merge branch 'v1.13' into issue_3917
hhunter-ms 9440d21
add to specs
hhunter-ms b0fa100
Merge branch 'issue_3917' of https://github.com/hhunter-ms/docs into …
hhunter-ms d400ef5
initial review from sadath
hhunter-ms d5bda7d
part 1 of mark review
hhunter-ms 48d4d92
updates per mark
hhunter-ms d228263
update diagrams
hhunter-ms 0783919
update middleware component spec index
hhunter-ms 7ab506d
Merge branch 'v1.13' into issue_3917
hhunter-ms 0a61c36
Merge branch 'v1.13' into issue_3917
hhunter-ms d975e42
Merge branch 'v1.13' into issue_3917
hhunter-ms 3823b64
Merge branch 'v1.13' into issue_3917
hhunter-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...t/en/developing-applications/develop-components/middleware-components/_index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
type: docs | ||
title: "Middleware components" | ||
linkTitle: "Middleware components" | ||
description: "Guidance on how to work with middleware components" | ||
weight: 200 | ||
--- | ||
|
13 changes: 5 additions & 8 deletions
13
.../develop-components/develop-middleware.md → ...ddleware-components/develop-middleware.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -25,18 +25,24 @@ spec: | |||||
value: "<your token audience; i.e. the application's client ID>" | ||||||
- name: issuer | ||||||
value: "<your token issuer, e.g. 'https://accounts.google.com'>" | ||||||
- name: pipelineType | ||||||
value: "httpPipeline" | ||||||
|
||||||
# Optional values | ||||||
- name: priority | ||||||
value: "1" | ||||||
- name: jwksURL | ||||||
value: "<JWKS URL, e.g. 'https://accounts.google.com/.well-known/openid-configuration'>" | ||||||
``` | ||||||
|
||||||
## Spec metadata fields | ||||||
|
||||||
| Field | Required | Details | Example | | ||||||
|-------|:--------:|---------|---------| | ||||||
| Field | Required? | Details | Example | | ||||||
|-------|-----------|---------|---------| | ||||||
| `audience` | Y | The audience expected in the tokens. Usually, this corresponds to the client ID of your application that is created as part of a credential hosted by a OpenID Connect platform. | | ||||||
| `issuer` | Y | The issuer authority, which is the value expected in the issuer claim in the tokens. | `"https://accounts.google.com"` | ||||||
| `pipelineType` | Y | For configuring middleware pipelines. One of the two types of middleware pipeline so you can configure your middleware for either sidecar-to-sidecar communication (`appHttpPipeline`) or sidecar-to-app communication (`httpPipeline`). | `"httpPipeline"`, `"appHttpPipeline"` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This description is wrong for the pipelines. Use one similar to the descriptions here https://docs.dapr.io/operations/components/middleware/
Suggested change
|
||||||
| `priority` | N | For configuring middleware pipeline ordering. The order in which [middleware components]({{< ref middleware.md >}}) are executed. Integer from -MaxInt32 to +MaxInt32. | `"1"` | ||||||
| `jwksURL` | N | Address of the JWKS (JWK Set containing the public keys for verifying tokens). If empty, will try to fetch the URL set in the OpenID Configuration document `<issuer>/.well-known/openid-configuration`. | `"https://accounts.google.com/.well-known/openid-configuration"` | ||||||
|
||||||
Common values for `issuer` include: | ||||||
|
@@ -46,21 +52,14 @@ Common values for `issuer` include: | |||||
- Google: `https://accounts.google.com` | ||||||
- Salesforce (Force.com): `https://login.salesforce.com` | ||||||
|
||||||
## Dapr configuration | ||||||
## Configure | ||||||
|
||||||
To be applied, the middleware must be referenced in [configuration]({{< ref configuration-concept.md >}}). See [middleware pipelines]({{< ref "middleware.md">}}). | ||||||
hhunter-ms marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
You can configure middleware using the following methods: | ||||||
|
||||||
```yaml | ||||||
apiVersion: dapr.io/v1alpha1 | ||||||
kind: Configuration | ||||||
metadata: | ||||||
name: appconfig | ||||||
spec: | ||||||
httpPipeline: | ||||||
handlers: | ||||||
- name: bearer-token | ||||||
type: middleware.http.bearer | ||||||
``` | ||||||
- **Recommended:** Using [the middleware component]({{< ref "middleware.md#using-middleware-components" >}}), just like any other [component]({{< ref components-concept.md >}}), with a YAML file placed into the application resources folder. | ||||||
- Using a [configuration file]({{< ref "middleware.md#using-middleware-components-with-configuration" >}}). | ||||||
|
||||||
See [how to apply middleware pipeline configurations]({{< ref "middleware.md" >}}). | ||||||
|
||||||
## Related links | ||||||
|
||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.