Skip to content

D4C Registration

jshcodes edited this page Aug 29, 2021 · 35 revisions

CrowdStrike Falcon Twitter URL

Using the D4C Registration service collection

Uber class support Uber class support

Table of Contents

Method Operation ID Description
get_azure_account GetCSPMAzureAccount Return information about Azure account registration
create_azure_account CreateCSPMAzureAccount Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access.
update_azure_account_client_id UpdateCSPMAzureAccountClientID Update an Azure service account in our system by with the user-created client_id created with the public key we've provided
get_azure_user_scripts_attachment GetCSPMAzureUserScriptsAttachment Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment
get_azure_user_scripts GetCSPMAzureUserScripts Return a script for customer to run in their cloud environment to grant us access to their Azure environment
get_gcp_account GetCSPMCGPAccount Returns information about the current status of an GCP account.
create_gcp_account CreateCSPMGCPAccount Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access.
get_gcp_user_scripts_attachment GetCSPMGCPUserScriptsAttachment Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment
get_gcp_user_scripts GetCSPMGCPUserScripts Return a script for customer to run in their cloud environment to grant us access to their GCP environment

GetCSPMAzureAccount

Return information about Azure account registration

Content-Type

  • Consumes: application/json
  • Produces: application/json

Parameters

Required Name Type Datatype Description
ids query array (string) SubscriptionIDs of accounts to select for this status operation. If this is empty then all accounts are returned.
scan_type query string Type of scan, dry or full, to perform on selected accounts

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.get_azure_account(scan_type="string", ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.GetCSPMAzureAccount(scan_type="string", ids=id_list)
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

PARAMS = {
    "scan-type": "string"
}

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("GetCSPMAzureAccount", parameters=PARAMS, ids=id_list)
print(response)

CreateCSPMAzureAccount

Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access.

Content-Type

  • Consumes: application/json
  • Produces: application/json

Parameters

Required Name Type Datatype Description
body body string

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

BODY = {
    "Body Payload": "See body description above"
}

response = falcon.create_azure_account(body=BODY)
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

BODY = {
    "Body Payload": "See body description above"
}

response = falcon.CreateCSPMAzureAccount(body=BODY)
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

BODY = {
    "Body Payload": "See body description above"
}

response = falcon.command("CreateCSPMAzureAccount", body=BODY)
print(response)

UpdateCSPMAzureAccountClientID

Update an Azure service account in our system by with the user-created client_id created with the public key we've provided

Content-Type

  • Consumes: application/json
  • Produces: application/json

Parameters

Required Name Type Datatype Description
id query string ClientID to use for the Service Principal associated with the customer's Azure account

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.update_azure_account_client_id(id="string")
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.UpdateCSPMAzureAccountClientID(id="string")
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

PARAMS = {
    "id": "string"
}

response = falcon.command("UpdateCSPMAzureAccountClientID", parameters=PARAMS)
print(response)

GetCSPMAzureUserScriptsAttachment

Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment

Content-Type

  • Produces: application/json

Parameters

No parameters

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.get_azure_user_scripts_attachment()
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.GetCSPMAzureUserScriptsAttachment()
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

response = falcon.command("GetCSPMAzureUserScriptsAttachment")
print(response)

GetCSPMAzureUserScripts

Return a script for customer to run in their cloud environment to grant us access to their Azure environment

Content-Type

  • Consumes: application/json
  • Produces: application/json

Parameters

No parameters

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.get_azure_user_scripts()
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.GetCSPMAzureUserScripts()
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

response = falcon.command("GetCSPMAzureUserScripts")
print(response)

GetCSPMCGPAccount

Returns information about the current status of an GCP account.

Content-Type

  • Consumes: application/json
  • Produces: application/json

Parameters

Required Name Type Datatype Description
scan_type query string Type of scan, dry or full, to perform on selected accounts
ids query array (string) Parent IDs of accounts

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.get_gcp_account(scan_type="string", ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.GetCSPMCGPAccount(scan_type="string", ids=id_list)
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

PARAMS = {
    "scan-type": "string"
}

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("GetCSPMCGPAccount", parameters=PARAMS, ids=id_list)
print(response)

CreateCSPMGCPAccount

Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access.

Content-Type

  • Consumes: application/json
  • Produces: application/json

Parameters

Required Name Type Datatype Description
body body string

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

BODY = {
    "Body Payload": "See body description above"
}

response = falcon.create_gcp_account(body=BODY)
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

BODY = {
    "Body Payload": "See body description above"
}

response = falcon.CreateCSPMGCPAccount(body=BODY)
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

BODY = {
    "Body Payload": "See body description above"
}

response = falcon.command("CreateCSPMGCPAccount", body=BODY)
print(response)

GetCSPMGCPUserScriptsAttachment

Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment

Content-Type

  • Produces: application/json

Parameters

No parameters

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.get_gcp_user_scripts_attachment()
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.GetCSPMGCPUserScriptsAttachment()
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

response = falcon.command("GetCSPMGCPUserScriptsAttachment")
print(response)

GetCSPMGCPUserScripts

Return a script for customer to run in their cloud environment to grant us access to their GCP environment

Content-Type

  • Consumes: application/json
  • Produces: application/json

Parameters

No parameters

Usage

Service class example (PEP8 syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.get_gcp_user_scripts()
print(response)
Service class example (Operation ID syntax)
from falconpy.d4c_registration import D4CRegistration

falcon = D4CRegistration(client_id="API_CLIENT_ID_HERE",
                         client_secret="API_CLIENT_SECRET_HERE"
                         )

response = falcon.GetCSPMGCPUserScripts()
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

response = falcon.command("GetCSPMGCPUserScripts")
print(response)

CrowdStrike Falcon

Clone this wiki locally