alan-turing-institute / data-safe-haven

https://data-safe-haven.readthedocs.io
BSD 3-Clause "New" or "Revised" License
61 stars 15 forks source link

Allow 'Internet' for data providers IP #2247

Closed JimMadge closed 1 week ago

JimMadge commented 1 month ago

:white_check_mark: Checklist

:vertical_traffic_light: Depends on

2246

:arrow_heading_up: Summary

Allows data providers (as well as research users) IP addresses to be defined as the Azure service tag 'Internet'.

:closed_umbrella: Related issues

:microscope: Tests

Tested on a new deployment. Ingress and Egress blobs anonymous access and with SAS token. Checked download from egress is possible with appropriate SAS token. Checked upload to ingress is possible with appropriate SAS token.

With the storage account set to allow all network connections and blob public access disabled (which is default, but also explicitly set here),

With the storage account URL, you cannot anonymously access the containers

Screenshot 2024-10-31 at 15 35 07

With a valid SAS token you can access the containers and manipulate the data according to the permissions the SAS allows

Screenshot 2024-10-31 at 15 36 09
github-actions[bot] commented 1 month ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/config
  config_sections.py
  data_safe_haven/infrastructure/components/wrapped
  nfsv3_storage_account.py 36-41
  data_safe_haven/infrastructure/programs/sre
  data.py 67, 109-120
  data_safe_haven/validators
  validators.py
Project Total  

This report was generated by python-coverage-comment-action

JimMadge commented 1 month ago

This might be a bit more tricky as storage accounts use IP address ranges and not service tags for restricting external access.

It is possible to allow connection from any network.

JimMadge commented 2 weeks ago

Should this be targeting develop instead of latest?

I did have it as a hotfix. However, happy to move it to the next minor release as that should be soon, and this does change networking somewhat.