@@ -40,6 +40,7 @@ const (
40
40
SubCategoryMessaging AssetSubCategory = "messaging"
41
41
SubCategoryNetwork AssetSubCategory = "network"
42
42
SubCategoryStorage AssetSubCategory = "storage"
43
+ SubCategoryServiceIdentity AssetSubCategory = "service-identity"
43
44
)
44
45
45
46
// AssetType is used to build the document index. Use only numbers, letters and dashes (-)
@@ -72,6 +73,9 @@ const (
72
73
TypeVirtualMachine AssetType = "virtual-machine"
73
74
TypeVirtualNetwork AssetType = "virtual-network"
74
75
TypeWebApplication AssetType = "web-application"
76
+ TypeServiceAccount AssetType = "service-account"
77
+ TypeServiceAccountKey AssetType = "service-account-key"
78
+ TypeResourceHierarchy AssetType = "resource-hierarchy"
75
79
)
76
80
77
81
// AssetSubType is used to build the document index. Use only numbers, letters and dashes (-)
@@ -115,11 +119,21 @@ const (
115
119
SubTypeVpc AssetSubType = "vpc"
116
120
SubTypeVpcAcl AssetSubType = "s3-access-control-list"
117
121
SubTypeVpcPeeringConnection AssetSubType = "vpc-peering-connection"
122
+ SubTypeGcpProject AssetSubType = "gcp-project"
123
+ SubTypeGcpInstance AssetSubType = "gcp-instance"
124
+ SubTypeGcpSubnet AssetSubType = "gcp-subnet"
125
+ SubTypeGcpFirewall AssetSubType = "gcp-firewall"
126
+ SubTypeGcpBucket AssetSubType = "gcp-bucket"
127
+ SubTypeGcpOrganization AssetSubType = "gcp-organization"
128
+ SubTypeGcpFolder AssetSubType = "gcp-folder"
129
+ SubTypeGcpServiceAccount AssetSubType = "gcp-service-account"
130
+ SubTypeGcpServiceAccountKey AssetSubType = "gcp-service-account-key"
118
131
)
119
132
120
133
const (
121
134
AwsCloudProvider = "aws"
122
135
AzureCloudProvider = "azure"
136
+ GcpCloudProvider = "gcp"
123
137
)
124
138
125
139
// AssetClassification holds the taxonomy of an asset
@@ -171,6 +185,17 @@ var (
171
185
AssetClassificationAzureSubscription = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryManagement , Type : TypeCloudAccount , SubType : SubTypeAzureSubscription }
172
186
AssetClassificationAzureTenant = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryManagement , Type : TypeCloudAccount , SubType : SubTypeAzureTenant }
173
187
AssetClassificationAzureVirtualMachine = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryCompute , Type : TypeVirtualMachine , SubType : SubTypeAzureVirtualMachine }
188
+
189
+ // GCP
190
+ AssetClassificationGcpProject = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryManagement , Type : TypeCloudAccount , SubType : SubTypeGcpProject }
191
+ AssetClassificationGcpOrganization = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryManagement , Type : TypeCloudAccount , SubType : SubTypeGcpOrganization }
192
+ AssetClassificationGcpFolder = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryManagement , Type : TypeResourceHierarchy , SubType : SubTypeGcpFolder }
193
+ AssetClassificationGcpInstance = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryCompute , Type : TypeVirtualMachine , SubType : SubTypeGcpInstance }
194
+ AssetClassificationGcpBucket = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryStorage , Type : TypeObjectStorage , SubType : SubTypeGcpBucket }
195
+ AssetClassificationGcpFirewall = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryNetwork , Type : TypeFirewall , SubType : SubTypeGcpFirewall }
196
+ AssetClassificationGcpSubnet = AssetClassification {Category : CategoryInfrastructure , SubCategory : SubCategoryNetwork , Type : TypeSubnet , SubType : SubTypeGcpSubnet }
197
+ AssetClassificationGcpServiceAccount = AssetClassification {Category : CategoryIdentity , SubCategory : SubCategoryServiceIdentity , Type : TypeServiceAccount , SubType : SubTypeGcpServiceAccount }
198
+ AssetClassificationGcpServiceAccountKey = AssetClassification {Category : CategoryIdentity , SubCategory : SubCategoryServiceIdentity , Type : TypeServiceAccountKey , SubType : SubTypeGcpServiceAccountKey }
174
199
)
175
200
176
201
// AssetEvent holds the whole asset
@@ -210,21 +235,27 @@ type AssetNetwork struct {
210
235
211
236
// AssetCloud contains information about the cloud provider
212
237
type AssetCloud struct {
213
- AvailabilityZone * string `json:"availability_zone,omitempty"`
214
- Provider string `json:"provider,omitempty"`
215
- Region string `json:"region,omitempty"`
216
- Account AssetCloudAccount `json:"account"`
217
- Instance * AssetCloudInstance `json:"instance,omitempty"`
218
- Machine * AssetCloudMachine `json:"machine,omitempty"`
219
- Project * AssetCloudProject `json:"project,omitempty"`
220
- Service * AssetCloudService `json:"service,omitempty"`
238
+ AvailabilityZone * string `json:"availability_zone,omitempty"`
239
+ Provider string `json:"provider,omitempty"`
240
+ Region string `json:"region,omitempty"`
241
+ Account AssetCloudAccount `json:"account"`
242
+ Organization AssetCloudOrganization `json:"organization,omitempty"`
243
+ Instance * AssetCloudInstance `json:"instance,omitempty"`
244
+ Machine * AssetCloudMachine `json:"machine,omitempty"`
245
+ Project * AssetCloudProject `json:"project,omitempty"`
246
+ Service * AssetCloudService `json:"service,omitempty"`
221
247
}
222
248
223
249
type AssetCloudAccount struct {
224
250
Id string `json:"id,omitempty"`
225
251
Name string `json:"name,omitempty"`
226
252
}
227
253
254
+ type AssetCloudOrganization struct {
255
+ Id string `json:"id,omitempty"`
256
+ Name string `json:"name,omitempty"`
257
+ }
258
+
228
259
type AssetCloudInstance struct {
229
260
Id string `json:"id,omitempty"`
230
261
Name string `json:"name,omitempty"`
0 commit comments