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

datasource/okta: rate limits not respected #341

Open
calebdoxsey opened this issue Jun 19, 2024 · 0 comments
Open

datasource/okta: rate limits not respected #341

calebdoxsey opened this issue Jun 19, 2024 · 0 comments

Comments

@calebdoxsey
Copy link
Contributor

What happened?

Okta API requests sometimes return 429 errors:

{
  "level": "debug",
  "method": "GET",
  "authority": "AUTHORITY",
  "path": "/api/v1/groups/GROUPID/users",
  "duration": 104.973251,
  "response-code": 429,
  "idp": "okta",
  "response-body": "{\"errorCode\":\"E0000047\",\"errorSummary\":\"API call exceeded rate limit due to too many requests.\",\"errorLink\":\"E0000047\",\"errorId\":\"oaeXtysydrqTluVFFtCX3H8IA\",\"errorCauses\":[]}",
  "time": "2024-06-19T12:35:05Z",
  "message": "http-request"
}

What did you expect to happen?

Okta returns rate limits in API response headers: https://developer.okta.com/docs/reference/rl-best-practices

  • X-Rate-Limit-Limit - the rate limit ceiling that is applicable for the current request.
  • X-Rate-Limit-Remaining - the number of requests left for the current rate-limit window.
  • X-Rate-Limit-Reset - the time at which the rate limit resets, specified in UTC epoch time (in seconds).

We should be able to retry the request intelligently based on these headers.

Additional context

We should also investigate if there's a way to make less calls to the API to get the same membership data.

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

No branches or pull requests

1 participant