Some API endpoints return 403 (WebAPI and Atlas v2.12.0)
@ssuvorov-fls is already working on this.
Since Nov 4, 2022.
- Dominant language
- Java
- Stars
- 151
- Forks
- 183
- Avg merge
- 14m
- Merged PRs (30d)
- 2
Description
Expected behavior
When using an admin user's token, cURL on endpoints such as http://www.example.com/user/userId/permissions/ should return the data specified in the API documentation.
Actual behavior
The command fails with return code 403. Most endpoints work as expected (listing users or roles, creating sources for example).
The logs do not provide any information pertaining to this error.
Steps to reproduce behavior
Assign admin role (and every available permission to ensure it is not the issue) to a user, then generate a token and use it to query WebAPI for a specific user's roles for instance.
ADMIN_USERNAME="ohdsi"
ADMIN_PASSWORD="ohdsi"
WEBAPI_BASE_URL="http://webapi:8080"
TOKEN=$(curl -s -o /dev/null -D - -k --data "login=${ADMIN_USERNAME}&password=${ADMIN_PASSWORD}" "${WEBAPI_BASE_URL}/WebAPI/user/login/db" | sed -n -e 's/Bearer: //p')
curl -k -H "Authorization: Bearer ${TOKEN}" -X GET "${WEBAPI_BASE_URL}/WebAPI/user/1000/roles"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.