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

[WIP] Check that a user belongs to the correct SHM domain when registering with an SRE #2292

Open craddm opened 1 day ago

craddm commented 1 day ago

…with SRE

:white_check_mark: Checklist

:vertical_traffic_light: Depends on

:arrow_heading_up: Summary

Adds a check of the user's principal name when registering with an SRE. If the domain in the principal name does not match the FQDN of the SHM that the SRE is linked to, the user will not be added to the SRE's security group and an error will be printed explaining why.

:closed_umbrella: Related issues

Closes #2275

:microscope: Tests

Tested locally

github-actions[bot] commented 1 day ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/commands
  users.py 150-164
Project Total  

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