Skip to content

Commit fab992b

Browse files
author
Dylan Souza
committed
Updating docs
1 parent 81ce213 commit fab992b

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

plugins/experimental/uri_signing/README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
URI Signing Plugin
22
==================
33

4-
This remap plugin implements the draft URI Signing protocol documented here:
5-
https://tools.ietf.org/html/draft-ietf-cdni-uri-signing-16 .
4+
This remap plugin implements the draft URI Signing protocol documented [here](https://tools.ietf.org/html/draft-ietf-cdni-uri-signing-16):
65

76
It takes a single argument: the name of a config file that contains key information.
87

@@ -77,16 +76,25 @@ It's worth noting that multiple issuers can provide `auth_directives`.
7776
Each issuer will be processed in order and any issuer can provide access to
7877
a path.
7978

80-
### Token Stripping
79+
### More Configuration Options
8180

82-
When The boolean strip_token parameter is set to true, the plugin removes the
81+
**Strip Token**
82+
When the strip_token parameter is set to true, the plugin removes the
8383
token from both the url that is sent upstream to the origin and the url that
84-
is used as the cache key. It can be set like this:
84+
is used as the cache key. The strip_token parameter defaults to false and should
85+
be set by only one issuer.
86+
**ID**
87+
The id field takes a string indicating the identification of the entity processing the request.
88+
This is used in aud claim checks to ensure that the receiver is the intended audience of a
89+
tokenized request. The id parameter can only be set by one issuer.
90+
91+
Example:
8592

8693
{
8794
"Kabletown URI Authority": {
8895
"renewal_kid": "Second Key",
8996
"strip_token" : true,
97+
"id" : "mycdn",
9098
"auth_directives": [
9199
92100
]
@@ -95,8 +103,6 @@ is used as the cache key. It can be set like this:
95103
]
96104
}
97105

98-
The strip_token parameter defaults to false and should be set by only one issuer.
99-
100106
Usage
101107
-----
102108

@@ -107,17 +113,18 @@ will receive a 403 Forbidden response, instead of receiving content.
107113
Tokens will be found in either of these places:
108114

109115
- A query parameter named `URISigningPackage`. The value must be the JWT.
116+
- A path parameter named `URISigningPackage`. The value must be the JWT.
110117
- A cookie named `URISigningPackage`. The value of the cookie must be the JWT.
111118

112-
Path parameters will not be searched for JWTs.
113-
114119
### Supported Claims
115120

116121
The following claims are understood:
117122

118123
- `iss`: Must be present. The issuer is used to locate the key for verification.
119124
- `sub`: May be present, but is not validated.
120125
- `exp`: Expired tokens are not valid.
126+
- `nbf`: Tokens processed before this time are not valid.
127+
- `aud`: Token aud claim strings must match the configured id to be considered valid.
121128
- `iat`: May be present, but is not validated.
122129
- `cdniv`: Must be missing or 1.
123130
- `cdniuc`: Validated last, after key verificationD. **Only `regex` is supported!**
@@ -129,8 +136,6 @@ The following claims are understood:
129136

130137
These claims are not supported. If they are present, the token will not validate:
131138

132-
- `aud`
133-
- `nbf`
134139
- `jti`
135140
- `cdnicrit`
136141
- `cdniip`

0 commit comments

Comments
 (0)