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

WIP: Traffic Policy module docs #561

Merged
merged 67 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
b84142f
automated generation of docs from buildkite
Jan 31, 2024
cb56c04
starting to piece together some documentation scaffolding for http en…
rkolavo Jan 17, 2024
ebcf8b3
more examples, copypasta to tcp/tls
rkolavo Jan 17, 2024
614e4b8
prettier
rkolavo Jan 17, 2024
7c538e3
rename to traffic policy
rkolavo Jan 19, 2024
43819bd
more examples + rewording
rkolavo Jan 22, 2024
6711872
sidebar for api changes
rkolavo Jan 22, 2024
f051f28
prettier
rkolavo Jan 22, 2024
1b81a2b
Add log details
rkolavo Jan 22, 2024
56e6a84
feat: add expressions header and move macro examples out of the table
nijikokun Jan 22, 2024
a2a1e69
fix: prettier
nijikokun Jan 22, 2024
c57ad26
feat: clean up expressions docs for TLS/TCP/HTTP
nijikokun Jan 22, 2024
eb2752a
remove rate-limiting from tcp/tls
rkolavo Jan 22, 2024
2711657
prettier
rkolavo Jan 22, 2024
b1158b3
incorporate url-rewrite doc, cleanup/rename
rkolavo Jan 30, 2024
84c54b9
prettier
rkolavo Jan 31, 2024
4a2d565
fix sidebar for renamed pages
rkolavo Jan 31, 2024
1d4315e
more renames
rkolavo Jan 31, 2024
abcebef
formatting and adding rate limit details
rkolavo Jan 31, 2024
e4f12a7
rate limiting docs
natasha-jarus Jan 31, 2024
bd3f1f5
--policy-config is --policy-file
rkolavo Feb 1, 2024
cb4cc25
feat: add action config examples
nijikokun Feb 2, 2024
d04d36a
go sdk examples
rkolavo Feb 2, 2024
984c62d
tabify
rkolavo Feb 2, 2024
291bc3a
add python examples, prettierrrrr
rkolavo Feb 2, 2024
709ea6d
Add policy action doc (#582)
wdawson Feb 6, 2024
116e290
feat(traffic-policy): use configexample for expressions
nijikokun Feb 6, 2024
95c62e6
docs(jwt): add JWKS definition
nijikokun Feb 6, 2024
22c31dc
docs(jwt): teh -> the
nijikokun Feb 6, 2024
ebc138f
docs(traffic-policy): use configexample for expressions
nijikokun Feb 6, 2024
5200655
update macros examples
benjaminchan Feb 6, 2024
b7e4d59
update go-sdk examples, add javascript and k8s examples
rkolavo Feb 7, 2024
84da0ca
more k8s examples
rkolavo Feb 7, 2024
2578b1b
feat: adding jwt action guide for auth0
russorat Feb 9, 2024
525be48
fix: example typo
russorat Feb 9, 2024
8560c28
fix: addressing pr comments
russorat Feb 9, 2024
c883879
fix: addressing more pr comments
russorat Feb 9, 2024
43745b7
fix: use yaml for json
nijikokun Feb 13, 2024
dfa8fd1
feat: add rule gallery for http, various fixes
nijikokun Feb 13, 2024
7c5c412
custom-response: update configuration (#598)
TheConcierge Feb 14, 2024
d9200a6
chore: update docs for rate-limit action
nijikokun Feb 14, 2024
b762005
fix: check against nil
nijikokun Feb 15, 2024
c312334
fix: check len
nijikokun Feb 15, 2024
b9937cb
fix: use size
nijikokun Feb 15, 2024
d02a49b
fix: not in
nijikokun Feb 15, 2024
1733c7a
add documentation for cidr macros (#599)
benjaminchan Feb 16, 2024
8e8e69b
docs(agent): changelog for 3.6.0 (#581)
nijikokun Feb 7, 2024
214fecc
Adding 3.6 to version support policy
salilsub Feb 7, 2024
9691a2a
Fixing reversion on the docs
salilsub Feb 8, 2024
e8aca35
Create limits guide
samcrichard Feb 6, 2024
adbfa94
Update limits
samcrichard Feb 6, 2024
500b903
fix: clean up and adding to guide index
russorat Feb 8, 2024
b1f4d0a
fix: broken link
russorat Feb 8, 2024
68c6c2a
Update limits.md
samcrichard Feb 8, 2024
7680b9b
runs fmt
cody-dot-js Feb 8, 2024
b6da1b3
Adding links to the setup and installation pages in the dashboard
salilsub Feb 5, 2024
8f295f3
Add integration how-to guide: Ingress to apps deployed on Azure Kuber…
joelhans Feb 9, 2024
620472a
Update limits.md
samcrichard Feb 9, 2024
38a93dd
feat: initial traffic inspector docs
russorat Feb 9, 2024
ff99574
Fixing broken link
salilsub Feb 12, 2024
d0cb906
Remove JWT Validation Module entirely because docs pipeliene doesn't.…
wdawson Feb 13, 2024
b287444
feat: adding orb to webhook verification
russorat Feb 15, 2024
60aa101
feat: initial whats new
russorat Feb 3, 2024
7158ff3
feat: adding whats new page
russorat Feb 10, 2024
1983e49
fix: adding more stuff
russorat Feb 15, 2024
1b745cd
fix: fmt
russorat Feb 15, 2024
2ac863c
Merge branch 'main' into rk/policy-module-docs
nijikokun Feb 16, 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
Prev Previous commit
Next Next commit
Add policy action doc (#582)
Also removes the old (non-gen'd) module doc.

---------

Co-authored-by: Russ Savage <russorat@users.noreply.github.com>
  • Loading branch information
2 people authored and rkolavo committed Feb 7, 2024
commit 709ea6dd5a09a4e1ff2ee92d0c2b0a428aa9f0c2
106 changes: 0 additions & 106 deletions docs/http/jwt-validation.mdx

This file was deleted.

111 changes: 111 additions & 0 deletions docs/http/traffic-policy/actions/jwt-validation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { ExampleHTTP } from "/examples/actions/jwt-validation.mdx";

# JWT Validation

## Overview

The JWT Validation action allows or denies traffic based on validation of the JSON Web
Token (JWT) provided within the request that was initiated to your ngrok endpoints. You
will define the claims used to validate the token in conjunction with verifying it has
been properly signed by the issuer.

A connection is allowed only if it has been signed by the issuer and the defined claims
match.

## Example

<ExampleHTTP />

## Behavior

### Multiple Issuers

You may specify multiple issuers to be used for JWT validation. A request is considered
validated if it presents a JWT signed by any of the specified issuers.

### Multiple Audience Claims

You may specify multiple audience claims to be used for JWT validation. JWT validation
will require at least one of the audience claims to be present within the JWT.

### Multiple Signing Keys

You have the ability to provide multiple JWKS urls and signing algorithms. During JWT
validation the list of JWKS and algorithms provided will be used in an attempt to validate
the JWT. This list will be tried in order.

### Multiple Tokens

If multiple tokens are defined within the HTTP configuration parameter, all tokens must be
present in the request. If all tokens are not present a 401 status code will be returned.

### Configuration

| Type |
| ---------------- |
| `jwt-validation` |

| Parameter | Type | Description |
| ---------- | -------------------------------------------------- | ------------------------------------------------------ |
| `issuer` | [JWTIssuerConfig](#jwtissuerconfig-parameters) | configuration about the Issuer(s) of the JWTs. |
| `audience` | [JWTAudienceConfig](#jwtaudienceconfig-parameters) | configuration about the Audience(s) of the JWTs. |
| `http` | [JWTHTTPConfig](#jwthttpconfig-parameters) | configuration about the HTTP requests containing JWTs. |
| `jws` | [JWTSigningConfig](#jwtsigningconfig-parameters) | configuration about signed JWTs (JWS). |

#### JWTIssuerConfig Parameters

| Parameter | Type | Description |
| ------------ | ---------------------------------- | ---------------------------- |
| `allow_list` | [JWTIssuer](#jwtissuer-parameters) | the list of allowed issuers. |

#### JWTIssuer Parameters

| Parameter | Type | Description |
| --------- | -------- | ---------------------- |
| `value` | `string` | the URL of the issuer. |

#### JWTAudienceConfig Parameters

| Parameter | Type | Description |
| ------------ | -------------------------------------- | ------------------------------ |
| `allow_list` | [JWTAudience](#jwtaudience-parameters) | the list of allowed audiences. |

#### JWTAudience Parameters

| Parameter | Type | Description |
| --------- | -------- | -------------------------------- |
| `value` | `string` | the value of the audience claim. |

#### JWTHTTPConfig Parameters

| Parameter | Type | Description |
| --------- | ---------------------------------------- | ------------------------------- |
| `tokens` | [JWTHTTPToken](#jwthttptoken-parameters) | the list of tokens to validate. |

#### JWTHTTPToken Parameters

| Parameter | Type | Description |
| --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `type` | `string` | the type of the JWT, which acts as a hint to ngrok about how ngrok should parse the token. Must be one of "jwt", "at+jwt", or "it+jwt". |
| `method` | `string` | the location in which to expect the JWT. Must be one of "header" or "body". |
| `name` | `string` | the name of the header or body field where the JWT is expected. |
| `prefix` | `string` | any prefix to strip from the header or body field before parsing the JWT. |

#### JWTSigningConfig Parameters

| Parameter | Type | Description |
| -------------------- | -------------------------------------------- | ------------------------------------------- |
| `allowed_algorithms` | `List<string>` | the list of allowed signing algorithms. |
| `keys` | [JWTSigningKeys](#jwtsigningkeys-parameters) | the configuration for the JWT signing keys. |

#### JWTSigningKeys Parameters

| Parameter | Type | Description |
| --------- | -------------------------------------------------------- | ---------------------------------------------------------------------- |
| `sources` | [JWTSigningKeySources](#jwtsigningkeysources-parameters) | the configuration for the key material used to verify the signed JWTs. |

#### JWTSigningKeySources Parameters

| Parameter | Type | Description |
| ----------------- | -------------- | -------------------------------------------------------------------- |
| `additional_jkus` | `List<string>` | a list of URLs which serve teh possible signing keys in JWKS format. |
47 changes: 47 additions & 0 deletions examples/actions/jwt-validation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import ConfigExample from "../../src/components/ConfigExample.tsx";

export const type = "jwt-validation";
export const config = {
issuer: {
allow_list: [
{
value: "https://example.com/issuer",
},
],
},
audience: {
allow_list: [
{
value: "urn:example:api",
},
],
},
http: {
tokens: [
{
type: "access_token",
method: "header",
name: "Authorization",
prefix: "Bearer ",
},
{
type: "it+jwt",
method: "body",
name: "_id_token",
},
],
},
jws: {
allowed_algorithms: ["RS256", "ES256"],
keys: {
sources: {
additional_jkus: ["https://example.com/issuer/jku"],
},
},
},
};

export const ExampleHTTP = () => (
<ConfigExample config={{ actions: [{ type, config }] }} />

)
1 change: 0 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const sidebars = {
"http/circuit-breaker",
"http/compression",
"http/ip-restrictions",
"http/jwt-validation",
"http/mutual-tls",
"http/oauth",
"http/openid-connect",
Expand Down