Skip to content

Commit

Permalink
Merge branch 'jwt-docs' of https://github.com/flipt-io/docs into jwt-…
Browse files Browse the repository at this point in the history
…docs

* 'jwt-docs' of https://github.com/flipt-io/docs:
  chore: Update authentication/methods.mdx
  chore: format code
  • Loading branch information
markphelps committed Jan 10, 2024
2 parents 003680a + f2cf521 commit 63846c4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
5 changes: 3 additions & 2 deletions authentication/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,10 @@ The expiration can be used to schedule when to next request a new client token.
JWT authentication is useful for scenarios where you want to integrate Flipt with an existing authentication system, or where you want to perform service to Flipt authentication without the need to manage static client tokens.

<Note>
JWT authentication is **not** supported by the Flipt UI as it is not a session compatible authentication method.
JWT authentication is **not** supported by the Flipt UI as it is not a session
compatible authentication method.
</Note>

![JWT Authentication Flow](/images/authentication/jwt.svg)

The JWT issued by the the Authorization Server can then be used to authenticate with Flipt as outlined in [Using JSON Web Tokens](/authentication/using-jwts).
The JWT issued by the Authorization Server can then be used to authenticate with Flipt as outlined in [Using JSON Web Tokens](/authentication/using-jwts).
2 changes: 1 addition & 1 deletion authentication/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Once a `client token` has been acquired, it can be supplied via request metadata

Flipt can also authenticate requests using externally created and signed [JSON Web Tokens](https://jwt.io/). This is useful for integrating existing authentication systems with Flipt.

To enable JWT authentication, you will need to configure Flipt with the public key used to verify the JWT signature.
To enable JWT authentication, you will need to configure Flipt with the public key used to verify the JWT signature.

See the [Configuration: JWT Authentication](/configuration/authentication#json-web-token) documentation for details.

Expand Down
7 changes: 3 additions & 4 deletions configuration/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ Flipt supports key verification using the following methods:
- PEM (Privacy Enhanced Mail) encoded public key

<Note>
These methods are mutually exclusive, meaning that only one of them can be configured at a time.
These methods are mutually exclusive, meaning that only one of them can be
configured at a time.
</Note>

#### JWKS URL
Expand Down Expand Up @@ -395,9 +396,7 @@ Flipt supports validating the following claims:
- `nbf` (not before)
- `iat` (issued at)

<Note>
The `exp`, `nbf`, and `iat` claims are validated by default.
</Note>
<Note>The `exp`, `nbf`, and `iat` claims are validated by default.</Note>

To enable claim validation, configure the values in the `validate_claims` configuration option to the expected values.

Expand Down
15 changes: 7 additions & 8 deletions configuration/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,13 @@ export FLIPT_CORS_ALLOWED_ORIGINS="http://localhost:3000 http://localhost:3001"

#### Authentication Methods: JWT

| Property | Description | Default | Since |
| ------------------------------------------------- | ---------------------------------------------------------------- | ------- | ------- |
| authentication.methods.jwt.enabled | Enable JWT authentication | false | v1.35.0 |
| authentication.methods.jwt.jwks_url | URL to retrieve JWKS for JWT validation | | v1.35.0 |
| authentication.methods.jwt.public_key_file | Path to public key file for JWT validation | | v1.35.0 |
| authentication.methods.jwt.validate_claims.issuer | The issuer claim to validate on JWT tokens | | v1.35.0 |
| authentication.methods.jwt.validate_claims.audiences | The audience claim (list) to validate on JWT tokens | | v1.35.0 |

| Property | Description | Default | Since |
| ---------------------------------------------------- | --------------------------------------------------- | ------- | ------- |
| authentication.methods.jwt.enabled | Enable JWT authentication | false | v1.35.0 |
| authentication.methods.jwt.jwks_url | URL to retrieve JWKS for JWT validation | | v1.35.0 |
| authentication.methods.jwt.public_key_file | Path to public key file for JWT validation | | v1.35.0 |
| authentication.methods.jwt.validate_claims.issuer | The issuer claim to validate on JWT tokens | | v1.35.0 |
| authentication.methods.jwt.validate_claims.audiences | The audience claim (list) to validate on JWT tokens | | v1.35.0 |

### Database

Expand Down

0 comments on commit 63846c4

Please sign in to comment.