Grantlist IP Network Connections for Network Security
If your Databricks setup and configuration requires hardening the network traffic to restrict access to specific IP addresses/ranges, then in order for DLH.io to access your Databricks cluster/environment, you'll need to allow the DLH.io IP addresses access to your workspace.
You need the Admin access role in your Databricks workspace to execute the Databricks REST API steps to add an IP access list. The main Databricks API documentation has methods for listing all current allowed IP addresses and also creating a list of new ones to add to your network policy access list.
With your Personal Access Token (PAT) (typically of a service account user), create a POST call to the create method with the PAT as the Bearer Token.
The base url for your API endpoint will be your Databricks workspace deployment URL, for example in your workspace you can copy the first part of your workspace URL, which should look similar to, https://<workspace_deployment_name>.cloud.databricks.com/api/2.0. For example, your API calls would all be to the endpoint, https://my-workspace.cloud.databricks.com/api/2.0 if your workspace deployment was my-workspace, thus making the full API call endpoint, https://my-workspace.cloud.databricks.com/api/2.0/ip-access-lists to get a list of existing ips.
Follow these instructions to set up the allow list of IP Addresses to allow DLH.io access to your workspace:
- Create and obtain your PAT
- Make a call to the Get Lists API Endpoint to see all lists
- Confirm the list of IP addresses either exists or not. If not, then continue to the next step
- Create a call to the Create Access List endpoint with the following request body json string of objects:
- Be sure to use all of the IP addresses and CIDR ranges shown from the DLH.io grantlist page
- label, set to "DLH IP Addresses"
- list_type, set to "ALLOW"
- After submitting the call and receiving a confirming 200 response, you can re-run the call to the Get Lists API endpoint to confirm your create access list call was indeed successful
A brief example using CURL (otherwise use postman, insomnia, or some other programming language or process) shows how you can simply aadd the IP addresses