Skip to content

Comments

[9.1] [Entity Analytics][Privmon] Fix Privileged user monitoring index sync in non-default spaces (#230420)#230563

Merged
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-230420
Aug 5, 2025
Merged

[9.1] [Entity Analytics][Privmon] Fix Privileged user monitoring index sync in non-default spaces (#230420)#230563
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-230420

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

…stic#230420)

## Summary

Closes [elastic#13399](elastic/security-team#13399)

Fixes a bug where syncing privileged users from an index failed in
spaces other than "default".

The issue was that we could not find the API key saved object, this is
because we weren't specifying the namespace when we searched for it.

### Test Steps

- create a space "space2"
- switch to space2
- enable privileged usr monitoring advanced setting
- create an index to sync users from:

```
# create index with correct mapping
PUT /my-custom-index
{
  "mappings" : {
    "properties": {
      "user.name": {
        "type": "keyword"
      }
    }
  }
}

# add a user
POST /_bulk
{ "index": { "_index": "my-custom-index" } }
{ "user": { "name": "tiago" } }
```

- add a document to skip the onboarding screen

```
POST /logs-test-hello/_doc
{
  "message" : "sup"
}
```
- go to privileged user monitoring onbaording
- select your index to sync
- (it should work and load the users)

(cherry picked from commit 6f9d1a3)
@kibanamachine kibanamachine merged commit 1a92056 into elastic:9.1 Aug 5, 2025
16 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @hop-dev

@jaredburgettelastic jaredburgettelastic changed the title [9.1] [Entity Analytics][Privmon] Fix index sync in non-default spaces (#230420) [9.1] [Entity Analytics][Privmon] Fix Privileged user monitoring index sync in non-default spaces (#230420) Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants