Closed sebastus closed 3 years ago
A major note on the owner role check, the only time it needs to be checked is for launchpad mode only See the old rover code
For all other deployments no checks are made
Just checked rovergo and our owner check https://github.com/aztfmod/rovergo/blob/d3d7b15cf71c499ec26a16e8a2498e8bd5f26ed4/pkg/azure/auth.go#L35 Is only called by runLaunchpadInit https://github.com/aztfmod/rovergo/blob/d3d7b15cf71c499ec26a16e8a2498e8bd5f26ed4/pkg/landingzone/landingzone.go#L211 so I think we're ok 🥇
Getting the objectId however is mandatory and is required by the CAF terraform in a TF_VAR
The initial stage of resolving this issue is to enumerate the cases as comments in test/integration/auth_test.go
Additional authentication cases have been discovered. We need all of them to be handled correctly.
Expected Behavior
All of these authentication cases should work, az login: (on an Azure VM)
All of the above cases should work where the logged in ID has permissions:
In cases above where --username (-u) parameter is specified to az login, must work with: (with MI only - not spn)
In addition to the above cases, az login with a user principal should work:
Desired outcome includes creation of unit tests for each of the cases.
Actual Behavior
Some of the above cases are handled correctly, but not all.
Steps to Reproduce the Problem