Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure a port as public in portsAttributes #6363

Open
arcanis opened this issue Feb 20, 2022 · 5 comments
Open

Configure a port as public in portsAttributes #6363

arcanis opened this issue Feb 20, 2022 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality remote-explorer
Milestone

Comments

@arcanis
Copy link

arcanis commented Feb 20, 2022

I'd like to configure a port to always be publicly exposed (for context, it exposes a callback API that third-party webhooks are expected to call; the rest of the application will be kept private on a separate port). It doesn't seem possible at the moment in portsAttributes.

Ref https://g.nite07.orgmunity/t/can-you-mark-a-port-as-public-in-devcontainer-json/219944 (cc @alexbjorlig)

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Feb 20, 2022
@alexr00 alexr00 added the feature-request Request for new features or functionality label Feb 22, 2022
@gjsjohnmurray
Copy link

@alexr00
Copy link
Member

alexr00 commented Mar 31, 2023

If we make remote.portsAttributes a trusted workspace setting then this could be ok. Tentatively assigning to May.

@alexr00 alexr00 modified the milestones: Backlog, May 2023 Mar 31, 2023
@alexr00 alexr00 added remote-explorer and removed containers Issue in vscode-remote containers labels Mar 31, 2023
@alexr00
Copy link
Member

alexr00 commented May 22, 2023

After further investigation and discussion:

  • We should only respect a setting to make ports public when the workspace is trusted.
  • Workspace trust does not exist in Codespaces
  • There is a concept of repository trust in GitHub.com's Codespaces settings
  • There is not a way to read this Codespace repository trust setting

I'm going to table this feature request until we have a way to tell if a workspace or repository is trusted in Codespaces.

In the mean time, I have made several improvements that will reduce friction:

  • There's a "Make Public" button on the forwarded port notification in web
  • If you make an auto forwarded port public it will stay public for that session (if the port un forwards and the re forwards it will stay public)
  • If you make a port that's forwarded by the Codespace public, disconnect, then reconnect, it will reforward as public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality remote-explorer
Projects
None yet
Development

No branches or pull requests

4 participants
@arcanis @gjsjohnmurray @alexr00 and others