You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,7 @@ Application Options:
166
166
--whitelist= Only allow given user ID, comma separated, can be set multiple times [$WHITELIST]
167
167
--port= Port to listen on (default: 4181) [$PORT]
168
168
--rule.<name>.<param>= Rule definitions, param can be: "action", "rule" or "provider"
169
+
--trusted-ip-address= List of trusted IP addresses or IP networks (in CIDR notation) that are considered authenticated [$TRUSTED_IP_ADDRESS]
169
170
170
171
Google Provider:
171
172
--providers.google.client-id= Client ID [$PROVIDERS_GOOGLE_CLIENT_ID]
@@ -362,6 +363,17 @@ All options can be supplied in any of the following ways, in the following prece
362
363
363
364
Note: It is possible to break your redirect flow with rules, please be careful not to create an `allow` rule that matches your redirect_uri unless you know what you're doing. This limitation is being tracked in in #101 and the behaviour will change in future releases.
364
365
366
+
- `trusted-ip-address`
367
+
368
+
This option adds an IP address or an IP network given in CIDR notation to the list of trusted networks. Requests originating
369
+
from a trusted network are considered authenticated and are never redirected to an OAuth IDP. The option can be used
370
+
multiple times to add many trusted address ranges.
371
+
372
+
* `--trusted-ip-address=2.3.4.5` adds a single IP (`2.3.4.5`) as a trusted IP.
373
+
* `--trusted-ip-address=30.1.0.0/16` adds the address range from `30.1.0.1` to `30.1.255.254` as a trusted range
Copy file name to clipboardExpand all lines: internal/config.go
+52Lines changed: 52 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ import (
7
7
"fmt"
8
8
"io"
9
9
"io/ioutil"
10
+
"net"
10
11
"os"
11
12
"regexp"
12
13
"strconv"
@@ -56,6 +57,9 @@ type Config struct {
56
57
ClientIdLegacystring`long:"client-id" env:"CLIENT_ID" description:"DEPRECATED - Use \"providers.google.client-id\""`
57
58
ClientSecretLegacystring`long:"client-secret" env:"CLIENT_SECRET" description:"DEPRECATED - Use \"providers.google.client-id\"" json:"-"`
58
59
PromptLegacystring`long:"prompt" env:"PROMPT" description:"DEPRECATED - Use \"providers.google.prompt\""`
60
+
61
+
TrustedIPAddresses []string`long:"trusted-ip-address" env:"TRUSTED_IP_ADDRESS" env-delim:"," description:"List of trusted IP addresses or IP networks (in CIDR notation) that are considered authenticated"`
62
+
trustedIPNetworks []*net.IPNet
59
63
}
60
64
61
65
// NewGlobalConfig creates a new global config, parsed from command arguments
0 commit comments