Skip to content

D4C Registration

jshcodes edited this page Dec 12, 2021 · 35 revisions

CrowdStrike Falcon Twitter URL

Using the D4C Registration service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation ID Description
GetCSPMAzureAccount
PEP 8 get_azure_account
Return information about Azure account registration
CreateCSPMAzureAccount
PEP 8 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
PEP 8 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
PEP 8 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
PEP 8 get_azure_user_scripts
Return a script for customer to run in their cloud environment to grant us access to their Azure environment
GetCSPMCGPAccount
PEP 8 get_gcp_account
Returns information about the current status of an GCP account.
CreateCSPMGCPAccount
PEP 8 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
PEP 8 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
PEP 8 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

Keyword Arguments

Name Service Uber Type Data type Description
ids
Service Class Support

Uber Class Support
query string or list of strings Subscription ID(s). When empty, all accounts are returned.
parameters
Service Class Support

Uber Class Support
query string Full query string parameters payload in JSON format.
scan_type
Service Class Support

Uber Class Support
query string Type of scan to perform, dry or full.

Usage

Service class example (PEP8 syntax)
from falconpy 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 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 import APIHarness

falcon = APIHarness(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.command("GetCSPMAzureAccount", scan_type="string", 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

Keyword Arguments

Name Service Uber Type Data type Description
body
Service Class Support

Uber Class Support
body string Full body payload in JSON format.
subscription_id
Service Class Support

Uber Class Support
body string Azure Subscription ID.
tenant_id
Service Class Support

Uber Class Support
body string Azure tenant ID.

Usage

Service class example (PEP8 syntax)
from falconpy import D4CRegistration

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

response = falcon.create_azure_account(subscription_id="string", tenant_id="string")
print(response)
Service class example (Operation ID syntax)
from falconpy import D4CRegistration

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

response = falcon.CreateCSPMAzureAccount(subscription_id="string", tenant_id="string")
print(response)
Uber class example
from falconpy import APIHarness

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

BODY = {
    "resources": [
        {
            "subscription_id": "string",
            "tenant_id": "string"
        }
    ]
}

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

Keyword Arguments

Name Service Uber Type Data type Description
id
Service Class Support

Uber Class Support
query string Client ID to use for the Service Principal associated with the registered Azure account.
parameters
Service Class Support

Uber Class Support
query string Full query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy 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 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 import APIHarness

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

response = falcon.command("UpdateCSPMAzureAccountClientID", id="string")
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

Keyword Arguments

No keywords or arguments accepted.

Usage

Service class example (PEP8 syntax)
from falconpy 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 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 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

Keyword Arguments

No keywords or arguments accepted.

Usage

Service class example (PEP8 syntax)
from falconpy 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 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 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

Keyword Arguments

Name Service Uber Type Data type Description
ids
Service Class Support

Uber Class Support
query string or list of strings Parent ID(s). When empty, all accounts are returned.
parameters
Service Class Support

Uber Class Support
query string Full query string parameters payload in JSON format.
scan_type
Service Class Support

Uber Class Support
query string Type of scan to perform, dry or full.

Usage

Service class example (PEP8 syntax)
from falconpy 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 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 import APIHarness

falcon = APIHarness(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.command("GetCSPMCGPAccount", scan_type="string", 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

Keyword Arguments

Name Service Uber Type Data type Description
body
Service Class Support

Uber Class Support
body string Full body payload in JSON format.
parent_id
Service Class Support

Uber Class Support
body string GCP Parent ID.

Usage

Service class example (PEP8 syntax)
from falconpy import D4CRegistration

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

response = falcon.create_gcp_account(parent_id="string")
print(response)
Service class example (Operation ID syntax)
from falconpy import D4CRegistration

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

response = falcon.CreateCSPMGCPAccount(parent_id="string")
print(response)
Uber class example
from falconpy import APIHarness

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

BODY = {
    "resources": [
        {
            "parent_id": "string"
        }
    ]
}

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

Keyword Arguments

No keywords or arguments are accepted.

Usage

Service class example (PEP8 syntax)
from falconpy 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 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 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

Keyword Arguments

No keywords or arguments are accepted.

Usage

Service class example (PEP8 syntax)
from falconpy 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 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 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