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

Existing users domains not matching when added #2275

Open helendduncan opened 2 weeks ago

helendduncan commented 2 weeks ago

:white_check_mark: Checklist

:computer: System information

:package: Packages

List of packages ```none Paste list of packages here ```

:no_entry_sign: Describe the problem

A test SRE was sucsessfully deployed and two users were added to it via the CLI. One user (Bob Smith) had a bob.smith@prod4... Entra user which was updated. The second user (James Allen) did not, and their Entra user was created.

Both Bob and James were added to the test SRE users group - however Bob, with the prod4 account, couldn't see any connections the guacamole interface.

This is because the domain doesn't match the expected domain.

:steam_locomotive: Workarounds or solutions

Manually editing Bob's User principal name Domain via Entra allowed access, but would need to be manually edited for all users who had accounts from previous iterations of DSH

JimMadge commented 1 week ago

I think this is working as intended. I don't think we would want the add command to modify existing users primary domain, at least not without a guard.

What behaviour would you want?

Perhaps the CLI should close with an error if a user already exists, or already exists and isn't an "SRE user".

JimMadge commented 1 week ago

Also worth clarifiying,