-
Type: Task
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Continuous Integration
-
Tags:
Currently, some Jenkins jobs in the Platform CI are relying on the Nuxeo REST API to query Connect, e.g.:
- Build the hotfix Docker image: nuxeo-hf
- Check the ticket's release notes: check-release-notes-rephrasing/
The nextHfVersion.sh or setupHfPackage.sh scripts make some queries like:
curl -u hudson:******: application/json' -H 'Cache-Control: no-cache' -d '{"params":{"query":"SELECT * FROM Document WHERE ecm:primaryType='\'NuxeoPackage\'' AND nxpkg:packageName LIKE '\'nuxeo-2023-HF%\'' ORDER BY nxpkg:packageId DESC"},"context":{}}' https://connect.nuxeo.com:443/nuxeo/api/v1/automation/Document.Query
Yet, since the latest changes about roles and Nuxeo users in Connect (NXS-6972) the "hudson" technical user isn't allowed to perform such Nuxeo REST API queries, unless belonging to the Administrators or "power users" group.
This results in:
{"entity-type":"exception","status":405,"message":"javax.ws.rs.WebApplicationException"} ... org.nuxeo.ecm.automation.OperationException org.nuxeo.ecm.core.model.NoSuchDocumentException com.sun.jersey.api.NotFoundException org.codehaus.jackson.JsonParseException org.nuxeo.ecm.webengine.WebException org.nuxeo.ecm.core.api.DocumentNotFoundException
Temporarily, the "hudson" user has been added to the "power users" group, which fixes the issue.
Once it is correctly documented, let's use the recommended Connect API to make the queries the clean way.
Also, we should be able to use this API with a token, which is not yet the case.
- is related to
-
NXS-6972 Replace Nuxeo Users by Internal Users
- Resolved