You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deploying Hydra and it does not have any clients yet. doing a API Call to getClients will always respod with response that has a Link header in which rel="next" is always present. Meaning if API client is utilizing the contract and doing calls to get all clients from all pages, it will stuck to infinite loop because next page rel link will always be present
Reproducing the bug
On virgin Hydra with empty database do an API call to get Oauth2 clients, with let's say page size 10 and page token "1" as first page token.
Expected result:
Considering there are not any clients response should contain Link header without rel="next"
Actual result:
Response contains Link header with rel="next" and every next call to this next page with this token returns again empty page and again rel="next" in Link header containing token to next empty page, never ending.
Relevant log output
Example of Link header while no any single client exists:
</admin/clients?page_size=250&page_token=eyJvZmZzZXQiOiIwIiwidiI6Mn0>; rel="first",</admin/clients?page_size=250&page_token=eyJvZmZzZXQiOiIyNTAiLCJ2IjoyfQ>; rel="next",</admin/clients?page_size=250&page_token=eyJvZmZzZXQiOiItMjUwIiwidiI6Mn0>; rel="prev"
Relevant configuration
No response
Version
oryd/hydra:v2.1.2
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
No response
The text was updated successfully, but these errors were encountered:
denysandriyanov
changed the title
When there are no OAuth2 clients registered, and doing getClients will always return rel="next" in the Link header
When there are no OAuth2 clients registered, getClients API will always return rel="next" in the Link header
Nov 28, 2023
Preflight checklist
Ory Network Project
No response
Describe the bug
When deploying Hydra and it does not have any clients yet. doing a API Call to getClients will always respod with response that has a Link header in which rel="next" is always present. Meaning if API client is utilizing the contract and doing calls to get all clients from all pages, it will stuck to infinite loop because next page rel link will always be present
Reproducing the bug
Expected result:
Considering there are not any clients response should contain Link header without rel="next"
Actual result:
Response contains Link header with rel="next" and every next call to this next page with this token returns again empty page and again rel="next" in Link header containing token to next empty page, never ending.
Relevant log output
Example of Link header while no any single client exists:
</admin/clients?page_size=250&page_token=eyJvZmZzZXQiOiIwIiwidiI6Mn0>; rel="first",</admin/clients?page_size=250&page_token=eyJvZmZzZXQiOiIyNTAiLCJ2IjoyfQ>; rel="next",</admin/clients?page_size=250&page_token=eyJvZmZzZXQiOiItMjUwIiwidiI6Mn0>; rel="prev"
Relevant configuration
No response
Version
oryd/hydra:v2.1.2
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
No response
The text was updated successfully, but these errors were encountered: