description: Install the JF CLI and authenticate with Artifactory
description: Install the JF CLI and authenticate with Artifactory using OAuth.
icon: ../.icons/jfrog.svg
icon: ../.icons/jfrog.svg
maintainer_github: coder
maintainer_github: coder
partner_github: jfrog
partner_github: jfrog
@ -10,47 +10,7 @@ tags: [integration]
# JFrog
# JFrog
Install the JF CLI and authenticate package managers with Artifactory.
Install the JF CLI and authenticate package managers with Artifactory using OAuth configured via Coder [`external-auth`](https://docs.coder.com/docs/admin/external-auth/) feature.
There are two ways to authenticate with Artifactory:
1. Using an admin access token
2. Using OAuth configured via Coder [`external-auth`](https://docs.coder.com/docs/admin/external-auth/) feature. This is the recommended approach.
artifactory_access_token = var.artifactory_access_token # An admin access token
package_managers = {
"npm": "npm",
"go": "go",
"pypi": "pypi"
}
}
```
Get a JFrog access token from your Artifactory instance. The token must have admin permissions, i.e. with scopes = ["applied-permissions/admin"]. It is recommended to store the token in a secret terraform variable.
```hcl
variable "artifactory_access_token" {
type = string
sensitive = true
}
```

### Using OAuth
You can use OAuth to authenticate with Artifactory. This is the recommended approach. To use OAuth, you must have the Coder [`external-auth`](https://coder.com/docs/v2/latest/admin/external-auth) configured with Artifactory.


@ -68,3 +28,7 @@ module "jfrog" {
}
}
}
}
```
```
## Prerequisites
- Coder [`external-auth`](https://docs.coder.com/docs/admin/external-auth/) configured with Artifactory. This requires a custom integration in Artifactory with **Callback URL** set to `https://<your-coder-url>/external-auth/jfrog/callback`.