Authentication
Flux supports both authenticated and public services.
Authenticated
All compute service endpoints support HTTP Basic Auth with username and password.
The Arraylake compute service uses your organization name as the username
and an Arraylake API key as the password
.
To generate an API token navigate to https://app.earthmover.io/{org}/settings/api-clients
Authenticated queries can be made by embedding the credential username
(org) and password
(api token) into the base URl as follows
https://{username}:{password}@compute.earthmover.io/v1/services/{protocol}/{org}/{repo}/{branch|commit|tag}/{path/to/group}/{protocol}/
Alternatively, the Authorization
header can be used to pass the credentials:
- python
- curl
- mapbox
- qgis
import requests
response = requests.get(
"https://compute.earthmover.io/v1/services/{protocol}/{org}/{repo}/{branch|commit|tag}/{path/to/group}/{protocol}/",
auth=("{username}", "{password}")
)
curl -u {username}:{password} "https://compute.earthmover.io/v1/services/{protocol}/{org}/{repo}/{branch|commit|tag}/{path/to/group}/{protocol}/"
transformRequest
can be used to attach Basic Authorization headers to Flux requests from Mapbox.
The header can be generated on this site (or others) by plugging in your Org name as username and API token as Password.
transformRequest: (url, resourceType) => {
if (url.includes('compute.earthmover.io')) {
return {
url: url,
headers: { 'Authorization': 'Basic ENCODED_TOKEN' },
};
}
}
Basic Authentication credentials can be stored in QGIS's Authentication store accessed through Preferences > Authentication
. These credentials can then be specified for specific layers when added to a project.

Public Services - Disabling Authentication
When desired, services can also be made public for any user to access.
This will allow any http traffic to access your service endpoints and ANY repositories within your Arraylake organization. More fine grained control over authentication is on our roadmap.
al compute enable {org} {protocol} --is-public