Rename new fields as per feedback to remove AAD from the name

This commit is contained in:
vijayjt 2022-02-24 09:26:45 +00:00
parent 8b68bedffa
commit 4a10f2c584
2 changed files with 5 additions and 5 deletions

View file

@ -90,7 +90,7 @@ type Azure struct {
TenantID string `json:"tenantID"`
ResourceGroups []string `json:"resourceGroups"`
SubscriptionIDs []string `json:"subscriptionIDs"`
AadObjectIDs []string `json:"aadObjectIDs"`
ObjectIDs []string `json:"ObjectIDs"`
Audience string `json:"audience,omitempty"`
DisableCustomSANs bool `json:"disableCustomSANs"`
DisableTrustOnFirstUse bool `json:"disableTrustOnFirstUse"`
@ -308,9 +308,9 @@ func (p *Azure) AuthorizeSign(ctx context.Context, token string) ([]SignOption,
}
// Filter by Azure AD identity object id
if len(p.AadObjectIDs) > 0 {
if len(p.ObjectIDs) > 0 {
var found bool
for _, i := range p.AadObjectIDs {
for _, i := range p.ObjectIDs {
if i == identityObjectID {
found = true
break

View file

@ -403,7 +403,7 @@ func TestAzure_AuthorizeSign(t *testing.T) {
p7, err := generateAzure()
assert.FatalError(t, err)
p7.TenantID = p1.TenantID
p7.AadObjectIDs = []string{"the-oid"}
p7.ObjectIDs = []string{"the-oid"}
p7.config = p1.config
p7.oidcConfig = p1.oidcConfig
p7.keyStore = p1.keyStore
@ -411,7 +411,7 @@ func TestAzure_AuthorizeSign(t *testing.T) {
p8, err := generateAzure()
assert.FatalError(t, err)
p8.TenantID = p1.TenantID
p8.AadObjectIDs = []string{"foobarzar"}
p8.ObjectIDs = []string{"foobarzar"}
p8.config = p1.config
p8.oidcConfig = p1.oidcConfig
p8.keyStore = p1.keyStore