Skip to content

Commit

Permalink
split out pool info into its own doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Guaris committed Aug 21, 2024
1 parent a89ecfc commit ac821af
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 68 deletions.
71 changes: 71 additions & 0 deletions app/_hub/kong-inc/key-auth/how-to/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
nav_title:
title: How to configure pools

minimum_version: 3.8.x
---


With `pool_id` you can configure the key-auth plugin to validate API keys against the Identity Service.

### Configuring Multiple Pools

In the key-auth plugin configuration, add the `pools` option as shown below:

```yaml
pools:
- geo: us
id: <the_pool_id_you_got_in_step_1>
type: remote
- geo: null
id: null
type: local
```
The order in which you configure the pools dictates the priority in which the dataplane attempts to authenticate the provided API keys.
In the example above, if the remote pool is listed first, the dataplane will first reach out to the identity service and, if necessary, subsequently to the local pool.
Alternatively, you can configure the local pool first:
```yaml
pools:
- geo: null
id: null
type: local
- geo: us
id: <the_pool_id_you_got_in_step_1>
type: remote
```
In this configuration, the dataplane will initially check the local pool (LMDB) before querying the remote Identity Service.
If a matching key is found in any of these pools, the request will be authenticated. If the key is not found in any of the configured pools, the request will be blocked.
### Configuring Single Pools
It is also possible to configure only a single pool, either local or remote. However, only one of each type can be configured.
To configure only a remote pool:
```yaml
pools:
- geo: us
id: <the_pool_id_you_got_in_step_1>
type: remote
```
In this case, the dataplane will only attempt to authenticate API keys against the remote Identity Service.
To configure only a local pool:
```yaml
pools:
- geo: null
id: null
type: local
```
In this scenario, the dataplane will only check the local pool (LMDB) for API key authentication.
In both cases, if the API key is not found in the configured pool, the request will be blocked.
68 changes: 0 additions & 68 deletions app/_hub/kong-inc/key-auth/overview/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,71 +300,3 @@ Response:
[acl-associating]: /plugins/acl/#associating-consumers



## Externalized Consumers

-- Dummy/Link that points to Konnect Docs when ready.

With the `pool_id` you obtained from the previous step, you can configure the key-auth plugin to validate API keys against the Identity Service.

### Configuring Multiple Pools

In the key-auth plugin configuration, add the `pools` option as shown below:

```yaml
pools:
- geo: us
id: <the_pool_id_you_got_in_step_1>
type: remote
- geo: null
id: null
type: local
```

The order in which you configure the pools dictates the priority in which the dataplane attempts to authenticate the provided API keys.

In the example above, if the remote pool is listed first, the dataplane will first reach out to the identity service and, if necessary, subsequently to the local pool.

Alternatively, you can configure the local pool first:

```yaml
pools:
- geo: null
id: null
type: local
- geo: us
id: <the_pool_id_you_got_in_step_1>
type: remote
```

In this configuration, the dataplane will initially check the local pool (LMDB) before querying the remote Identity Service.

If a matching key is found in any of these pools, the request will be authenticated. If the key is not found in any of the configured pools, the request will be blocked.

### Configuring Single Pools

It is also possible to configure only a single pool, either local or remote. However, only one of each type can be configured.

To configure only a remote pool:

```yaml
pools:
- geo: us
id: <the_pool_id_you_got_in_step_1>
type: remote
```

In this case, the dataplane will only attempt to authenticate API keys against the remote Identity Service.

To configure only a local pool:

```yaml
pools:
- geo: null
id: null
type: local
```

In this scenario, the dataplane will only check the local pool (LMDB) for API key authentication.

In both cases, if the API key is not found in the configured pool, the request will be blocked.

0 comments on commit ac821af

Please sign in to comment.