diff --git a/docs/ip-whitelist/ip-whitelist.md b/docs/ip-whitelist/ip-whitelist.md new file mode 100644 index 000000000..0273a1445 --- /dev/null +++ b/docs/ip-whitelist/ip-whitelist.md @@ -0,0 +1,40 @@ +--- +title: Overview +description: Support IP limitation for user entry pages. +keywords: [ip, whitelist, ip whitelist] +authors: [ZhaoYP-2001] +--- + +Casdoor supports the ip whitelist function of the entry page. When a user accesses the entry page (login/signup/forget-password), Casdoor will decide whether to allow the user to access the entry page based on whether the client IP is in the whitelist. Here, we will show you how to enable the option to specify the ip whitelist function of the entry page at the user, application and organization levels. + +## Configuration + +### User Level + +Casdoor will first determine whether the client address meets the user-level ip whitelist requirements. + +If you want to specify user-level ip whitelist, you first need to add the "IP whitelist" account item on the edit page of the organization to which the user belongs. Then specify your ip whitelist by filling in the comma separated CIDR list, such as 192.168.1.0/24,25.112.0.0/16. If the ip whitelist is empty, it means there is no restriction on the client IP address. + +![user_ip_whitelist](/img/ip-whitelist/user_ip_whitelist.png) + +:::info + +If you forget how to customize users' **account items**, Please refer to the **[Account Customization](organization/accountCustomization.md)** + +::: + +### Application Level + +If the client IP address passes the user-level check, Casdoor will proceed to perform application-level check. You can specify the ip whitelist through the `IP whitelist` configuration option on the application edit page. + +![app_ip_whitelist](/img/ip-whitelist/app_ip_whitelist.png) + +### Organization Level + +Organization-level check will be performed last. You can use the `IP whitelist` configuration option on the organization edit page to specify organization-level ip whitelist. + +![org_ip_whitelist](/img/ip-whitelist/org_ip_whitelist.png) + +Here is a demo video that shows how to use ip whitelist: + + diff --git a/sidebars.js b/sidebars.js index 3936589c9..ed777df2b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -344,6 +344,14 @@ module.exports = { "invitation/overview", ], }, + { + type: "category", + label: "IP Whitelist", + link: {type: "generated-index"}, + items: [ + "ip-whitelist/ip-whitelist", + ], + }, { type: "category", label: "Syncer", diff --git a/static/img/ip-whitelist/app_ip_whitelist.png b/static/img/ip-whitelist/app_ip_whitelist.png new file mode 100644 index 000000000..fb277846b Binary files /dev/null and b/static/img/ip-whitelist/app_ip_whitelist.png differ diff --git a/static/img/ip-whitelist/ip_whitelist.mp4 b/static/img/ip-whitelist/ip_whitelist.mp4 new file mode 100644 index 000000000..841b5c8d1 Binary files /dev/null and b/static/img/ip-whitelist/ip_whitelist.mp4 differ diff --git a/static/img/ip-whitelist/org_ip_whitelist.png b/static/img/ip-whitelist/org_ip_whitelist.png new file mode 100644 index 000000000..40ed604ab Binary files /dev/null and b/static/img/ip-whitelist/org_ip_whitelist.png differ diff --git a/static/img/ip-whitelist/user_ip_whitelist.png b/static/img/ip-whitelist/user_ip_whitelist.png new file mode 100644 index 000000000..c1d8668e7 Binary files /dev/null and b/static/img/ip-whitelist/user_ip_whitelist.png differ