@@ -31,7 +31,7 @@ by using our official Coder [modules](https://registry.coder.com). We publish
31
31
two type of modules that automate the JFrog Artifactory and Coder integration.
32
32
33
33
1 . [ JFrog-OAuth] ( https://registry.coder.com/modules/jfrog-oauth )
34
- 2 . [ JFrog-Token] ( https://registry.coder.com/modules/jfrog-token )
34
+ 1 . [ JFrog-Token] ( https://registry.coder.com/modules/jfrog-token )
35
35
36
36
### JFrog-OAuth
37
37
@@ -45,70 +45,70 @@ To set this up, follow these steps:
45
45
46
46
1 . Modify your Helm chart ` values.yaml ` for JFrog Artifactory to add,
47
47
48
- ``` yaml
49
- artifactory :
50
- enabled : true
51
- frontend :
52
- extraEnvironmentVariables :
53
- - name : JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION
54
- value : " true"
55
- access :
56
- accessConfig :
57
- integrations-enabled : true
58
- integration-templates :
59
- - id : " 1"
60
- name : " CODER"
61
- redirect-uri : " https://CODER_URL/external-auth/jfrog/callback"
62
- scope : " applied-permissions/user"
63
- ` ` `
64
-
65
- > Note Replace ` CODER_URL` with your Coder deployment URL, e.g.,
66
- > <coder.example.com>
67
-
68
- 2 . Create a new Application Integration by going to
48
+ ``` yaml
49
+ artifactory :
50
+ enabled : true
51
+ frontend :
52
+ extraEnvironmentVariables :
53
+ - name : JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION
54
+ value : " true"
55
+ access :
56
+ accessConfig :
57
+ integrations-enabled : true
58
+ integration-templates :
59
+ - id : " 1"
60
+ name : " CODER"
61
+ redirect-uri : " https://CODER_URL/external-auth/jfrog/callback"
62
+ scope : " applied-permissions/user"
63
+ ` ` `
64
+
65
+ > Note Replace ` CODER_URL` with your Coder deployment URL, e.g.,
66
+ > <coder.example.com>
67
+
68
+ 1 . Create a new Application Integration by going to
69
69
<https://JFROG_URL/ui/admin/configuration/integrations/new> and select the
70
70
Application Type as the integration you created in step 1.
71
71
72
- 
72
+ 
73
73
74
- 3 . Add a new
74
+ 1 . Add a new
75
75
[external authentication](https://coder.com/docs/admin/external-auth) to
76
76
Coder by setting these env variables,
77
77
78
- ` ` ` env
79
- # JFrog Artifactory External Auth
80
- CODER_EXTERNAL_AUTH_1_ID="jfrog"
81
- CODER_EXTERNAL_AUTH_1_TYPE="jfrog"
82
- CODER_EXTERNAL_AUTH_1_CLIENT_ID="YYYYYYYYYYYYYYY"
83
- CODER_EXTERNAL_AUTH_1_CLIENT_SECRET="XXXXXXXXXXXXXXXXXXX"
84
- CODER_EXTERNAL_AUTH_1_DISPLAY_NAME="JFrog Artifactory"
85
- CODER_EXTERNAL_AUTH_1_DISPLAY_ICON="/icon/jfrog.svg"
86
- CODER_EXTERNAL_AUTH_1_AUTH_URL="https://JFROG_URL/ui/authorization"
87
- CODER_EXTERNAL_AUTH_1_SCOPES="applied-permissions/user"
88
- ` ` `
89
-
90
- > Note Replace `JFROG_URL` with your JFrog Artifactory base URL, e.g.,
91
- > <example.jfrog.io>
92
-
93
- 4 . Create or edit a Coder template and use the
78
+ ` ` ` env
79
+ # JFrog Artifactory External Auth
80
+ CODER_EXTERNAL_AUTH_1_ID="jfrog"
81
+ CODER_EXTERNAL_AUTH_1_TYPE="jfrog"
82
+ CODER_EXTERNAL_AUTH_1_CLIENT_ID="YYYYYYYYYYYYYYY"
83
+ CODER_EXTERNAL_AUTH_1_CLIENT_SECRET="XXXXXXXXXXXXXXXXXXX"
84
+ CODER_EXTERNAL_AUTH_1_DISPLAY_NAME="JFrog Artifactory"
85
+ CODER_EXTERNAL_AUTH_1_DISPLAY_ICON="/icon/jfrog.svg"
86
+ CODER_EXTERNAL_AUTH_1_AUTH_URL="https://JFROG_URL/ui/authorization"
87
+ CODER_EXTERNAL_AUTH_1_SCOPES="applied-permissions/user"
88
+ ` ` `
89
+
90
+ > Note Replace `JFROG_URL` with your JFrog Artifactory base URL, e.g.,
91
+ > <example.jfrog.io>
92
+
93
+ 1 . Create or edit a Coder template and use the
94
94
[JFrog-OAuth](https://registry.coder.com/modules/jfrog-oauth) module to
95
95
configure the integration.
96
96
97
- ` ` ` tf
98
- module "jfrog" {
99
- source = "registry.coder.com/modules/jfrog-oauth/coder"
100
- version = "1.0.0"
101
- agent_id = coder_agent.example.id
102
- jfrog_url = "https://jfrog.example.com"
103
- configure_code_server = true # this depends on the code-server
104
- username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username"
105
- package_managers = {
106
- "npm": "npm",
107
- "go": "go",
108
- "pypi": "pypi"
109
- }
110
- }
111
- ` ` `
97
+ ` ` ` tf
98
+ module "jfrog" {
99
+ source = "registry.coder.com/modules/jfrog-oauth/coder"
100
+ version = "1.0.0"
101
+ agent_id = coder_agent.example.id
102
+ jfrog_url = "https://jfrog.example.com"
103
+ configure_code_server = true # this depends on the code-server
104
+ username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username"
105
+ package_managers = {
106
+ "npm": "npm",
107
+ "go": "go",
108
+ "pypi": "pypi"
109
+ }
110
+ }
111
+ ` ` `
112
112
113
113
# ## JFrog-Token
114
114
@@ -123,37 +123,36 @@ To set this up, follow these steps:
123
123
1. Get a JFrog access token from your Artifactory instance. The token must be an
124
124
[admin token](https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token)
125
125
with scope `applied-permissions/admin`.
126
- 2 . Create or edit a Coder template and use the
126
+ 1 . Create or edit a Coder template and use the
127
127
[JFrog-Token](https://registry.coder.com/modules/jfrog-token) module to
128
128
configure the integration and pass the admin token. It is recommended to
129
129
store the token in a sensitive terraform variable to prevent it from being
130
130
displayed in plain text in the terraform state.
131
131
132
- ` ` ` tf
133
- variable "artifactory_access_token" {
134
- type = string
135
- sensitive = true
136
- }
137
-
138
- module "jfrog" {
139
- source = "registry.coder.com/modules/jfrog-token/coder"
140
- version = "1.0.0"
141
- agent_id = coder_agent.example.id
142
- jfrog_url = "https://example.jfrog.io"
143
- configure_code_server = true # this depends on the code-server
144
- artifactory_access_token = var.artifactory_access_token
145
- package_managers = {
146
- "npm": "npm",
147
- "go": "go",
148
- "pypi": "pypi"
149
- }
150
- }
151
- ` ` `
152
-
153
- <blockquote class="info">
154
- The admin-level access token is used to provision user tokens and is never exposed to
155
- developers or stored in workspaces.
156
- </blockquote>
132
+ ` ` ` tf
133
+ variable "artifactory_access_token" {
134
+ type = string
135
+ sensitive = true
136
+ }
137
+
138
+ module "jfrog" {
139
+ source = "registry.coder.com/modules/jfrog-token/coder"
140
+ version = "1.0.0"
141
+ agent_id = coder_agent.example.id
142
+ jfrog_url = "https://example.jfrog.io"
143
+ configure_code_server = true # this depends on the code-server
144
+ artifactory_access_token = var.artifactory_access_token
145
+ package_managers = {
146
+ "npm": "npm",
147
+ "go": "go",
148
+ "pypi": "pypi"
149
+ }
150
+ }
151
+ ` ` `
152
+
153
+ <blockquote class="info">
154
+ The admin-level access token is used to provision user tokens and is never exposed to developers or stored in workspaces.
155
+ </blockquote>
157
156
158
157
If you do not want to use the official modules, you can check example template
159
158
that uses Docker as the underlying compute
0 commit comments