astro-cli icon indicating copy to clipboard operation
astro-cli copied to clipboard

Restrict port exposure for local project to localhost

Open neel-astro opened this issue 2 years ago โ€ข 3 comments

Description

Changes:

  • Restrict the local project's port exposure to just 127.0.0.1, instead of allowing anyone in the network to access the webserver/Postgres port

๐ŸŽŸ Issue(s)

Related #685

๐Ÿงช Functional Testing

List the functional testing steps to confirm this feature or fix.

๐Ÿ“ธ Screenshots

Add screenshots to illustrate the validity of these changes.

๐Ÿ“‹ Checklist

  • [x] Rebased from the main (or release if patching) branch (before testing)
  • [ ] Ran make test before taking out of draft
  • [x] Ran make lint before taking out of draft
  • [x] Added/updated applicable tests
  • [ ] Tested against Astro-API (if necessary).
  • [ ] Tested against Houston-API and Astronomer (if necessary).
  • [ ] Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • [ ] Updated any related documentation

neel-astro avatar Sep 20 '22 15:09 neel-astro

@neel-astro i think you should fix few tests.

andriisoldatenko avatar Sep 20 '22 15:09 andriisoldatenko

Codecov Report

Base: 86.85% // Head: 86.88% // Increases project coverage by +0.02% :tada:

Coverage data is based on head (1af3500) compared to base (ac51795). Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #742      +/-   ##
==========================================
+ Coverage   86.85%   86.88%   +0.02%     
==========================================
  Files          97       97              
  Lines        8264     8264              
==========================================
+ Hits         7178     7180       +2     
+ Misses        640      639       -1     
+ Partials      446      445       -1     
Impacted Files Coverage ฮ”
airflow_versions/airflow_versions.go 100.00% <0.00%> (+3.44%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 21 '22 10:09 codecov[bot]

code LGTM, but please check CI.

looked like some tests were failing as Astro Dev environment was down for sometime yesterday, tests are working fine now

neel-astro avatar Sep 21 '22 10:09 neel-astro

FWIW, we just updated to astro CLI 1.11.0 where this change landed and it breaks our development setup, which is:

  1. Run astro dev start on a remote server (in our case a VM in Azure where we connect over ssh)
  2. Setup port 8080 forwarding from that remote machine to the laptop where we run a browser to access the Airflow UI

But because of this change, the web server will only listen on the localhost/127.0.0.1 and the port forwarding will not work.

tehe avatar Mar 03 '23 18:03 tehe

We are already aware of this issue and are working on a fix/workaround. We will try to land the fix in the next release. Thanks for reporting it @tehe

neel-astro avatar Mar 03 '23 18:03 neel-astro