Pass in the resource name regardless of if its a VM or managed identity
This commit is contained in:
parent
7e47c70af2
commit
37207793f9
1 changed files with 1 additions and 6 deletions
|
@ -266,13 +266,8 @@ func (p *Azure) authorizeToken(token string) (*azurePayload, string, string, str
|
|||
|
||||
var subscription, group, name string
|
||||
identityObjectID := claims.ObjectID
|
||||
subscription, group, name = re[1], re[2], re[4]
|
||||
|
||||
if strings.Contains(claims.XMSMirID, "virtualMachines") {
|
||||
subscription, group, name = re[1], re[2], re[4]
|
||||
} else {
|
||||
// This is not a VM resource ID so we don't have the VM name so set that to the empty string
|
||||
subscription, group, name = re[1], re[2], ""
|
||||
}
|
||||
return &claims, name, group, subscription, identityObjectID, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue