🐛 Fix 42 incorrect Azure RBAC permissions in auto-generated manifest#7081
Open
🐛 Fix 42 incorrect Azure RBAC permissions in auto-generated manifest#7081
Conversation
The permission extraction heuristics produced several invalid GCP IAM permission strings. This fixes the generator and regenerates the manifest. **Service name prefix fixes (gcpServiceNameMap):** - cloudresourcemanager.* → resourcemanager.* (9 permissions) - sqladmin.* → cloudsql.* (2 permissions) - security.* → privateca.* (3 permissions) **Method-to-permission override table (new):** - accessapproval.accessApprovalSettings.get → accessapproval.settings.get - binaryauthorization.systemPolicy.get → binaryauthorization.policy.get - cloudkms.cryptoKey.get → cloudkms.cryptoKeys.get - cloudkms.iamPolicy.get → cloudkms.cryptoKeys.getIamPolicy - secretmanager.iamPolicy.get → secretmanager.secrets.getIamPolicy - secretmanager.secretVersions.list → secretmanager.versions.list - artifactregistry.iamPolicy.get → artifactregistry.repositories.getIamPolicy - serviceusage.service.get → serviceusage.services.get **Non-API method filtering (new skip list):** - monitoring.conditionAbsent.get, monitoring.conditionThreshold.get, monitoring.conditionMatchedLog.get, monitoring.conditionMonitoringQueryLanguage.get (protobuf getters, not real API calls) **Other generator fixes:** - Strip "Iter" suffix from gRPC iterator methods (iam.rolesIter.list → iam.roles.list) - Map REST "Aggregated" verb to "list" (dataflow.jobs.aggregated → dataflow.jobs.list) - Skip bare gRPC Get() calls with no resource qualifier (compute.compute.get) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Azure permission extraction heuristics produced many invalid permission strings. This fixes the generator and regenerates the manifest. **ARM provider name fixes (azureServiceToARMMap):** - Microsoft.Datafactory → Microsoft.DataFactory (casing) - Microsoft.Cosmosforpostgresql → Microsoft.DBforPostgreSQL (wrong provider) **Permission override table (new, 42 entries):** Resource path fixes (SDK clients don't include parent paths): - Microsoft.Sql/* → Microsoft.Sql/servers/* or servers/databases/* (18 permissions: databases, firewallRules, encryptionProtector, etc.) - Microsoft.Cache/* → Microsoft.Cache/redis/* (firewallRules, patchSchedules) - Microsoft.DBforMySQL/* → Microsoft.DBforMySQL/servers/* (configurations, databases, firewallRules) - Microsoft.DBforPostgreSQL/* → Microsoft.DBforPostgreSQL/servers/* (configurations, databases, firewallRules) - Microsoft.Network/subnets → virtualNetworks/subnets - Microsoft.Network/flowLogs → networkWatchers/flowLogs - Microsoft.Network/virtualNetworkPeerings → virtualNetworks/virtualNetworkPeerings Resource type name fixes (SDK names differ from ARM types): - Microsoft.Batch/account → batchAccounts, pool → batchAccounts/pools - Microsoft.Network/interfaces → networkInterfaces - Microsoft.Network/securityGroups → networkSecurityGroups - Microsoft.Network/watchers → networkWatchers - Microsoft.Network/virtualNetworkGatewayConnections → connections - Microsoft.Storage/accounts → storageAccounts - Microsoft.Storage/blobContainers → storageAccounts/blobServices/containers - Microsoft.Web/environments → hostingEnvironments - Microsoft.Web/plans → serverfarms - Microsoft.Web/webApps → sites - Microsoft.DBforPostgreSQL/clusters → serverGroupsv2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ARM provider name fixes:
Microsoft.DatafactoryMicrosoft.DataFactoryMicrosoft.CosmosforpostgresqlMicrosoft.DBforPostgreSQLResource path fixes (18 SQL, 2 Cache, 3 MySQL, 3 PostgreSQL, 3 Network):
SDK client constructors don't include parent resource paths. Examples:
Microsoft.Sql/databases/readMicrosoft.Sql/servers/databases/readMicrosoft.Sql/firewallRules/readMicrosoft.Sql/servers/firewallRules/readMicrosoft.Cache/firewallRules/readMicrosoft.Cache/redis/firewallRules/readMicrosoft.DBforMySQL/databases/readMicrosoft.DBforMySQL/servers/databases/readResource type name fixes (12 permissions):
SDK client class names differ from ARM resource types:
Microsoft.Network/interfaces/readMicrosoft.Network/networkInterfaces/readMicrosoft.Network/securityGroups/readMicrosoft.Network/networkSecurityGroups/readMicrosoft.Storage/accounts/readMicrosoft.Storage/storageAccounts/readMicrosoft.Web/webApps/readMicrosoft.Web/sites/readMicrosoft.Web/plans/readMicrosoft.Web/serverfarms/readMicrosoft.Batch/account/readMicrosoft.Batch/batchAccounts/readNote: also includes GCP generator fixes from #7080.
Test plan
make providers/build/azureto confirm build succeedsgo run providers-sdk/v1/util/permissions/permissions.go providers/azureproduces no diff🤖 Generated with Claude Code