1

We want to use a service principal in Azure ML to access the Workspace as described here, and are wondering how to save the SP password. It says correctly to not store it in the juypter sources, but to use os.environ['AML_PRINCIPAL_PASS'] instead. But how do I get it into the environment in a way that survives reboot of compute instance etc?

There is a Keyvault in the workspace, but I need to authenticate the SP first before I can access the workspace and thus the keyvault.

Anders Swanson
  • 3,637
  • 1
  • 18
  • 43
dashambles
  • 529
  • 8
  • 22
  • are you trying to authenticate from an Azure ML Compute instance to the Azure ML workspace? – Anders Swanson Oct 28 '20 at 23:50
  • Yes, exactly as in the examples on the linked page. The main use case is from the Juypter Notebooks in ML to access the Workspace. – dashambles Oct 29 '20 at 09:11
  • 1
    You could set up the Compute Instance with ssh access, and then run ssh "export AML_PRINCIPAL_PASS=". to set the secret variable from a value on your local computer. But I agree it's bit of a chicken-and-egg problem. – Roope Astala - MSFT Oct 29 '20 at 17:17
  • That would contradict my understanding of a unix environment (variable). Is it not bound to the session? – dashambles Oct 30 '20 at 15:35

0 Answers0