RocketChat / RocketChat/Rocket.Chat
API users.list can't query eppn
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Since we have some integrations with Rocket.Chat, we do use the API to create, query and subscribe User of a System to the Rocket.Chat. We use the SAML authentication and we work with the eppn parameter.
Steps to reproduce:
Before it was easy to search for a user in rocket chat with the eppn, since you could query the eppn with the API users.list.
api/v1/users.list?query={"eppn":"eppn-of-user"}
After I upgraded the Rocket.Chat to the 3.9 Version, I saw that it is not possible to query the eppn with the users.list API.
Expected behavior:
The structure of User is changed and now the eppn parameter is a child of services.saml. I can query the eppn in the MongoDB like this:
coll.find({'services.saml.eppn': "user-eepn"})
Actual behavior:
But no way to query the eppn with the API:
api/v1/users.list?query={'services.saml.eppn': "user-eppn"}
{
"success": false,
"error": "Invalid query parameter provided: "{'services.saml.eppn': "user-eppn"}" [error-invalid-query]",
"errorType": "error-invalid-query",
"details": {
"helperMethod": "parseJsonQuery"
}
}
Server Setup Information:
- Version of Rocket.Chat Server: 3.9
- Operating System: Debian 7
- Number of Running Instances: 3
Contributor guide
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.
Research direction
Start with the users.list API entry point and the parseJsonQuery helper named in the error response. Reproduce the nested services.saml.eppn query against the affected version, then trace how user query fields are validated. Done means users.list accepts the eppn lookup and returns the matching user, with a regression test covering the request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, typescript
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100