```bash theme={null}
endorctl api create -r PackageManager -n -d '{
"meta": {
"name": ""
},
"spec": {
"auth_provider": {
"package_manager_type": "PACKAGE_MANAGER_TYPE_NPM",
"gar": {
"project_id": "",
"location": "",
"repository": "",
"service_account_key": ""
}
},
"npm": {
"priority": 1
}
},
"propagate": true
}'
```
```bash theme={null}
endorctl api create -r PackageManager -n -d '{
"meta": {
"name": ""
},
"spec": {
"auth_provider": {
"package_manager_type": "PACKAGE_MANAGER_TYPE_MVN",
"gar": {
"project_id": "",
"location": "",
"repository": "",
"service_account_key": ""
}
},
"mvn": {
"priority": 1
}
},
"propagate": true
}'
```
Endor Labs automatically sets the Gradle property key to `ARTIFACT_REGISTRY_AUTH_TOKEN` at scan time. Don't include `property_key_name` or `property_key_value` in the request. Gradle also has no `priority` field.
```bash theme={null}
endorctl api create -r PackageManager -n -d '{
"meta": {
"name": ""
},
"spec": {
"auth_provider": {
"package_manager_type": "PACKAGE_MANAGER_TYPE_GRADLE",
"gar": {
"project_id": "",
"location": "",
"repository": "",
"service_account_key": ""
}
},
"gradle": {}
},
"propagate": true
}'
```
```bash theme={null}
endorctl api create -r PackageManager -n -d '{
"meta": {
"name": ""
},
"spec": {
"auth_provider": {
"package_manager_type": "PACKAGE_MANAGER_TYPE_PYPI",
"gar": {
"project_id": "",
"location": "",
"repository": "",
"service_account_key": ""
}
},
"pypi": {
"priority": 1
}
},
"propagate": true
}'
```
## Known limitations
* **Token lifetime**: GAR access tokens expire approximately one hour after they are minted. A token is minted at the start of the scan and used for package resolution. If package resolution begins more than one hour after the scan starts, authentication fails with a `401 Unauthorized` error. Re-run the scan to generate a new access token and start a fresh one-hour window.
* **Long-lived service account key**: The JSON key you provide remains valid until you revoke it in GCP. Rotate the key periodically following your organization's credential management practices and update the integration in Endor Labs after rotation.
* **Workload Identity Federation**: Keyless authentication through Workload Identity Federation is not supported in this release.
# Private package manager integration for Gradle
Source: https://docs.endorlabs.com/integrations/package-managers/gradle-private-package-manager/index
Learn how to configure Endor Labs to access private Gradle repositories for dependency resolution and security scanning.
Configure Endor Labs to integrate with private Gradle repositories to access proprietary dependencies during security scanning and analysis. When your Gradle projects depend on artifacts hosted in private or corporate repositories, Endor Labs requires authentication credentials to resolve these dependencies and generate a complete bill of materials.
This integration enables Endor Labs to:
* Access private Gradle artifacts during dependency resolution
* Generate comprehensive security analysis including private dependencies
* Maintain complete visibility into your software supply chain
Endor Labs generally respects package authentication and configuration settings and a package manager integration is usually not required to scan private packages successfully.
* Use package manager integrations to simplify scanning when authentication to private repositories is not part of standard manifest or settings files.
* Package manager integrations allow you to set custom repositories for each package ecosystem and the priority of each repository for scanning.
To set up a package manager integration:
1. Select **User menu** > **Integrations** from the left sidebar.
2. Select **Add** next to the package manager configuration you want to add.
3. Select **Add Package Manager**.
4. Enter a **Name** for the integration.
5. Choose an authentication type and complete the required fields.