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

[8.16](backport #41583) x-pack/filebeat/input/entityanalytics/provider/okta: Rate limiting fixes #41901

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 5, 2024

Proposed commit message

x-pack/filebeat/input/entityanalytics/provider/okta: Rate limiting fixes

- Separate rate limits by endpoint.
- Stop requests until reset when `x-rate-limit-remaining: 0`.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Discussion

Can be reviewed commit-by-commit.

The reason a new rate.Limiter needs to be created when x-rate-limit-remaining: 0 is that while rate.Limiter allows updating of the rate and burst, it doesn't allow clearing of existing tokens.

Disruptive User Impact

None.

Related issues

…xes (#41583)

- Separate rate limits by endpoint.
- Stop requests until reset when `x-rate-limit-remaining: 0`.

(cherry picked from commit 4e19d09)

# Conflicts:
#	x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go
@mergify mergify bot requested a review from a team as a code owner December 5, 2024 08:59
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Dec 5, 2024
Copy link
Contributor Author

mergify bot commented Dec 5, 2024

Cherry-pick of 4e19d09 has failed:

On branch mergify/bp/8.16/pr-41583
Your branch is up to date with 'origin/8.16'.

You are currently cherry-picking commit 4e19d09ab2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.next.asciidoc
	modified:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta_test.go
	new file:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/ratelimiter.go
	new file:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/ratelimiter_test.go
	modified:   x-pack/filebeat/input/entityanalytics/provider/okta/okta.go
	modified:   x-pack/filebeat/input/entityanalytics/provider/okta/okta_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 5, 2024
Copy link
Contributor

@chrisberkhout chrisberkhout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still has conflicts

@chrisberkhout chrisberkhout added the Team:Security-Service Integrations Security Service Integrations Team label Dec 6, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 6, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@chrisberkhout chrisberkhout force-pushed the mergify/bp/8.16/pr-41583 branch from 942d4e0 to 2fc7f46 Compare December 6, 2024 09:20
Copy link
Contributor

@chrisberkhout chrisberkhout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts fixed.

Since 8.16 doesn't have #41044, the changes in GetUserFactors, GetUserRoles and GetGroupRoles are removed.

@chrisberkhout chrisberkhout enabled auto-merge (squash) December 6, 2024 09:30
@chrisberkhout chrisberkhout merged commit 8c7d219 into 8.16 Dec 6, 2024
20 of 22 checks passed
@chrisberkhout chrisberkhout deleted the mergify/bp/8.16/pr-41583 branch December 6, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants