-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Added Data Connectors Check Requirements to security insights #8020
Changes from all commits
d947714
fae5164
eaed0c5
d86d399
1f9cb21
0a69eef
6b02c9a
3037c2f
cd59e71
879a0e0
dffb6de
bc77d4d
dd09f0b
1608d84
0db2d6b
cbcb88b
803a75e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1819,6 +1819,72 @@ | |
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements": { | ||
"post": { | ||
"x-ms-examples": { | ||
"Check requirements for TI.": { | ||
"$ref": "./examples/dataConnectors/CheckRequirementsThreatIntelligence.json" | ||
}, | ||
"Check requirements for AAD.": { | ||
"$ref": "./examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json" | ||
}, | ||
"Check requirements for AAD - no license.": { | ||
"$ref": "./examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json" | ||
}, | ||
"Check requirements for AAD - no authorization.": { | ||
"$ref": "./examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json" | ||
}, | ||
"Check requirements for ASC.": { | ||
"$ref": "./examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json" | ||
}, | ||
"Check requirements for Mcas.": { | ||
"$ref": "./examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json" | ||
}, | ||
"Check requirements for Mdatp.": { | ||
"$ref": "./examples/dataConnectors/CheckRequirementsMdatp.json" | ||
} | ||
}, | ||
"tags": [ | ||
"Check Data Connector Requirements" | ||
], | ||
"description": "Get requirements state for a data connector type.", | ||
"operationId": "listDataConnectorRequirements", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ResourceGroupName" | ||
}, | ||
{ | ||
"$ref": "#/parameters/WorkspaceName" | ||
}, | ||
{ | ||
"$ref": "#/parameters/OperationalInsightsResourceProvider" | ||
}, | ||
{ | ||
"$ref": "#/parameters/DataConnectorsCheckRequirementsBody" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/DataConnectorRequirementsState" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities": { | ||
"get": { | ||
"x-ms-examples": { | ||
|
@@ -2425,6 +2491,22 @@ | |
"description": "AAD (Azure Active Directory) data connector properties.", | ||
"type": "object" | ||
}, | ||
"AADCheckRequirements": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
}, | ||
{ | ||
"$ref": "#/definitions/DataConnectorTenantId" | ||
} | ||
], | ||
"description": "AAD (Azure Active Directory) requirements check properties.", | ||
"type": "object", | ||
"discriminator": "kind", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"AATPDataConnector": { | ||
"allOf": [ | ||
{ | ||
|
@@ -2454,6 +2536,22 @@ | |
"description": "AATP (Azure Advanced Threat Protection) data connector properties.", | ||
"type": "object" | ||
}, | ||
"AATPCheckRequirements": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
}, | ||
{ | ||
"$ref": "#/definitions/DataConnectorTenantId" | ||
} | ||
], | ||
"description": "AATP (Azure Advanced Threat Protection) requirements check properties.", | ||
"type": "object", | ||
"discriminator": "kind", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"ASCDataConnector": { | ||
"allOf": [ | ||
{ | ||
|
@@ -2486,6 +2584,25 @@ | |
}, | ||
"type": "object" | ||
}, | ||
"ASCCheckRequirements": { | ||
"description": "ASC (Azure Security Center) requirements check properties.", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
} | ||
], | ||
"properties": { | ||
"subscriptionId": { | ||
"description": "The subscription id to connect to, and get the data from.", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object", | ||
"discriminator": "kind", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"AccountEntity": { | ||
"allOf": [ | ||
{ | ||
|
@@ -2657,7 +2774,10 @@ | |
], | ||
"description": "The aggregation.", | ||
"discriminator": "kind", | ||
"type": "object" | ||
"type": "object", | ||
"required": [ | ||
"kind" | ||
] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose this is already being enforced at server level and even discriminator pattern may not work. hope that is the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added these because a test wouldn't pass, there was an error saying a discriminator must be required. |
||
}, | ||
"AggregationsKind": { | ||
"description": "Describes an Azure resource with kind.", | ||
|
@@ -2687,7 +2807,10 @@ | |
], | ||
"description": "Alert rule.", | ||
"discriminator": "kind", | ||
"type": "object" | ||
"type": "object", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"AlertRuleKind": { | ||
"description": "Describes an Azure resource with kind.", | ||
|
@@ -2730,7 +2853,10 @@ | |
], | ||
"description": "Alert rule template.", | ||
"discriminator": "kind", | ||
"type": "object" | ||
"type": "object", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"AlertRuleTemplatePropertiesBase": { | ||
"description": "Base alert rule template property bag.", | ||
|
@@ -2966,6 +3092,19 @@ | |
}, | ||
"type": "object" | ||
}, | ||
"AwsCloudTrailCheckRequirements": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
} | ||
], | ||
"description": "Amazon Web Services CloudTrail requirements check properties.", | ||
"type": "object", | ||
"discriminator": "kind", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"AzureResourceEntity": { | ||
"allOf": [ | ||
{ | ||
|
@@ -3795,7 +3934,62 @@ | |
], | ||
"description": "Data connector.", | ||
"discriminator": "kind", | ||
"type": "object" | ||
"type": "object", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"DataConnectorsCheckRequirements": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorKind" | ||
} | ||
], | ||
"description": "Data connector requirements properties." | ||
}, | ||
"DataConnectorAuthorizationState": { | ||
"description": "Describes the state of user's authorization for a connector kind.", | ||
"enum": [ | ||
"Valid", | ||
"Invalid" | ||
], | ||
"type": "string", | ||
"x-ms-enum": { | ||
"modelAsString": true, | ||
"name": "DataConnectorAuthorizationState", | ||
"values": [ | ||
{ | ||
"value": "Valid" | ||
}, | ||
{ | ||
"value": "Invalid" | ||
} | ||
] | ||
} | ||
}, | ||
"DataConnectorLicenseState": { | ||
"description": "Describes the state of user's license for a connector kind.", | ||
"enum": [ | ||
"Valid", | ||
"Invalid", | ||
"Unknown" | ||
], | ||
"type": "string", | ||
"x-ms-enum": { | ||
"modelAsString": true, | ||
"name": "DataConnectorLicenseState", | ||
"values": [ | ||
{ | ||
"value": "Valid" | ||
}, | ||
{ | ||
"value": "Invalid" | ||
}, | ||
{ | ||
"value": "Unknown" | ||
} | ||
] | ||
} | ||
}, | ||
"DataConnectorDataTypeCommon": { | ||
"description": "Common field for data type in data connectors.", | ||
|
@@ -3910,6 +4104,20 @@ | |
}, | ||
"type": "object" | ||
}, | ||
"DataConnectorRequirementsState": { | ||
"description": "Data connector requirements status.", | ||
"properties": { | ||
"authorizationState": { | ||
"description": "Authorization state for this connector", | ||
"$ref": "#/definitions/DataConnectorAuthorizationState" | ||
}, | ||
"licenseState": { | ||
"description": "License state for this connector", | ||
"$ref": "#/definitions/DataConnectorLicenseState" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"DataConnectorTenantId": { | ||
"description": "Properties data connector on tenant level.", | ||
"properties": { | ||
|
@@ -3993,7 +4201,10 @@ | |
], | ||
"description": "Specific entity.", | ||
"discriminator": "kind", | ||
"type": "object" | ||
"type": "object", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"EntityCommonProperties": { | ||
"description": "Entity common property bag.", | ||
|
@@ -4853,6 +5064,22 @@ | |
}, | ||
"type": "object" | ||
}, | ||
"MCASCheckRequirements": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
}, | ||
{ | ||
"$ref": "#/definitions/DataConnectorTenantId" | ||
} | ||
], | ||
"description": "MCAS (Microsoft Cloud App Security) requirements check properties.", | ||
"type": "object", | ||
"discriminator": "kind", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"MDATPDataConnector": { | ||
"allOf": [ | ||
{ | ||
|
@@ -4882,6 +5109,22 @@ | |
"description": "MDATP (Microsoft Defender Advanced Threat Protection) data connector properties.", | ||
"type": "object" | ||
}, | ||
"MDATPCheckRequirements": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
}, | ||
{ | ||
"$ref": "#/definitions/DataConnectorTenantId" | ||
} | ||
], | ||
"description": "MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties.", | ||
"type": "object", | ||
"discriminator": "kind", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"MalwareEntity": { | ||
"allOf": [ | ||
{ | ||
|
@@ -6080,7 +6323,10 @@ | |
], | ||
"description": "The Setting.", | ||
"discriminator": "kind", | ||
"type": "object" | ||
"type": "object", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"SettingsKind": { | ||
"description": "Describes an Azure resource with kind.", | ||
|
@@ -6147,6 +6393,22 @@ | |
}, | ||
"type": "object" | ||
}, | ||
"TICheckRequirements": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
}, | ||
{ | ||
"$ref": "#/definitions/DataConnectorTenantId" | ||
} | ||
], | ||
"description": "TI (Threat Intelligence) requirements check properties.", | ||
"type": "object", | ||
"discriminator": "kind", | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"ThreatIntelligence": { | ||
"description": "ThreatIntelligence property bag.", | ||
"properties": { | ||
|
@@ -6537,6 +6799,16 @@ | |
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"DataConnectorsCheckRequirementsBody": { | ||
"description": "The parameters for requirements check message", | ||
"in": "body", | ||
"name": "DataConnectorsCheckRequirements", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/DataConnectorsCheckRequirements" | ||
}, | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"EntityExpandRequestBody": { | ||
"description": "The parameters required to execute an expand operation on the given entity.", | ||
"in": "body", | ||
|
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.
you may want to use discriminator pattern. i suppose we want the clients to use any of these objects (that inherit from DataConnectorsCheckRequirements) with the newly added POST.
This object has additional property of DataConnectorTenantId
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.
It is not the only thing that inherits from DataConnectorsCheckRequirements that has DataConnectorTenantId.
I added discriminators to anything that inherits from DataConnectorsCheckRequirements. Thanks