Skip to content

Commit d286e83

Browse files
backport-actions-token[bot]ZPain8464kenjenkins
authored
Adds ip range lookup support (#1267)
Adds ip range lookup support (#1262) * adds ip range lookup support * updates text * runs prettier * updates text and moves section * Update content/docs/integrations.mdx * Update content/docs/integrations.mdx * Update content/docs/integrations.mdx --------- Co-authored-by: zachary painter <[email protected]> Co-authored-by: Kenneth Jenkins <[email protected]>
1 parent 7edccdd commit d286e83

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

content/docs/integrations.mdx

+25-11
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ See the pages in this section for more information on our example data sources,
3333

3434
Any external data source integration requires the following settings:
3535

36-
### **URL**
36+
### URL
3737

3838
The path to the external data.
3939

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

7979
Compressed versions are supported using `gz` format.
8080

81-
### **Record Type**
81+
### Record Type
8282

8383
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.
8484

85-
### **Foreign Key**
85+
### Foreign Key
8686

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

89-
- `user.id` (Also the default if no value is provided),
90-
- `user.email`,
91-
- `request.ip`,
92-
- `device.id`.
89+
- `user.id` (Also the default if no value is provided)
90+
- `user.email`
91+
- `request.ip`
92+
- `device.id`
9393

94-
### **Headers**
94+
#### IP range lookup support
95+
96+
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.
97+
98+
To match against an IP address range, add a special `$index` key to your external data source records. For example:
99+
100+
```json
101+
{
102+
"$index": {"cidr": "10.1.2.3/24"}
103+
}
104+
```
105+
106+
See the [GeoIP Ranges](/docs/integrations/geoip) and [Well-Known IP Ranges](/docs/integrations/ip-ranges) guides for specific examples.
107+
108+
### Headers
95109

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

98-
### **Allow Insecure TLS**
112+
### Allow Insecure TLS
99113

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

102-
### **Polling Min/Max Delay**
116+
### Polling Min/Max Delay
103117

104118
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.
105119

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

110124
:::
111125

112-
### **Client TLS Key**
126+
### Client TLS Key
113127

114128
For data sources using mTLS, you can select a [client certificate](/docs/concepts/certificates) (added under **Manage****Certificates**) to provide to the data source.

content/docs/integrations/ip-ranges.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ The Well Known IP Ranges integration provides a list of IP address ranges for va
1313
```json title="Example"
1414
[
1515
{
16-
"index": {"cidr": "1.0.0.0/24"},
16+
"$index": {"cidr": "1.0.0.0/24"},
1717
"id": "1.0.0.0/24",
1818
"as_number": "13335",
1919
"country_code": "US",
2020
"as_name": "CLOUDFLARENET"
2121
},
2222
{
23-
"index": {"cidr": "1.0.4.0/23"},
23+
"$index": {"cidr": "1.0.4.0/23"},
2424
"id": "1.0.4.0/23",
2525
"as_number": "38803",
2626
"country_code": "AU",
2727
"as_name": "WPL-AS-AP"
2828
},
2929
{
30-
"index": {"cidr": "1.0.6.0/23"},
30+
"$index": {"cidr": "1.0.6.0/23"},
3131
"id": "1.0.6.0/23",
3232
"as_number": "38803",
3333
"country_code": "AU",

0 commit comments

Comments
 (0)