-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
adminListIdentitySessions missing pagination headers Link and X-Total-Count in its response #2762
Comments
I took the time to debug this actually (I had nothing better going on so I figured why not). I looked at the handler for the admin identity list endpoint and found that the pagination headers are added here: https://github.com/ory/kratos/blob/master/identity/handler.go#L138 This call to The persistence layer requires a function for counting sessions in order to call the |
This resolves issue ory#2762
This resolves issue ory#2762
This resolves issue ory#2762
This resolves issue ory#2762
Preflight checklist
Describe the bug
Responses to the
/admin/identities/{id}/sessions
endpoint don't include the pagination headersLink
andX-Total-Count
as described in the API Design documentation. The endpoint does respect thepage
andper_page
query parameters as expected, so this is just a matter of the headers missing from the response.Reproducing the bug
This can be reproduced by requesting the
/admin/identities/{id}/sessions
endpoint and looking at the response headers. With the environment variableIDENTITY_ID
set to a valid identity ID, and with a kratos instance running at localhost with the admin port accessible at the default 4434, you can easily view the response headers by running:You should see some result similar to:
Notice that the response headers don't include
Link
, norX-Total-Count
, in contrast to the response from the/admin/identities
route which does include the headers like so:Relevant log output
When I make the request to kratos, I see the following log statements. This is while running the service at the Debug log level:
Relevant configuration
not applicable
Version
0.10.1
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
I'm running this locally on MacOS Monterey 12.5.1, using Docker Compose with the Kratos image:
oryd/kratos:v0.10.1
with the short hashdc617204d990
. I answered "Linux" to the question "On which operating system are you observing this issue?" because I assume container is running some variant of Linux (I haven't taken the time to check for sure, but it seems out of scope for this issue).The text was updated successfully, but these errors were encountered: