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

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

PEP8 method name

get_azure_account

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.

PEP8 method name

create_azure_account

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

PEP8 method name

update_azure_account_client_id

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

PEP8 method name

get_azure_user_scripts_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

PEP8 method name

get_azure_user_scripts

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.

PEP8 method name

get_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.

PEP8 method name

create_gcp_account

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

PEP8 method name

get_gcp_user_scripts_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

PEP8 method name

get_gcp_user_scripts

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