update README

pull/97/head
Muhammad Atif Ali 2 years ago
parent 89d50ceb7f
commit 80925b876a

@ -1,6 +1,6 @@
--- ---
display_name: JFrog display_name: JFrog (OAuth)
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.
Examples of both approaches are provided below.
## Examples
### Using an admin access token
```hcl
module "jfrog" {
source = "https://registry.coder.com/modules/jfrog"
agent_id = coder_agent.example.id
jfrog_url = "https://YYYY.jfrog.io"
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
}
```
![JFrog](../.images/jfrog.png)
### 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.
![JFrog OAuth](../.images/jfrog-oauth.png) ![JFrog OAuth](../.images/jfrog-oauth.png)
@ -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`.

Loading…
Cancel
Save