\
> --data 'items.find({"repo": "generic-local","$or": [{"$and": [{"path": { "$match": "*"},"name": { "$match": "*"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","size","type","property")'
HTTP/1.1 200 OK
Server: Artifactory/6.16.0
X-Artifactory-Id: b2b51933cd264b43:10d5af30:16f15b57d38:-8000
Content-Type: application/json
Transfer-Encoding: chunked
Date: Tue, 17 Dec 2019 22:16:13 GMT
{
"results" : [ {
"repo" : "generic-local",
"path" : ".",
"name" : "hello",
"type" : "file",
"size" : 14,
"actual_md5" : "bea8252ff4e80f41719ea13cdf007273",
"actual_sha1" : "60fde9c2310b0d4cad4dab8d126b04387efba289"
} ],
"range" : {
"start_pos" : 0,
"end_pos" : 1,
"total" : 1
}
}
Used Versions Jenkins ver. 2.190.3 Artifactory OSS 6.16.0 rev 61600900 Test matrix
artifactory-jenkins-plugin |
Anonymous (Credentials set to '- none -') |
User/password |
User/API_KEY |
API_KEY (SecretText) |
3.3.2 |
HTTP/1.1 403 Forbidden |
|
|
N/A (not able to select in global plugin server config) |
3.3.x-SNAPSHOT (private-4272760c-reenberg) aka HAP-1219 |
HTTP/1.1 403 Forbidden |
|
|
N/A |
3.4.1 |
HTTP/1.1 403 Forbidden |
|
|
N/A |
3.4.x-SNAPSHOT (private-879ba6cb-jenkins) by Yahavi Enables SecretText |
HTTP/1.1 403 Forbidden Logs access.log: 2019-12-17 23:31:14,749 [ACCEPTED LOGIN] for client : anonymous / 172.22.0.3. request.log: 20191217233114|23|REQUEST|172.22.0.3|anonymous|POST|/api/search/aql|HTTP/1.1|403|192 Note: I assume that the anonymous user fails (even though enonymous has READ access and can download through the web interface), as JQL is used here, and thus an actual user is needed? |
|
|
The SecretText credentials are shown, but it fails: HTTP/1.1 401 Unauthorized Logs |
access.log: 2019-12-17 23:26:16,665 [DENIED LOGIN] for client : NA / 172.22.0.3. request.log: 20191217232616|36|REQUEST|172.22.0.3|non_authenticated_user|POST|/api/search/aql|HTTP/1.1|401|192 NOTE: I have never before seen the 'non_authenticated_user', but maybe this is somewhat new? Anyways its seems that my API_KEY which was pasted as the SecretText credentials are not properly recognized. I have double checked that the API_KEY is pasted correctly.| Obviously I need to retest this with 6.12 version of Artifactory, but I doubt that is where the issue lies. ethorsa, I would suggest that you atleast look in the 'access.log' and 'request.log'. What I finds easiest, is to just tail -f ARTI_HOME/logs/*.log. Then add a few newlines to your terminal by pressing enter a few times, and then try your build. Assuming you don't have any other traffic to your Artifactory instance, then you will easily see anything that gets added to any of the log files. If that is not possible for you, then you would need to fetch them from the web interface, as previously mentioned. Yahav Itzhak, note that I tested your build, but couldn't get it to work. Maybee i derbed something? I added a new secret, in the global scope:
- Secret: <pasted API_KEY>
- ID: 'api-user_secret'
- Description: 'api-user using API_KEY as secret text'
|