Skip to content

Commit

Permalink
docs: add docs for the new feature of ip whitelist. (#639)
Browse files Browse the repository at this point in the history
* docs: add docs for the new feature of ip whitelist.

* fix: word order error
  • Loading branch information
ZhaoYP-2001 authored Oct 24, 2024
1 parent 56a446b commit 746b245
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/ip-whitelist/ip-whitelist.md
Original file line number Diff line number Diff line change
@@ -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:

<video src="/img/ip-whitelist/ip_whitelist.mp4" controls="controls" width="100%"></video>
8 changes: 8 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Binary file added static/img/ip-whitelist/app_ip_whitelist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/ip-whitelist/ip_whitelist.mp4
Binary file not shown.
Binary file added static/img/ip-whitelist/org_ip_whitelist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/ip-whitelist/user_ip_whitelist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 746b245

Please sign in to comment.