8000 [October 25, 2021] Access control for forwarded ports (#21913) · my-lambda-projects/docs@2ce8dbc · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ce8dbc

Browse files
[October 25, 2021] Access control for forwarded ports (github#21913)
* update supporting docs * update sharing a port * Update image * Clean up typos * Apply suggestions from code review Co-authored-by: Sarah Edwards <skedwards88@github.com> * Add note about availability of feature * Update menu name * Update image for new UI Co-authored-by: Sarah Edwards <skedwards88@github.com>
1 parent ba5e2fe commit 2ce8dbc

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed
Loading

content/codespaces/codespaces-reference/security-in-codespaces.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,18 @@ An organization's administrators specify which repositories should be considered
4848

4949
### Codespace connections
5050

51-
You can connect to your codespace using the TLS encrypted tunnel provided by the {% data variables.product.prodname_codespaces %} service. Only the creator of a codespace can connect to a codespace. Connections are authenticated with {% data variables.product.product_name %}.
51+
You can connect to your codespace using the TLS encrypted tunnel provided by the {% data variables.product.prodname_codespaces %} service. Only the creator of a codespace can connect to a codespace. Connections are authenticated with {% data variables.product.product_name %}.
5252

53-
If you need to allow external access to services running on a codespace, you can enable port forwarding for private or public access.
53+
If you need to allow external access to services running on a codespace, you can enable port forwarding for private or public access.
5454

5555
### Port forwarding
5656

5757
If you need to connect to a service (such as a development web server) running within your codespace, you can configure port forwarding to make the service available on the internet.
5858

5959
**Privately forwarded ports**: Are accessible on the internet, but only the codespace creator can access them, after authenticating to {% data variables.product.product_name %}.
6060

61+
**Publicly forwarded ports within your organization**: Are accessible on the internet, but only to members of the same organization as the codespace, after authenticating to {% data variables.product.product_name %}.
62+
6163
**Publicly forwarded ports**: Are accessible on the internet, and anyone on the internet can access them. No authentication is needed to access public forwarded ports.
6264

6365
All forwarded ports are private by default, which means that you will need to authenticate before you can access the port. Access to a codespace's private forwarded ports is controlled by authentication cookies with a 3-hour expiry period. When the cookie expires, you will need to reauthenticate.

content/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ topics:
1515
shortTitle: Forward ports
1616
---
1717

18-
19-
2018
## About forwarded ports
2119

2220
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on port 4000, you can access the application from your browser to test and debug the application.
@@ -25,7 +23,7 @@ When an application running inside a codespace outputs a port to the console, {%
2523

2624
![Automatic port forwarding](/assets/images/help/codespaces/automatic-port-forwarding.png)
2725

28-
You can also forward a port manually, label forwarded ports, share forwarded ports publicly, and add forwarded ports to the codespace configuration.
26+
You can also forward a port manually, label forwarded ports, share forwarded ports with members of your organization, share forwarded ports publicly, and add forwarded ports to the codespace configuration.
2927

3028
## Forwarding a port
3129

@@ -57,11 +55,17 @@ You can label a port to make the port more easily identifiable in a list.
5755

5856
## Sharing a port
5957

60-
If you want to share a forwarded port with others, you need to make the port public. After you make a port public, anyone with the port's URL can view the running application without needing to authenticate.
58+
{% note %}
59+
60+
**Note:** You can only make a port private to an organization if your organization uses {% data variables.product.prodname_team %} or {% data variables.product.prodname_ghe_cloud %}. This feature is not currently available in the beta version of {% data variables.product.prodname_codespaces %}.
61+
62+
{% endnote %}
63+
64+
If you want to share a forwarded port with others, you can either make the port private to your organization or make the port public. After you make a port private to your organization, anyone in the organization with the port's URL can view the running application. After you make a port public, anyone with the port's URL can view the running application without needing to authenticate.
6165

6266
{% data reusables.codespaces.navigate-to-ports-tab %}
63-
1. Right click the port you want to share, then click **Make Public**.
64-
![Option to make port public in right-click menu](/assets/images/help/codespaces/make-public-option.png)
67+
1. Right click the port that you want to share, select the "Port Visibility" menu, then click **Private to Organization** or **Public**.
68+
![Option to select port visibility in right-click menu](/assets/images/help/codespaces/make-public-option.png)
6569
1. To the right of the local address for the port, click the copy icon.
6670
![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)
6771
1. Send the copied URL to the person you want to share the port with.

content/codespaces/getting-started/deep-dive.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ When you close or stop your codespace, all uncommitted changes are preserved unt
6868

6969
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on port 4000 within your codespace, you can automatically forward that port to make the application accessible from your browser.
7070

71-
Port forwarding determines which ports are made accessible to you from the remote machine. Even if you do not forward a port, that port is still accessible to other processes running inside the codespace itself.
71+
Port forwarding determines which ports are made accessible to you from the remote machine. Even if you do not forward a port, that port is still accessible to other processes running inside the codespace itself.
7272

7373
![Diagram showing how port forwarding works in a codespace](/assets/images/help/codespaces/port-forwarding.png)
7474

7575
When an application running inside {% data variables.product.prodname_codespaces %} outputs a port to the console, {% data variables.product.prodname_codespaces %} detects the localhost URL pattern and automatically forwards the port. You can click on the URL in the terminal or in the toast message to open the port in a browser. By default, {% data variables.product.prodname_codespaces %} forwards the port using HTTP. For more information on port forwarding, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
7676

77-
While ports can be forwarded automatically, they are not publicly accessible to the internet. By default, all ports are private, but you can [manually make a port public](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#sharing-a-port) to share access through a URL.
77+
While ports can be forwarded automatically, they are not publicly accessible to the internet. By default, all ports are private, but you can manually make a port available to your organization or public, and then share access through a URL. For more information, see "[Sharing a port](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#sharing-a-port)."
7878

7979
Running your application when you first land in your codespace can make for a fast inner dev loop. As you edit, your changes are automatically saved and available on your forwarded port. To view changes, go back to the running application tab in your browser and refresh it.
8080

0 commit comments

Comments
 (0)
0