x-pack/filebeat/input/entityanalytics/provider/okta: collect supervised users#49825
x-pack/filebeat/input/entityanalytics/provider/okta: collect supervised users#49825chemamartinez wants to merge 2 commits intoelastic:mainfrom
Conversation
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis pull request adds a 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go`:
- Around line 297-309: GetUserSupervises currently only returns the first page
from the "/api/v1/users" search and can drop supervised users; change the
implementation around the call to getDetails[SupervisedUser] so it paginates
like GetUserDetails/GetDeviceDetails: perform the initial request to the
constructed URL, decode and append results into a slice of SupervisedUser, then
follow subsequent pages by using okta.Next(h) in a loop (checking headers `h`
from the response) until there are no more pages, aggregating all pages before
returning; ensure you reuse the same query/endpoint construction (endpoint,
query, u) and preserve existing parameters (key, OmitNone, lim, log) while
returning the combined list.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7304ae79-4850-4613-b756-efa4d627343d
📒 Files selected for processing (7)
changelog/fragments/1774978179-okta-supervises-enrichment.yamldocs/reference/filebeat/filebeat-input-entity-analytics.mdx-pack/filebeat/input/entityanalytics/provider/okta/conf.gox-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.gox-pack/filebeat/input/entityanalytics/provider/okta/okta.gox-pack/filebeat/input/entityanalytics/provider/okta/okta_test.gox-pack/filebeat/input/entityanalytics/provider/okta/statestore.go
x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go
Show resolved
Hide resolved
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
TL;DRBuildkite failed in Remediation
Investigation detailsRoot Cause
This is a configuration/formatting gate failure, not a logic/test regression. Evidence
Local reproduction on PR head ( Verification
Follow-upAfter committing formatting fixes, rerun Buildkite for this PR. If it still fails, share the new failed-step log and I’ll re-trace. Note 🔒 Integrity filtering filtered 2 itemsIntegrity filtering activated and filtered the following items during workflow execution.
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
| The metadata to enrich users with. This is an array of values that may contain "groups", "roles", "factors", "supervises", or "none". If the array only contains "none", no metadata is collected for users. The default behavior is to collect "groups". | ||
|
|
||
| The "supervises" option populates the `supervises` field with a list of user IDs managed by each user. It works by searching for users whose `profile.managerId` matches the manager's user ID. Because this requires one additional API call per user, it is disabled by default to avoid hitting Okta rate limits. |
Proposed commit message
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Related issues