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

docs: Add client-tokens and frontend-tokens chapter to offline mode #536

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ To run Edge in **offline** mode, use the command `offline` and provide a volume
docker run -v ./examples:/edge/data -p 3063:3063 -e BOOTSTRAP_FILE=/edge/data/features.json -e TOKENS=<your_client_token_1,your_client_token_2> unleashorg/unleash-edge:<version> offline
```

### Client and frontend tokens in offline mode

> Availability: Unleash Edge v19.4+

Offline mode supports multiple [token types](https://docs.getunleash.io/reference/api-tokens-and-client-keys).

For [client tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#client-tokens), use:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option:

For client tokens, use CLIENT_TOKENS or TOKENS environment variables or --client-tokens or --tokens CLI flags.

- `CLIENT_TOKENS` or `TOKENS` environment variables
- `--client-tokens` or `--tokens` CLI flags

For [frontend tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#front-end-tokens), use:
- `FRONTEND_TOKENS` environment variable
- `--frontend-tokens` CLI flag

When configured this way, Edge in offline mode can validate tokens and tell daisy-chained Edges instances the type of token calling the validate endpoint.

## Metrics

> Availability: Unleash v5.9+. For daisy-chaining, ensure Edge v17+ is upstream of any Edge v19+ to preserve metrics.
Expand Down
16 changes: 16 additions & 0 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ To run Edge in **offline** mode, use the command `offline` and provide a volume
docker run -v ./examples:/edge/data -p 3063:3063 -e BOOTSTRAP_FILE=/edge/data/features.json -e TOKENS=<your_client_token_1,your_client_token_2> unleashorg/unleash-edge:<version> offline
```

### Client and frontend tokens in offline mode

> Availability: Unleash Edge v19.4+

Offline mode supports multiple [token types](https://docs.getunleash.io/reference/api-tokens-and-client-keys).

For [client tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#client-tokens), use:
- `CLIENT_TOKENS` or `TOKENS` environment variables
- `--client-tokens` or `--tokens` CLI flags

For [frontend tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#front-end-tokens), use:
- `FRONTEND_TOKENS` environment variable
- `--frontend-tokens` CLI flag

When configured this way, Edge in offline mode can validate tokens and tell daisy-chained Edges instances the type of token calling the validate endpoint.

## Metrics

> Availability: Unleash v5.9+. For daisy-chaining, ensure Edge v17+ is upstream of any Edge v19+ to preserve metrics.
Expand Down