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
Update http authentication instructions for Google
Update the http OAuth authentication instructions.
- Add a section to show how to use Google as an OAuth provider
- Update the GitHub OAuth section for the new org acl.
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
Copy file name to clipboardexpand all lines: docs/tutorial/http-authentication.md
+47-1
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,13 @@ With OAuth:
76
76
77
77
The OAuth 2.0 flow requires a web-browser, so if you anticipate mixed use, then you can combine it with Bearer Token Authentication, for headless clients.
78
78
79
+
The tunnel client currently has three reserved paths for OAuth:
80
+
-`/_/oauth/login` hosts the login page.
81
+
-`/_/oauth/logout` can be used to log out.
82
+
-`/_/oauth/callback` is used for the OAuth 2.0 callbacks.
83
+
84
+
Paths prefixed with `/_/oauth` can not be used by the tunneled service.
85
+
79
86
### Example with GitHub.com
80
87
81
88
The example below will expose: `http://127.0.0.1:3000` using the domain name `tunnel.example.com`.
Access to the tunnel can be controlled using the `--oauth-acl` flag. Users can be filtered by username and email.
114
+
115
+
Tunnels using a commercial inlets license can also control access based on organisation membership. Providing the flag `--oauth-acl=org:inlets` would allow all users that are a member of the inlets GitHub organisation to access the tunnel.
116
+
106
117
Once authenticated, a cookie will be set on the domain i.e. `tunnel.example.com` and the user will be redirected back to the root URL of the service `/`.
107
118
108
119
The duration of the cookie defaults to 1 hour, but can be extended through the `--oauth-cookie-ttl` flag i.e.
@@ -112,6 +123,41 @@ inlets-pro http client \
112
123
+ --oauth-cookie-ttl 24h \
113
124
```
114
125
115
-
For the first version, GitHub is the only option available for the `--oauth-provider`. More options will be added over time, based upon requests from users, so if you want to use Google, Facebook, GitLab, etc, send us an email to help with prioritisation.
126
+
### Example with Google
127
+
128
+
> To use the Google provider you need a commercial Inlets license.
129
+
130
+
1. Setup a new project in the [Google API console](https://console.developers.google.com/)
131
+
2. Configure the project OAuth consent screen.
132
+
133
+
Follow the steps to configure the [OAuth consent screen](https://console.developers.google.com/apis/credentials/consent).
134
+
135
+
If you are a Google Workspace user you can make your app available to any user within your organization by registering it as an internal app.
136
+
137
+
3. Create a new OAuth client
138
+
139
+
[Create a new OAuth client](https://console.cloud.google.com/auth/clients/create) with the application type `Web Application`.
140
+
Fill out the name and add the callback URL for your tunnel to the list of valid redirect URIs.
141
+
142
+
Example of a redirect uri: `http://tunnel.example.com/_/oauth/callback`. The callback for a tunnel is always available at `/_/oauth/callback`.
143
+
144
+

145
+
146
+
4. Save the Client ID and Client secret in a convenient place so they can be used when connecting the tunnel.
You can control which users are allowed to access the tunnel by providing an email address using the `--oauth-acl` flag.
160
+
161
+
More providers will be added over time, based upon requests from users, so if you want to use Facebook, GitLab, etc, send us an email to help with prioritisation.
0 commit comments