|
| 1 | +# Network Security |
| 2 | + |
| 3 | +<Tip warning={true}> |
| 4 | +This feature is part of the <a href="https://huggingface.co/enterprise">Enterprise Plus</a> plan. |
| 5 | +</Tip> |
| 6 | + |
| 7 | +## Define your organization IP Ranges |
| 8 | + |
| 9 | +You can list the IP addresses of your organization's outbound traffic to apply for higher rate limits and/or to enforce authenticated access to Hugging Face from your corporate network. |
| 10 | +The outbound IP address ranges are defined in <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" target="_blank">CIDR</a> format. For example, `52.219.168.0/24` or `2600:1f69:7400::/40`. |
| 11 | + |
| 12 | +You can set multiple ranges, one per line. |
| 13 | + |
| 14 | +<div class="flex justify-center"> |
| 15 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/network-sec-ip-ranges.png" alt="Screenshot of the Organization IP Ranges field."/> |
| 16 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/dark-network-sec-ip-ranges.png" alt="Screenshot of the Organization IP Ranges field."/> |
| 17 | +</div> |
| 18 | + |
| 19 | + |
| 20 | +## Higher Rate Limits |
| 21 | + |
| 22 | +Apply for higher rate-limits for your organization. |
| 23 | + |
| 24 | +Most of the actions on the Hub have limits, for example, users are limited to creating to a certain number of repositories per day. This option allows your organization to apply for higher limits for your organization members. |
| 25 | + |
| 26 | +To activate this option, |
| 27 | + |
| 28 | +1. Toggle on the "Higher Hub rate-limits" option |
| 29 | + |
| 30 | +<div class="flex justify-center"> |
| 31 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/network-sec-rate-limit.png" alt="Screenshot of the toggle to enable High rate-limits."/> |
| 32 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/dark-network-sec-rate-limit.png" alt="Screenshot of the toggle to enable High rate-limits."/> |
| 33 | +</div> |
| 34 | + |
| 35 | +Please note, your Enterprise Hub Plus subscription will be verified when activating this option. |
| 36 | + |
| 37 | +2. Ensure the Organization IP Ranges is defined |
| 38 | + |
| 39 | +Once defined, higher rate limits will apply to the member of your organization with IPs matching the defined ranges. |
| 40 | + |
| 41 | + |
| 42 | +## Enforce authenticated access to the Hugging Face Hub |
| 43 | + |
| 44 | +This option will ensure that, when browsing from your corporate network, only authenticated users belonging to your organization are able to access the Hugging Face Hub. All public pages will show the following message if access unauthenticated: |
| 45 | + |
| 46 | +<div class="flex justify-center"> |
| 47 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/network-sec-restricted-url.png" alt="Screenshot of restricted pages on the Hub."/> |
| 48 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/dark-network-sec-restricted-url.png" alt="Screenshot of restricted pages on the Hub."/> |
| 49 | +</div> |
| 50 | + |
| 51 | +1. Toggle on the "Enforce authenticated access to the Hub" option |
| 52 | + |
| 53 | +<div class="flex justify-center"> |
| 54 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/network-sec-enforce-auth.png" alt="Screenshot of the toggle to enable Enforced authenticated access to the Hub."/> |
| 55 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/dark-network-sec-enforce-auth.png" alt="Screenshot of the toggle to enable Enforced authenticated access to the Hub."/> |
| 56 | +</div> |
| 57 | + |
| 58 | +Please note, your Enterprise Hub Plus subscription will be verified when activating this option. |
| 59 | + |
| 60 | +2. Ensure the Organization IP Ranges is defined |
| 61 | + |
| 62 | + |
| 63 | +### Content Access Policy |
| 64 | + |
| 65 | +You can also define a fine grained Content Access Policy by blocking some section of the Hugging Face Hub. |
| 66 | + |
| 67 | +For example, you can block your organization's members to access Spaces, by adding `/spaces/*` to the blocked URLs. When users of your organization will navigate to a page that matches the URL pattern they'll be presented the following page: |
| 68 | + |
| 69 | +<div class="flex justify-center"> |
| 70 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/network-sec-blocked-url.png" alt="Screenshot of blocked pages on the Hub."/> |
| 71 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/dark-network-sec-blocked-url.png" alt="Screenshot of blocked pages on the Hub."/> |
| 72 | +</div> |
| 73 | + |
| 74 | +To define Blocked URLs, enter URL patterns, without the domain name, one per line: |
| 75 | + |
| 76 | +<div class="flex justify-center"> |
| 77 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/network-sec-cap.png" alt="Screenshot of blocked pages on the Hub."/> |
| 78 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise/dark-network-sec-cap.png" alt="Screenshot of blocked pages on the Hub."/> |
| 79 | +</div> |
| 80 | + |
| 81 | +The Allowed URLs field, enables you to define some exception to the blocking rules, especially. For example by allowing a specific URL within the Blocked URLs pattern, ie `/spaces/meta-llama/*` |
0 commit comments