diff --git a/api/api.go b/api/api.go index a763d592..03118787 100644 --- a/api/api.go +++ b/api/api.go @@ -7,7 +7,7 @@ import ( "context" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization" + "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" ) diff --git a/api/application_msgraph.go b/api/application_msgraph.go index 5af80281..c26c78c9 100644 --- a/api/application_msgraph.go +++ b/api/application_msgraph.go @@ -10,7 +10,7 @@ import ( "net/url" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization" + "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/date" diff --git a/client.go b/client.go index b7a2ce95..ae43e315 100644 --- a/client.go +++ b/client.go @@ -13,15 +13,14 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization" + "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-uuid" - "github.com/hashicorp/vault/sdk/logical" - "github.com/hashicorp/vault-plugin-secrets-azure/api" + "github.com/hashicorp/vault/sdk/logical" ) const ( @@ -176,7 +175,7 @@ func (c *client) assignRoles(ctx context.Context, spID string, roles []*AzureRol } ra, err := c.provider.CreateRoleAssignment(ctx, role.Scope, assignmentIDs[i], authorization.RoleAssignmentCreateParameters{ - RoleAssignmentProperties: &authorization.RoleAssignmentProperties{ + Properties: &authorization.RoleAssignmentProperties{ RoleDefinitionID: &role.RoleID, PrincipalID: &spID, }, diff --git a/go.mod b/go.mod index 4a564b76..c78c5644 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/hashicorp/vault-plugin-secrets-azure go 1.19 require ( - github.com/Azure/azure-sdk-for-go v67.2.0+incompatible + github.com/Azure/azure-sdk-for-go v68.0.0+incompatible github.com/Azure/go-autorest/autorest v0.11.29 github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 github.com/Azure/go-autorest/autorest/date v0.3.0 diff --git a/go.sum b/go.sum index e5b9be07..084c13e8 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/Azure/azure-sdk-for-go v67.2.0+incompatible h1:Uu/Ww6ernvPTrpq31kITVTIm/I5jlJ1wjtEH/bmSB2k= github.com/Azure/azure-sdk-for-go v67.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= +github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= diff --git a/mock_provider_test.go b/mock_provider_test.go index f675667f..3ec295f5 100644 --- a/mock_provider_test.go +++ b/mock_provider_test.go @@ -9,7 +9,7 @@ import ( reflect "reflect" time "time" - authorization "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization" + authorization "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" gomock "github.com/golang/mock/gomock" api "github.com/hashicorp/vault-plugin-secrets-azure/api" ) diff --git a/path_roles.go b/path_roles.go index ec4b86d3..5cf791bb 100644 --- a/path_roles.go +++ b/path_roles.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization" + "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" "github.com/Azure/go-autorest/autorest/to" "github.com/hashicorp/vault-plugin-secrets-azure/api" "github.com/hashicorp/vault/sdk/framework" diff --git a/path_service_principal_test.go b/path_service_principal_test.go index b743d3b4..a432baa7 100644 --- a/path_service_principal_test.go +++ b/path_service_principal_test.go @@ -777,7 +777,7 @@ func TestRoleAssignmentWALRollback(t *testing.T) { roleDefs, err := provider.ListRoleDefinitions(context.Background(), fmt.Sprintf("subscriptions/%s", subscriptionID), "") assertErrorIsNil(t, err) - defID := *ra.RoleAssignmentPropertiesWithScope.RoleDefinitionID + defID := *ra.Properties.RoleDefinitionID found := false for _, def := range roleDefs { if *def.ID == defID && *def.RoleName == "Storage Blob Data Owner" { @@ -992,7 +992,7 @@ func TestCredentialInteg_msgraph(t *testing.T) { roleDefs, err := provider.ListRoleDefinitions(context.Background(), fmt.Sprintf("subscriptions/%s", subscriptionID), "") assertErrorIsNil(t, err) - defID := *ra.RoleAssignmentPropertiesWithScope.RoleDefinitionID + defID := *ra.Properties.RoleDefinitionID found := false for _, def := range roleDefs { if *def.ID == defID && *def.RoleName == "Storage Blob Data Owner" { diff --git a/provider.go b/provider.go index b34e6f7c..56092e06 100644 --- a/provider.go +++ b/provider.go @@ -7,7 +7,7 @@ import ( "context" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization" + "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure/auth" "github.com/hashicorp/vault-plugin-secrets-azure/api" diff --git a/provider_mock_test.go b/provider_mock_test.go index e1d28eb6..35eb6423 100644 --- a/provider_mock_test.go +++ b/provider_mock_test.go @@ -12,7 +12,7 @@ import ( "sync" "time" - "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization" + "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "github.com/hashicorp/vault-plugin-secrets-azure/api"