ory / cli

Create bulk action scripts, automate your tasks, manage your projects, and seamlessly interact with the Ory Network using the Ory command line interface (CLI).
https://www.ory.sh/cli?utm_source=github&utm_medium=banner&utm_campaign=cli
Apache License 2.0
42 stars 20 forks source link

Using the proxy can easily trigger the rate limiting of Ory Network free projects #299

Closed tricky42 closed 6 months ago

tricky42 commented 1 year ago

From the community slack: https://ory-community.slack.com/archives/C02MR4DEEGH/p1674751852169649

Hey, we are using a Free Ory Network project for IAM. We recently migrated one of our apps to use Kratos for authentication and it seemed everything is working fine. But now we are randomly getting 429s and we can't understand what's happening. We authenticate the user on the browser side and then verify the caller on server-side requests based on their cookies. So first you log in on our website, you get your Kratos cookie and when making requests to the backend that cookie is attached. The backend then verifies user identity by calling Kratos. As the app initializes, we're marking around 10 requests to the backend in a matter of a second. We noticed now that sporadically, one or more of those would fail. Ory Network starts returning 429 on any request for that session token for around 5-30 seconds. I did not find any mention about this behavior in the docs. Could you please help me understand what's happening and how to work around this issue?

Slight edit: we are using Ory Proxy to handle calls to Ory. I just realized that when loading our app in dev mode, it will make a lot of requests for locally served js files. Those go through the proxy, get authenticated, and likely rightfully result in a 429.

The assumption is correct. Right now the proxy does a session check for each request passing through the proxy.

We can optimize this by only doing session checks for API requests and passing through all other requests without a session check.

github-actions[bot] commented 7 months ago

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneously you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️