-
Notifications
You must be signed in to change notification settings - Fork 155
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
User username as VM username rather than random ID #4333
User username as VM username rather than random ID #4333
Conversation
Fixes microsoft#4325 Add platform-specific initialization scripts for dev container. * **Add `initialize.sh` script**: Create directories `.azure` and `.config` in the user's home directory using Bash. * **Add `initialize.cmd` script**: Create directories `.azure` and `.config` in the user's profile directory using Windows command line. * **Update `initializeCommand` in `devcontainer.json`**: Use array syntax to reference the new platform-specific initialization scripts. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/AzureTRE/issues/4325?shareId=XXXX-XXXX-XXXX-XXXX).
…robi/username-as-username
…robi/username-as-username
Unit Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 580e43c. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 20 changed files in this pull request and generated no comments.
Files not reviewed (16)
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/template_schema.json: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/.terraform.lock.hcl: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/data.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/linuxvm.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/main.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/outputs.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/variables.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/template_schema.json: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/.terraform.lock.hcl: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/data.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/locals.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/main.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/outputs.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/variables.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/windowsvm.tf: Language not supported
Comments suppressed due to low confidence (1)
resource_processor/resources/commands.py:145
- The comment contains a spelling mistake: 'ot' should be 'to', 'detaisl' should be 'details', and 'objec tID' should be 'object ID'.
return msg_body.get("ownerId") # not included in all messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 20 changed files in this pull request and generated no comments.
Files not reviewed (16)
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/template_schema.json: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/.terraform.lock.hcl: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/data.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/linuxvm.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/main.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/outputs.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/variables.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/template_schema.json: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/.terraform.lock.hcl: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/data.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/locals.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/main.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/outputs.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/variables.tf: Language not supported
- templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/windowsvm.tf: Language not supported
Comments suppressed due to low confidence (1)
resource_processor/resources/commands.py:145
- [nitpick] The parameter name 'owner_id' should be checked for consistency with the rest of the codebase.
return msg_body.get("ownerId")
/test-extended |
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/13183175950 (with refid (in response to this comment from @marrobi) |
@marrobi ok to update this branch? will give it a test locally |
…robi/username-as-username
Done. |
Gave it a quick test on a local instance and worked nicely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Couple of small comments re username calculation.
@marrobi Re the username calculation logic -
We use internal member accounts, and so would prefer if the UPN was used first - so the username aligns with the user's Entra username, rather than external email accounts which will come from a variety of domains and potentially in different formats. Though understand a lot of people will be using external guest accounts. Could the logic be something like this instead, so the UPN is preferred unless its a guest account:
I think that would look something like:
|
...ates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf
Outdated
Show resolved
Hide resolved
...es/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/locals.tf
Outdated
Show resolved
Hide resolved
...es/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/locals.tf
Show resolved
Hide resolved
...ates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf
Outdated
Show resolved
Hide resolved
...workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/windowsvm.tf
Show resolved
Hide resolved
...es/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/locals.tf
Show resolved
Hide resolved
/test |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/13416348783 (with refid (in response to this comment from @marrobi) |
Fixes #1148 #3693
Users email prior to the @ sign (as external users have unhelpful UPNs), or if no email UPN prior to the @ sign, as the username, limits to 20 chars.
Needed to update resource processor to pick OwnerId from the message and used AD TF provider to get details from user objectID.