adoptium / adoptium/aqa-test-tools

TRS Server can't use Jenkins Password that has Special Characters

Open
#47 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
33
Forks
97
Avg merge
7h 9m
Merged PRs (30d)
5

Description

### Relevant Code Snippet
https://github.com/AdoptOpenJDK/openjdk-test-tools/blob/414ec78d4edadf6542ba2a53357e73037494ba21/TestResultSummaryService/JenkinsInfo.js#L64-L77

`JenkinsInfo.js` can't use the password that has special characters such as "!" to communicate with Jenkins properly, giving 401 Unauthorized error.

### Helpful Links
https://github.com/jansepar/node-jenkins-api
We tried replacing the original code with this snippet but didn't have much luck:

```
// Password that needs to be %-encoded
const { URL } = require('url');
const jenkinsUrl = new URL('https://username@jenkins.company.com');
jenkinsUrl.password = 'some_weirdPASSWORD123!@#$%^&*()~`\\/;\'';
var jenkins = jenkinsapi.init(jenkinsUrl.href);
```

### Workaround
1) Can use a password that doesn't have special characters.
2) Can use a token instead of password: https://stackoverflow.com/questions/45466090/how-to-get-the-api-token-for-jenkins.

Contributor guide

Open the contributing guide

Research direction

Start with TestResultSummaryService/JenkinsInfo.js at lines 64-77 and compare its Jenkins client setup with the linked node-jenkins-api documentation. Reproduce authentication using a Jenkins password containing special characters, then verify the TRS server communicates successfully without a 401 Unauthorized response.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.