-
Notifications
You must be signed in to change notification settings - Fork 43
[Asset Inventory][Azure] Fix Azure service names (cloud.service.name) #3466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This pull request does not have a backport label. Could you fix it @kubasobon? 🙏
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, maybe it's good to double check with @caitlinbetz about the names. I see that AWS mostly matches existing service names
| {"Snapshots", azurelib.AssetGroupResources, azurelib.SnapshotAssetType, inventory.AssetClassificationAzureSnapshot}, | ||
| {"Storage Accounts", azurelib.AssetGroupResources, azurelib.StorageAccountAssetType, inventory.AssetClassificationAzureStorageAccount}, | ||
| {"Virtual Machines", azurelib.AssetGroupResources, azurelib.VirtualMachineAssetType, inventory.AssetClassificationAzureVirtualMachine}, | ||
| {"App Services", "Azure Compute", azurelib.AssetGroupResources, azurelib.WebsitesAssetType, inventory.AssetClassificationAzureAppService}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {"App Services", "Azure Compute", azurelib.AssetGroupResources, azurelib.WebsitesAssetType, inventory.AssetClassificationAzureAppService}, | ||
| {"Container Registries", "Azure Containers", azurelib.AssetGroupResources, azurelib.ContainerRegistryAssetType, inventory.AssetClassificationAzureContainerRegistry}, | ||
| {"Cosmos DB Accounts", "Azure Databases", azurelib.AssetGroupResources, azurelib.DocumentDBDatabaseAccountAssetType, inventory.AssetClassificationAzureCosmosDBAccount}, | ||
| {"Cosmos DB SQL Databases", "Azure Databases", azurelib.AssetGroupResources, azurelib.CosmosDBForSQLDatabaseAssetType, inventory.AssetClassificationAzureCosmosDBSQLDatabase}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {"Storage Accounts", azurelib.AssetGroupResources, azurelib.StorageAccountAssetType, inventory.AssetClassificationAzureStorageAccount}, | ||
| {"Virtual Machines", azurelib.AssetGroupResources, azurelib.VirtualMachineAssetType, inventory.AssetClassificationAzureVirtualMachine}, | ||
| {"App Services", "Azure Compute", azurelib.AssetGroupResources, azurelib.WebsitesAssetType, inventory.AssetClassificationAzureAppService}, | ||
| {"Container Registries", "Azure Containers", azurelib.AssetGroupResources, azurelib.ContainerRegistryAssetType, inventory.AssetClassificationAzureContainerRegistry}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@caitlinbetz I'd love your input from product perspective on this naming convention. |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
@kubasobon I am good with the naming changes you have outlined |
9c17b74 to
414660e
Compare
|
@romulets updated service names according to your remarks, PTAL :) |
| {"Cosmos DB SQL Databases", "Azure Cosmos DB", azurelib.AssetGroupResources, azurelib.CosmosDBForSQLDatabaseAssetType, inventory.AssetClassificationAzureCosmosDBSQLDatabase}, | ||
| {"Disks", "Azure Storage", azurelib.AssetGroupResources, azurelib.DiskAssetType, inventory.AssetClassificationAzureDisk}, | ||
| {"Elastic Pools", "Azure SQL Elastic Pools", azurelib.AssetGroupResources, azurelib.ElasticPoolAssetType, inventory.AssetClassificationAzureElasticPool}, | ||
| {"MySQL Flexible Servers", "Azure SQL Servers", azurelib.AssetGroupResources, azurelib.FlexibleMySQLDBAssetType, inventory.AssetClassificationAzureSQLServer}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is FlexibleMySQLDBAssetType a SQL Server? As far as I know is just another offering of MySQL and I would classify as Azure SQL Databases, not as SQL Server. I could be wrong of course 🤓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think SQL Servers are azurelib.SQLServersAssetType ones. We are not fetching them it seems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our docs specify we need to fetch two kinds of resources:
| Category | Old Type | Current Type |
|---|---|---|
| Database | Azure SQL Database | Azure SQL Database |
| Database | Azure SQL Server | Azure SQL Server |
But the Azure offering contains:
- Azure Database for PostgreSQL flexible servers
- SQL virtual machines
- Azure Arc (and within it)
- SQL Server instances
- SQL managed instances
- PostgreSQL servers
- MySQL servers
- SQL Server stretch databases
- Azure SQL Database Hyperscale
- Azure Database for MySQL flexible servers
- SQL Managed instances (different to those in Azure Arc)
...and more, but I've omitted ones that did not fit SQL Database or SQL Server description. Some of those are PaaS, some IaaS, some managed by Azure, some by the user. I don't have enough information to make an educated guess as to which ones we should be querying. @romulets How do you feel about merging this and bringing the database question to product?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with your decision @kubasobon
My point was
We are saying:
azurelib.FlexibleMySQLDBAssetType->Azure SQL Serversazurelib.MySQLDatabaseAssetType->Azure SQL Databases
I thought we had to keep those consistent. But I also don't fully understand the Azure distribution. So I trust your call!
|
@Mergifyio backport 8.17 8.18 8.19 9.0 9.1 |
✅ Backports have been created
|
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_account.go # internal/inventory/azurefetcher/fetcher_account_test.go # internal/inventory/azurefetcher/fetcher_activedirectory.go # internal/inventory/azurefetcher/fetcher_activedirectory_test.go # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go # internal/inventory/azurefetcher/fetcher_storage_test.go # internal/resources/fetching/fetchers/azure/assets_fetcher.go
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_activedirectory.go # internal/inventory/azurefetcher/fetcher_activedirectory_test.go # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go # internal/inventory/azurefetcher/fetcher_storage_test.go # internal/resources/fetching/fetchers/azure/assets_fetcher.go
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go
…#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go
…s (cloud.service.name) (#3545) * [Asset Inventory][Azure] Fix Azure service names (cloud.service.name) (#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go * resolve conflicts * update tests * make linter happy --------- Co-authored-by: Kuba Soboń <[email protected]>
…s (cloud.service.name) (#3544) * [Asset Inventory][Azure] Fix Azure service names (cloud.service.name) (#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go * resolve conflicts * update tests * make linter happy --------- Co-authored-by: Kuba Soboń <[email protected]>
…es (cloud.service.name) (#3543) * [Asset Inventory][Azure] Fix Azure service names (cloud.service.name) (#3466) * update test cases * update Azure service names * apply review remarks * rename FlexibleMySQLDBAssetType * rename MySQLDBAssetType * gofmt (cherry picked from commit 7e3234f) # Conflicts: # internal/inventory/azurefetcher/fetcher_resource_graph.go # internal/inventory/azurefetcher/fetcher_resource_graph_test.go # internal/inventory/azurefetcher/fetcher_storage.go * resolve conflicts * update tests * make linter happy --------- Co-authored-by: Kuba Soboń <[email protected]>








Summary of your changes
Fixes missing
cloud.service.namevalues for Azure assets (were all assignedAzure).Related Issues
Fixes https://github.com/elastic/security-team/issues/13159