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

User Profile: mappings update #82700

Merged
merged 3 commits into from
Jan 20, 2022

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Jan 18, 2022

This PR updates the profile document mappings with following changes:

  • The roles field is now nested under user rather than access
  • As a result, the access.applications field is now removed and
    application specific access data is directly populated under acess
  • Add a domain field under user.realm which contains both the domain
    name and full realm list of the domain

A sample profile document (index version) is:

{
  "user_profile": {
    "uid": "u_JW0DQcT8TPGbun2KW-gSyA",
    "enabled": true,
    "last_synchronized": 1642119679035,
    "user": {
      "username": "foo",
      "roles": [
        "foo_role",
        "rac_role"
      ],
      "realm": {
        "name": "native1",
        "type": "native",
        "domain": {
          "name": "domainA",
          "realms": [
            {
              "name": "native1",
              "type": "native"
            },
            {
              "name": "ldap1",
              "type": "ldap"
            }
          ]
        },
        "node_name": "node-0"
      },
      "email": "foo@example.com",
      "full_name": "Mr. Foo",
      "display_name": "Curious Foo",
      "active": true
    },
    "access": {
      "kibana": {}
    },
    "data": {
      "kibana": {}
    }
  }
}

This PR updates the profile document mappings with following changes:
* The roles field is now nested under user rather than access
* As a result, the access.applications field is now removed and
  application specific access data is directly populated under acess
* Add a domain field under user.realm which contains both the domain
  name and full realm list of the domain
@ywangd ywangd added >non-issue :Security/Security Security issues without another label v8.1.0 labels Jan 18, 2022
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Jan 18, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

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

LGTM, we discussed it offline, nothing surprising here.

@ywangd ywangd merged commit 3001e63 into elastic:master Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Security/Security Security issues without another label Team:Security Meta label for security team v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants