Skip to content

Commit ccd036b

Browse files
authored
Merge pull request github#25487 from github/mm-cs-port-visibility
Adding port visibility docs
2 parents 9aa82f2 + 18a05d5 commit ccd036b

File tree

13 files changed

+105
-4
lines changed

13 files changed

+105
-4
lines changed
67 KB
Loading
16.1 KB
Loading
35.1 KB
Loading
11.5 KB
Loading
7.03 KB
Loading

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ If you need to allow external access to services running on a codespace, you can
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

59+
Organization owners can restrict the ability to make forward ports available publicly or within the organization. For more information, see "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)."
60+
5961
**Privately forwarded ports**: Are accessible on the internet, but only the codespace creator can access them, after authenticating to {% data variables.product.product_name %}.
6062

6163
**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 %}.

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ When an application running inside a codespace prints output to the terminal tha
2525

2626
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.
2727

28+
{% note %}
29+
30+
**Note**: {% data reusables.codespaces.restrict-port-visibility %}
31+
32+
{% endnote %}
33+
2834
## Forwarding a port
2935

3036
You can manually forward a port that wasn't forwarded automatically.
@@ -85,12 +91,18 @@ To see details of forwarded ports enter `gh codespace ports` and then choose a c
8591

8692
{% note %}
8793

88-
**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 %}.
94+
**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 %}.
8995

9096
{% endnote %}
9197

9298
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 who knows the URL and port number can view the running application without needing to authenticate.
9399

100+
{% note %}
101+
102+
**Note:** Your choice of port visibility options may be limited by a policy configured for your organization. For more information, see "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)."
103+
104+
{% endnote %}
105+
94106
{% webui %}
95107

96108
{% data reusables.codespaces.navigate-to-ports-tab %}
@@ -105,7 +117,7 @@ If you want to share a forwarded port with others, you can either make the port
105117
{% vscode %}
106118

107119
{% data reusables.codespaces.navigate-to-ports-tab %}
108-
1. Right click the port you want to share, then click **Make Public**.
120+
1. Right click the port that you want to share, select the "Port Visibility" menu, then click **Private to Organization** or **Public**.
109121
![Option to make port public in right-click menu](/assets/images/help/codespaces/make-public-option.png)
110122
1. To the right of the local address for the port, click the copy icon.
111123
![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)

content/codespaces/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Once your codespace is created, your repository will be automatically cloned int
4141

4242
If you're following along with a different application type, enter the corresponding start command for that project.
4343

44-
2. When your application starts, the codespace recognizes the port the application is running on and displays a prompt to forward that port so you can connect to it.
44+
2. When your application starts, the codespace recognizes the port the application is running on and displays a prompt to let you know it has been forwarded.
4545

4646
![Port forwarding toast](/assets/images/help/codespaces/quickstart-port-toast.png)
4747

content/codespaces/managing-codespaces-for-your-organization/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ children:
1414
- /managing-repository-access-for-your-organizations-codespaces
1515
- /reviewing-your-organizations-audit-logs-for-codespaces
1616
- /restricting-access-to-machine-types
17+
- /restricting-the-visibility-of-forwarded-ports
1718
shortTitle: Managing your organization
1819
---
1920

content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ As an organization owner, you may want to configure constraints on the types of
2020

2121
### Behavior when you set a machine type constraint
2222

23-
If there are existing codespaces that no longer conform to a policy you have defined, these codespaces will continue to operate until they time out. When the user attempts to resume the codespace they are shown a message telling them that the currenly selected machine type is no longer allowed for this organization and prompting them to choose an alternative machine type.
23+
If there are existing codespaces that no longer conform to a policy you have defined, these codespaces will continue to operate until they are stopped or time out. When the user attempts to resume the codespace they are shown a message telling them that the currenly selected machine type is no longer allowed for this organization and prompting them to choose an alternative machine type.
2424

2525
If you remove higher specification machine types that are required by the {% data variables.product.prodname_codespaces %} configuration for an individual repository in your organization, then it won't be possible to create a codespace for that repository. When someone attempts to create a codespace they will see a message telling them that there are no valid machine types available that meet the requirements of the repository's {% data variables.product.prodname_codespaces %} configuration.
2626

0 commit comments

Comments
 (0)