Skip to content

Commit 2ea1a4f

Browse files
authored
docs: add sign in restriction (#505)
1 parent 8538dd9 commit 2ea1a4f

20 files changed

+52
-34
lines changed

content/docs/administration/sign-in-frequency.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

content/docs/administration/sign-in-restriction.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,48 @@
22
title: Sign-in Restriction
33
---
44

5+
This document explains some sign-in restrictions.
6+
57
## Sign-in Frequency
68

79
<PricingPlanBlock feature_name='SIGNIN_FREQUENCY' />
810

911
**Sign-in Frequency** specifies the period that users are required to sign in again.
1012

11-
### Prerequisites
12-
13-
- **Workspace Admin** or **Workspace DBA** role
13+
Only **Workspace Admin** can update the **Sign-in Frequency** settings.
1414

15-
### Procedure
15+
In Bytebase Workspace, Go to **Settings** -> **General** and scroll down to **Account** section, where you can
1616

17-
1. Click **Settings** on the top bar.
18-
2. Click **General** under **Workspace**, and scroll down to the **Security** section.
19-
3. Choose between `Hour(s)` and `Day(s)`.
20-
4. Click `+`,`-` or input a number to set the **Sign-in Frequency**.
17+
- Choose between `Hour(s)` and `Day(s)`.
18+
- Click `+`,`-` or input a number to set the **Sign-in Frequency**.
2119

22-
![sign-in-frequency](/content/docs/administration/sign-in-restriction/bb-sign-in-frequency.webp)
20+
![sign-in-frequency](/content/docs/administration/sign-in-restriction/sign-in-frequency.webp)
2321

2422
<HintBlock type="info">
2523

2624
You need to restart Bytebase and re-login to make the change take effect.
2725

2826
</HintBlock>
27+
28+
## Disallow Sign-in with Email & Password
29+
30+
<PricingPlanBlock feature_name='SSO' />
31+
32+
As `Workspace Admin`, having had [SSO](https://www.bytebase.com/docs/administration/sso/overview) (for example [OAuth 2.0 in GitHub](https://www.bytebase.com/docs/administration/sso/oauth2/#github)) configured, you can [enforce SSO sign-in](https://www.bytebase.com/docs/administration/sso/overview/#enforce-sso-sign-in) for all users in Workspace.
33+
34+
## Sign-in from Email Domains
35+
36+
Go to **Settings** -> **General**, scroll down to **Security** section. Fill in `Workspace Domain` tab with the email domain for your Workspace members. Click **Update** to save changes.
37+
38+
![set-domain](/content/docs/administration/sign-in-restriction/set-domain.webp)
39+
40+
You can restrict members' email addresses by ticking the `Members restriction` box. Afterwards, when you
41+
- Sign in (Note that the new restriction only works for the accounts registered after the `Workspace Domain` was updated)
42+
![sign-in-domain-restriction](/content/docs/administration/sign-in-restriction/sign-in-domain-restriction.webp)
43+
44+
or
45+
46+
- **Add User** in **IAM & Admin** -> **Users & Groups**
47+
![add-user-domain-restriction](/content/docs/administration/sign-in-restriction/add-user-domain-restriction.webp)
48+
49+
Users' email must be of the domain you set in both scenarios.

content/docs/administration/sso/oauth2.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ In the creating SSO dialog, you need to fill following fields:
1414

1515
![oauth2-basic-information](/content/docs/administration/sso/oauth2-basic-information.webp)
1616

17-
- **Name**: the display name shown to your users (e.g. `GitHub` will be shown as `Sign in with GitHub`)
18-
- **Identity Provider ID**: a human-readable unique string, only lower-case alphabets and hyphens are allowed (e.g. `github`)
19-
- **Domain**: the domain name to scope associated users (e.g. `github.com`, optional)
17+
- **Name**: the display name shown to your users (e.g. `Google` will be shown as `Sign in with Google`)
18+
- **Identity Provider ID**: a human-readable unique string, only lower-case alphabets and hyphens are allowed (e.g. `google-fsgs`)
19+
- **Domain**: the domain name to scope associated users (e.g. `google.com`, optional)
2020

2121
### Identity provider information
2222

23-
The information is the base concept of [OAuth 2.0](https://oauth.net/2/) and comes from your provider.
23+
The information is the base concept of [OAuth 2.0](https://oauth.net/2) and comes from your provider.
2424

2525
![oauth2-identity-provider-information](/content/docs/administration/sso/oauth2-identity-provider-information.webp)
2626

@@ -36,10 +36,11 @@ The information is the base concept of [OAuth 2.0](https://oauth.net/2/) and com
3636

3737
### User information mapping
3838

39-
For different providers, the structures returned by their user information API are usually not the same. In order to know how to map the user information from an provider into Bytebase user fields, you need to fill the user information mapping form.
39+
For different providers, the structures returned by their user information API are usually not the same. That's why you need to fill an information mapping form for mapping user information into Bytebase user fields.
4040

41-
Bytebase will use the mapping to import the user profile fields when creating new accounts.
42-
The most important user field mapping is the identifier which is used to identify the Bytebase account associated with the OAuth 2.0 login.
41+
Bytebase uses the mapping to import user profile fields when creating new accounts.
42+
43+
The most important information is `Bytebase user's email`. It identifies the Bytebase account associated with the OAuth 2.0 login.
4344

4445
![oauth2-user-information-field-mapping](/content/docs/administration/sso/oauth2-user-information-field-mapping.webp)
4546

@@ -77,7 +78,7 @@ Bytebase provides templates for configuring built-in OAuth providers.
7778

7879
<PricingPlanBlock feature_name='SSO_BASIC' />
7980

80-
1. Follow [Creating an OAuth App in GitHub](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) to create an OAuth app in GitHub.
81+
1. Follow [Creating an OAuth App in GitHub](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) to create an OAuth app in GitHub, where you replace `YOUR_EXTERNAL_URL` in the image below with the external URL you [configured](https://www.bytebase.com/docs/get-started/install/external-url) in Bytebase Workspace.
8182

8283
![github-oauth-app-config](/content/docs/administration/sso/github-oauth-app-config.webp)
8384

content/docs/administration/sso/overview.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ Configure [External URL](/docs/get-started/install/external-url).
1616

1717
## Create SSO provider
1818

19-
As a **Workspace Admin**, you can create a SSO provider with the following steps:
20-
21-
1. Go to the **Settings** page.
22-
23-
![settings-sso](/content/docs/administration/sso/settings-sso.webp)
19+
As a **Workspace Admin**, you can create a SSO provider following the steps below:
2420

21+
1. In Workspace, go to **IAM & Admin** -> **SSO** from left side bar.
2522
2. Click **Create** to start creating SSO.
2623
3. Fill in all the required fields.
2724

2825
![create-sso-dialog](/content/docs/administration/sso/create-sso-dialog.webp)
2926

27+
4. **Test Connection** on bottom left.
28+
5. If successfully connected, click **Update** on bottom right.
29+
3030
## Sign in with SSO
3131

3232
<HintBlock type="info">
@@ -35,20 +35,20 @@ Bytebase employs JIT (Just-In-Time) user provisioning. It will create the user t
3535

3636
</HintBlock>
3737

38-
Once a valid SSO has been created, the user can choose the configured SSO provider to sign in.
38+
Once a valid SSO has been created, you can choose to sign in with the configured SSO provider.
3939

4040
![sign-in-with-github](/content/docs/administration/sso/sign-in-with-github.webp)
4141

4242
## Enforce SSO Sign-in
4343

44-
As a **Workspace Admin**, you can enforce SSO sign-in for all users in the workspace.
44+
As `Workspace Admin`, you can enforce SSO sign-in for all users in Workspace.
4545

46-
Go to the **Settings > Workspace > General**, find the **Security** section and turn on the **Disallow signin with email&password** option.
46+
In **Workspace**, go to **Settings** > **General**, scroll down to **Account** section and switch on `Disallow signin with email & password`. Then users can only sign in with SSO.
4747

48-
![bb-disallow-emailpass-only-sso](/content/docs/administration/sso/bb-disallow-emailpass-only-sso.webp)
48+
![disallow-emailpass-only-sso](/content/docs/administration/sso/disallow-emailpass-only-sso.webp)
4949

5050
Afterwards, when the user tries to sign in, the only option is to sign in with the configured SSO provider.
5151

52-
![bb-only-sso](/content/docs/administration/sso/bb-only-sso.webp)
52+
![only-sso](/content/docs/administration/sso/only-sso.webp)
5353

54-
In case of an emergency, the admin can log in by navigating to `<YOUR_URL>/auth/admin` and entering the email and password.
54+
In case of emergency, the admin can log in by navigating to `<YOUR_URL>/auth/admin` and entering the email and password.

content/docs/get-started/install/external-url.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ than the internal one.
1515

1616
</HintBlock>
1717

18+
For testing purpose, you can get an endpoint online with [ngrok](https://dashboard.ngrok.com/get-started/setup/macos) as external URL.
19+
1820
When running Bytebase in production, you should not make the node that's running the Bytebase server directly accessible to the client. Instead, you should set up an gateway such as Nginx or Caddy to forward requests to Bytebase.
1921

2022
Logically, you need to configure 2 endpoints, the external URL that users use to access the Bytebase console, and the GitOps Webhook URL that the VCS pushes the webhook event for GitOps workflow. The former usually is accessed from
75.8 KB
Loading
Binary file not shown.
122 KB
Loading
38.9 KB
Loading
147 KB
Loading

0 commit comments

Comments
 (0)