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

Adds ip range lookup support #1262

Merged
merged 7 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
36 changes: 25 additions & 11 deletions content/docs/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ See the pages in this section for more information on our example data sources,

Any external data source integration requires the following settings:
Copy link
Contributor

Choose a reason for hiding this comment

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

Side note: I don't think this is accurate. I think the last four settings are optional ("Headers", "Allow Insecure TLS", "Polling Min/Max Delay", "Client TLS Key").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was actually looking for "Allow Insecure TLS" in the Console UI and couldn't find it at all. I'll submit an issue to update this page, but it's not a high priority in my opinion at the moment.


### **URL**
### URL

The path to the external data.

Expand Down Expand Up @@ -78,28 +78,42 @@ The Pomerium Databroker would be updated with types `example.com/geoip`, `device

Compressed versions are supported using `gz` format.

### **Record Type**
### Record Type

Unless defined by the directory structure of a supplied archive file, the Record Type field defines how the records will be stored and accessed in the Databroker.

### **Foreign Key**
### Foreign Key

**Foreign Key** is used to map an authorization evaluation to the corresponding record. The supported values are:

- `user.id` (Also the default if no value is provided),
- `user.email`,
- `request.ip`,
- `device.id`.
- `user.id` (Also the default if no value is provided)
- `user.email`
- `request.ip`
- `device.id`

### **Headers**
#### IP range lookup support

For the `request.ip` foreign key, Pomerium also supports matching against a range of IP addresses (expressed in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)). This can reduce the number of data records you need.

To match against an IP address range, add a special `$index` key to your external data source records. For example:

```json
{
"$index": {"cidr": "10.1.2.3/24"}
}
```

See the [GeoIP Ranges](/docs/integrations/geoip) and [Well-Known IP Ranges](/docs/integrations/ip-ranges) guides for specific examples.

### Headers

Headers defined here will be used when connecting to the external data source.

### **Allow Insecure TLS**
### Allow Insecure TLS

If set, allows the import of external data from sources using untrusted TLS certificates.

### **Polling Min/Max Delay**
### Polling Min/Max Delay

Defines the minimum and maximum delay times between requests to the external data source. The job would be scheduled to run within `min delay` intervals.

Expand All @@ -109,6 +123,6 @@ If a job may not complete within the `min delay` period, it would be interrupted

:::

### **Client TLS Key**
### Client TLS Key

For data sources using mTLS, you can select a [client certificate](/docs/concepts/certificates) (added under **Manage** → **Certificates**) to provide to the data source.
6 changes: 3 additions & 3 deletions content/docs/integrations/ip-ranges.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ The Well Known IP Ranges integration provides a list of IP address ranges for va
```json title="Example"
[
{
"index": {"cidr": "1.0.0.0/24"},
"$index": {"cidr": "1.0.0.0/24"},
"id": "1.0.0.0/24",
"as_number": "13335",
"country_code": "US",
"as_name": "CLOUDFLARENET"
},
{
"index": {"cidr": "1.0.4.0/23"},
"$index": {"cidr": "1.0.4.0/23"},
"id": "1.0.4.0/23",
"as_number": "38803",
"country_code": "AU",
"as_name": "WPL-AS-AP"
},
{
"index": {"cidr": "1.0.6.0/23"},
"$index": {"cidr": "1.0.6.0/23"},
"id": "1.0.6.0/23",
"as_number": "38803",
"country_code": "AU",
Expand Down
Loading