- Overview
- CylanceON-PREM architecture
- Steps to get started with CylanceON-PREM
- Requirements: CylanceON-PREM
- Configuring the CylanceON-PREM virtual appliance
- Migrating to the most recent version of CylanceON-PREM
- Configuring the CylanceON-PREM console
- Log in to CylanceON-PREM
- Administrative dashboard
- Filter lists
- Export lists
- CylanceON-PREM policies
- Setting up the CylancePROTECT agent
- Adding the CA certificate to endpoints
- Installing the CylancePROTECT Desktop agent for Windows
- Installing the CylancePROTECT Desktop agent for macOS
- Installing the CylancePROTECT Desktop agent for Linux
- Manually update the Linux driver
- Upgrading the CylancePROTECT Desktop agents
- Using virtual machines
- Manage devices in CylanceON-PREM
- Threat management in CylanceON-PREM
- CylanceON-PREM Global lists
- CylanceON-PREM Administration
- Managing CylanceON-PREM users
- Managing roles
- Update profile information
- CylanceON-PREM audit logs
- Managing Certificates
- Setting up email notifications for CylanceON-PREM
- CylanceON-PREM Settings
- Upgrade CylanceON-PREM
- Reboot the virtual appliance
- Configure session timeout
- Update CylanceON-PREM SSL certificate version 1.3.1 and later
- Update CylanceON-PREM SSL certificate version 1.2.2.1 and earlier
- Change the certificate cipher mode
- Enable maintenance mode
- Change network settings
- Check an IP address
- Change the log level
- Download logs
- Configure syslog/SIEM settings
- Update database connection settings
- Configure active directory
- Configure identity provider settings
- Using certificate-based authentication
- Add a banner to the login screen
- Applications
- CylanceON-PREM API
- Troubleshooting
- Agent not communicating with CylanceON-PREM
- Web browser reports insecure webpage
- Unable to connect to external database
- Configure static IP using the OVF tool
- Remote server 404 error in log files
- Log in with a local administrator account
- Online Certificate Status Protocol issues
- A user is not receiving email notifications
- Before you contact support
- BlackBerry Docs
- CylanceON-PREM
- Cylance ONPREM Administration Guide
- CylanceON-PREM API
- Application management
- Generate an access token
Generate an access token
The access token can be generated using Python. You can use the Python example below, adding the required token claims that you need.
The following requirements and script are just an example. This may change based on end-user requirements (example: using a different version of Python).
Software requirements
- Python 3.7 or higher (available from https://www.python.org/downloads/). Make sure to set the following options during installation:
- Check theAdd Python <version> to PATHcheckbox at the beginning of the Python installation.
- ClickDisable path length limitto remove the 260 character MAX_PATH limitation at the end of the installation.
- Python Requests Library 2.22.0 or higher:
- Open a command prompt on the machine where Python is installed, then run the following command to install the latest Requests library:python -m pip install requests
You will need to use the access token to execute the API requests.
Example Script
The following example code can be used to get an access token using Python.
import requests # requests version 2.22.0 as of the time of authoring # Set the base url. Example: https://login.onprem-cylance.com. This url # will be specific to your installation of CylanceON-PREM. onprem_base_url = "<your_base_url>" # Set the Application ID appID = "<your_app_id>" # Set the Application Secret appSecret = "<your_app_secret>" # Make a POST request to get the application token. token_headers = { "Content-Type": "application/json", "Accept": "application/json", } token_request_body = { "clientId": appID, "clientSecret": appSecret, "scope": "*" } token_url = f"{onprem_base_url}/cyapi/v1/application/token" token_result = requests.post(token_url, json=token_request_body, headers=token_headers,verify=False) token_url_json_results = token_result.json() print("Got result from token request:") print(token_url_json_results)