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
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Access** > **Applications**.
10
11
2. Select **Add an application**.
11
12
3. Select **Infrastructure**.
12
13
4. Enter any name for the application.
13
14
5. In **Target criteria**, select the target hostname(s) that will represent the application. The application definition will apply to all targets that share the selected hostname, including any targets added in the future.
14
15
6. Enter the **Protocol** and **Port** that will be used to connect to the server.
15
16
7. (Optional) If a protocol runs on more than one port, select **Add new target criteria** and reconfigure the same target hostname and protocol with a different port number.
16
-
:::note
17
-
Access for Infrastructure only supports assigning one protocol per port. You can reuse a port/protocol pairing across infrastructure applications, but the port cannot be reassigned to another protocol.
18
-
:::
17
+
:::note
18
+
Access for Infrastructure only supports assigning one protocol per port. You can reuse a port/protocol pairing across infrastructure applications, but the port cannot be reassigned to another protocol.
19
+
:::
19
20
8. Select **Next**.
20
21
9. To secure your targets, configure a policy that defines who can connect and how they can connect:
21
-
1. Enter any name for your policy.
22
-
2. Create a rule that matches the users who are allowed to reach the targets. For more information, refer to [Access policies](/cloudflare-one/policies/access/) and review the list of [infrastructure policy selectors](/cloudflare-one/applications/non-http/infrastructure-apps/#infrastructure-policy-selectors).
23
-
3. In **Connection context**, configure the following settings:
24
-
-**SSH user**: Enter the UNIX usernames that users can log in as (for example, `root` or `ec2-user`).
25
-
-**Allow users to log in as their email alias**: (Optional) When selected, users who match your policy definition will be able to access the target using their email address prefix. For example, `[email protected]` could log in as `jdoe`.
26
22
27
-
:::note
28
-
Cloudflare will not create new users on the target. UNIX users must already be present on the server.
29
-
:::
23
+
1. Enter any name for your policy.
24
+
2. Create a rule that matches the users who are allowed to reach the targets. For more information, refer to [Access policies](/cloudflare-one/policies/access/) and review the list of [infrastructure policy selectors](/cloudflare-one/applications/non-http/infrastructure-apps/#infrastructure-policy-selectors).
25
+
3. In **Connection context**, configure the following settings:
26
+
27
+
-**SSH user**: Enter the UNIX usernames that users can log in as (for example, `root` or `ec2-user`).
28
+
-**Allow users to log in as their email alias**: (Optional) When selected, users who match your policy definition will be able to access the target using their email address prefix. For example, `[email protected]` could log in as `jdoe`.
30
29
31
-
4. Select **Add application**.
30
+
:::note
31
+
Cloudflare will not create new users on the target. UNIX users must already be present on the server.
32
+
:::
32
33
33
-
</TabItem>
34
+
10. Select **Add application**.
35
+
36
+
</TabItem>
34
37
<TabItemlabel="API">
35
38
36
39
1.[Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions:
37
-
| Type | Item | Permission |
38
-
| ------- | ---------------- | ---------- |
39
-
| Account | Access: Apps & Policies | Edit |
40
40
41
-
1. Make a `POST` request to the [Access applications](/api/resources/zero_trust/subresources/access/subresources/applications/methods/create/) endpoint:
2. Make a `POST` request to the [Access applications](/api/resources/zero_trust/subresources/access/subresources/applications/methods/create/) endpoint:
3. Use the [`cloudflare_zero_trust_access_policy`](https://registry.terraform.io/providers/cloudflare/cloudflare/4.45.0/docs/resources/zero_trust_access_policy) resource to add an infrastructure policy to the application:
0 commit comments