microsoft / AzureTRE

An accelerator to help organizations build Trusted Research Environments on Azure.
https://microsoft.github.io/AzureTRE
MIT License
169 stars 133 forks source link

How to access MySQL service from VM in workspace? #3957

Open TonyWildish-BH opened 1 month ago

TonyWildish-BH commented 1 month ago

Description

In my Azure TRE deployment I am trying to access a MySQL service that I've deployed in my workspace. The MySQL service details tab gives me the host name, but I don't have the username or password that I need to connect to it.

Looking in the Terraform code, it's clear a random password is generated, but how do I find out what it is?

Bonus points, there doesn't seem to be any documentation for the MySQL service in the AzureTRE documentation site?

tim-allen-ck commented 1 month ago

Hi @TonyWildish-BH the password gets stored into key vault so currently you would need access to the key vault secret. Yes I've noticed there's no documentation for the MySQL service, I've raised a separate issue for the documentation. #3958

TonyWildish-BH commented 1 month ago

Thanks. I've looked in the vault in my workspace, and found the password. However, I don't see how this is supposed to get from the vault to the user.

I don't want users going into the Azure portal to dig into the vault, and I don't want to have to go digging into it myself every time a user sets up a MySQL service, so what's the recommended way for a workspace admin to get their MySQL password?

marrobi commented 1 month ago

I am aware of this being used where the researcher was granted cli/phython sdk access to the KeyVault.

However another approach discussed, probably better, but never implemented was to deploy https://github.com/phpmyadmin/phpmyadmin alongside the service to provide access and allow users to mange MySQL.

Also referenced here - https://github.com/microsoft/AzureTRE/issues/2401