Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating auth-app token with user-id creates token for the wrong user #11063

Open
Tracked by #10619
nirajacharya2 opened this issue Feb 26, 2025 · 4 comments
Open
Tracked by #10619
Labels

Comments

@nirajacharya2
Copy link
Contributor

Describe the bug

creating auth-app token with user-id creates token for user that made the request rather that for the user with the given userId. if the user-id is wrong a token is created for user who made the request.

Steps to reproduce

  1. create an auth-app token for einstein using user-id
curl -kv -XPOST 'https://localhost:9200/auth-app/tokens?expiry=72h&userId=4c510ada-c86b-4815-8820-42cdf82c3d51' -uadmin:admin|jq

Expected behavior

when einstein lists his token there should be a token.

Actual behavior

the token is not created for einstein but admin has a new token. if we put any random string in the userId the request will return 200 and token will be created for admin probably because he made the request.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

OCIS_ADD_RUN_SERVICES=auth-app
AUTH_APP_ENABLE_IMPERSONATION=true

ownCloud Web UI 11.1.3
 Infinite Scale 7.1.0-rc.4+16e920f41c Community

Additional context

Add any other context about the problem here.

@saw-jan
Copy link
Member

saw-jan commented Mar 4, 2025

hmm, if admin is impersonating user einstein, shouldn't admin get the token while listing? 🤔
CC @kobergj @2403905

@kobergj
Copy link
Collaborator

kobergj commented Mar 4, 2025

The parameter for the endpoint is userID (or userName) it is case sensitive I think so userId will not be checked.

The expected behaviour is that the token is created for einstein. That means only einstein can list it, admin cannot.

@saw-jan
Copy link
Member

saw-jan commented Mar 4, 2025

The expected behaviour is that the token is created for einstein. That means only einstein can list it, admin cannot.

that means this bug report is valid if it actually is the case.

@kobergj
Copy link
Collaborator

kobergj commented Mar 4, 2025

that means this bug report is valid if it actually is the case.

exactly. But parameters should be double checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants