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

improved username generation for new users #2320

Open
5 of 8 tasks
edchapman88 opened this issue Nov 28, 2024 · 2 comments
Open
5 of 8 tasks

improved username generation for new users #2320

edchapman88 opened this issue Nov 28, 2024 · 2 comments
Labels
enhancement New functionality that should be added to the Safe Haven good first issue This is a good issue for newcomers to the project to tackle

Comments

@edchapman88
Copy link

edchapman88 commented Nov 28, 2024

✅ Checklist

  • I have searched open and closed issues for duplicates.
  • This is a request for a new feature in the Data Safe Haven or an upgrade to an existing feature.
  • The feature is still missing in the latest version.
  • I have read through the documentation.
  • This isn't an open-ended question (open a discussion if it is).

🍓 Suggested change

  1. Validate that the autogenerated usernames for new users meet the requirements specified by Entra ID (e.g. not all characters are allowed, such as "Ö").
  2. Return the autogenerated usernames for the newly created users from the dsh users add command in a structured/concise format.

🚂 How could this be done?

  1. Extend the username generation function to sanitise inputs such that they meet the username criteria specified by Entra ID.
    • Optionally a different mechanism for generating usernames could be implemented (rather than <firstname>.<surname>), e.g. random words / numbers.
  2. Implement a function that writes to stdout at the end of the command (after all users have been created) so it appears last in the calling shell. Write e.g. an ascii table similar to that of the dsh users list command. This is more user friendly where the new usernames must be passed on to another process (e.g. saved in a spreadsheet in the case of DSGs).
@edchapman88 edchapman88 added the enhancement New functionality that should be added to the Safe Haven label Nov 28, 2024
@edchapman88 edchapman88 changed the title username generation for new users improved username generation for new users Nov 28, 2024
@JimMadge JimMadge added the good first issue This is a good issue for newcomers to the project to tackle label Dec 10, 2024
@github-project-automation github-project-automation bot moved this to To Be Refined in Data Safe Haven Jan 7, 2025
@JimMadge JimMadge moved this from To Be Refined to Ready to Work in Data Safe Haven Jan 7, 2025
@jemrobinson
Copy link
Member

This isn't a problem with a programmatic solution. I suggest that the DSH code should add a field for "username" and let the TRE operator decide.

(Note that we still need to come up with a solution for TRESA - one option could be to ask the users to decide for themselves).

@helendduncan
Copy link

Agree with issues of accents - also names with spaces fail (didn't try hyphens)

When processing a number of users, it is useful that if one fails, the process continues rather than stopping and needing re-starting

Current time to generate one user and verify they exist on Entra is approximately 90 seconds - is this something that can be sped up? Parallelised?

Is the country code needed in the input? It's a small barrier when generating users - external programs can fairly readily be made to extract the country code from the phone number, but then is that something that should or could be done within the DSH code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New functionality that should be added to the Safe Haven good first issue This is a good issue for newcomers to the project to tackle
Projects
Status: Ready to Work
Development

No branches or pull requests

4 participants