Skip to content

Commit 2c8daf1

Browse files
committed
fix(jfrog-oauth): fail when access_token is empty
Add a lifecycle precondition to the coder_script resource that validates the JFrog access token is not empty. This prevents the module from silently creating configurations with empty tokens when users haven't authenticated via external auth. Changes: - Add precondition check on data.coder_external_auth.jfrog.access_token - Replace main.test.ts with jfrog-oauth.tftest.hcl for proper data mocking - Add comprehensive tests covering all package managers (npm, pypi, go, docker, conda, maven) with script content validation - Tests verify actual generated configuration content, not just resource existence Fixes #72
1 parent 392f6b1 commit 2c8daf1

File tree

4 files changed

+409
-191
lines changed

4 files changed

+409
-191
lines changed

registry/coder/modules/jfrog-oauth/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Install the JF CLI and authenticate package managers with Artifactory using OAut
1616
module "jfrog" {
1717
count = data.coder_workspace.me.start_count
1818
source = "registry.coder.com/coder/jfrog-oauth/coder"
19-
version = "1.2.3"
19+
version = "1.2.4"
2020
agent_id = coder_agent.main.id
2121
jfrog_url = "https://example.jfrog.io"
2222
username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username"
@@ -57,7 +57,7 @@ Configure the Python pip package manager to fetch packages from Artifactory whil
5757
module "jfrog" {
5858
count = data.coder_workspace.me.start_count
5959
source = "registry.coder.com/coder/jfrog-oauth/coder"
60-
version = "1.2.3"
60+
version = "1.2.4"
6161
agent_id = coder_agent.main.id
6262
jfrog_url = "https://example.jfrog.io"
6363
username_field = "email"

0 commit comments

Comments
 (0)