question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Check User Sessions Bugs

See original GitHub issue

Describe the bug

Couldn’t get user sessions from GET _https://keycloakhost.com/auth/{MY_REALM}/users/{USER_ID}/sessions_

i also tried another URL like : GET _https://keycloakhost.com/auth/admin/{MY_REALM}/users/{USER_ID}/sessions_ (got 404) GET _https://keycloakhost.com/admin/{MY_REALM}/users/{USER_ID}/sessions_ (got 403) GET _https://keycloakhost.com/{MY_REALM}/users/{USER_ID}/sessions_ (got 404)

Version

17.0.0

Expected behavior

got user session

Actual behavior

response :```

{ “error”: "RESTEASY003210: Could not find resource for full path: https://keycloak… }


### How to Reproduce?

curl --location --request GET "https://KEYCLOAK_HOST/admin/realms/MY_REALM/users/MY_USERS/sessions" --header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIxaGFqNlpkMmV2b28wMHIxUGNxcjZxOEljTjYxcUFwLS1ZS2xWYmFDcmJVIn0.eyJleHAiOjE2NDk2NTUyNzgsImlhdCI6MTY0OTY1NDk3OCwianRpIjoiMWEyMjdlNTMtNTQyZC00NDYxLTlkMDMtZjFmOTY2Y2JiZmQ4IiwiaXNzIjoiaHR0cHM6Ly9rZXljbG9hay1ub25wcm9kLmJmaS5jby5pZC9yZWFsbXMvSUFNX0JGSV9ERVYiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiZGJmOTQ3NmQtNDM4Ny00NGViLTk0NDgtNGI0YjAwZDczMzMxIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibmV3LWluc3VyYW5jZSIsInNlc3Npb25fc3RhdGUiOiIxYTc0MTY5Ny1kZGMyLTRkNTEtOWIwYi1iZjQyZTcyZDdkMWIiLCJhY3IiOiIxIiwiYWxsb3dlZC1vc...."

KEYCLOAK_HOST, MY_REALM, MY_USERS, should be change with your own config


### Anything else?

_No response_

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mhajascommented, Apr 12, 2022

I don’t think there is any REST endpoint for what you need. Users cannot remove their own sessions unless they have authorization for that.

Not sure what you mean by Client SDK, but if you mean client service account, it could work.

Also, for queries like this, it is better to ask on some community forum, in this case, User mailing list would be the best option. There is a wider audience and people have more experience with real-world use cases. You can describe your use case and I am sure someone will help you.

0reactions
pandu-malikcommented, Apr 12, 2022

no, not that kind of scenario. my scenario is when someone do login, it first check if the users already has some sessions somewhere else, if yes, then i need to kill previous sessions. i also tried using java Client SDK, and it’s work perfectly, but just wondering if there any rest API built in with this feature (session check).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Session Based Bugs - HowToHunt - GitBook
Session Based Bugs · 1.Create your account on target Site. · 2.request for a forget password token. · 3.Don't use that link ·...
Read more >
Hunting Session Fixation Bugs - Infosec Resources
A session fixation attack allows spoofing another valid user and working on behalf of their credentials. It typically fixates another person's ...
Read more >
Finding customers who encountered a bug - FullStory Support
Too often bugs and errors are flagged by our users once they've... ... Use the Error Clicks search in Event Scope to filter...
Read more >
Solve user-reported issues - LogRocket
LogRocket lets you stop guessing why bugs happen. ... Find anonymous user sessions via IP, error messages, and user activity; Jump to the...
Read more >
Unique session ID per virtual user - BUGS & ISSUES
Hi Vadim, When I first request a page from the web site, ASP.NET sets a session ID. For the load test, it seems...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found