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

Support "remote_cluster" in ES role definition #182035

Closed
jakelandis opened this issue Apr 29, 2024 · 8 comments · Fixed by #182377
Closed

Support "remote_cluster" in ES role definition #182035

jakelandis opened this issue Apr 29, 2024 · 8 comments · Fixed by #182377
Assignees
Labels
enhancement New value added to drive a business result Feature:Users/Roles/API Keys Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@jakelandis
Copy link
Contributor

ES is adding a new object to the role definition via elastic/elasticsearch#107493. This new part of the role is allows users to express the remote cluster level privileges allowed for different clusters when using the API key security model. This is the cluster level set of permissions to match the existing "remote_indices" index permissions.

The initial release will only allow for monitor_enrich since it is the only supported cross cluster privilege in use. It will be required when the query is sent over CCS, the query is written in ES|QL, the ES|QL query uses the ENRICH keyword, and the CCS security model is API key based (RCS 2.0). Note - ES|QL over CCS is still technical preview for 8.14.

All validation is done in ES and the expectation is for Kibana adds the new "remote_cluster" as part of the create/update/view role definition. The data model is as it appears where there is at most one root "remote_cluster" array of objects per role. There can be multiple (anonymous) objects in the array, and each object has 2 named arrays of strings. The inner "clusters" array is identical to the "clusters" array in "remote_indices" and the "privileges" array are simple strings with validation of correctness is handled by ES.

"remote_cluster": [
        {
            "privileges": [
                "monitor_enrich"
            ],
            "clusters": [
                "my_remote*"
            ]
        }
    ]

and

"remote_cluster": [
        {
            "privileges": [
                "monitor_enrich"
            ],
            "clusters": [
                "one", "two"
            ]
        },
        {
            "privileges": [
                "monitor_enrich"
            ],
            "clusters": [
                "two", "three"
            ]
        }
    ]
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 29, 2024
@legrego legrego added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Users/Roles/API Keys labels Apr 30, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 30, 2024
@legrego legrego added enhancement New value added to drive a business result needs-team Issues missing a team label labels Apr 30, 2024
@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 30, 2024
@legrego
Copy link
Member

legrego commented Apr 30, 2024

@jakelandis thanks for opening this. Is the Get builtin privileges API updated to reflect this new set of privileges? If not, can it be updated to support a new remote_cluster property with the permitted entries?

@jakelandis
Copy link
Contributor Author

Is the Get builtin privileges API updated to reflect this new set of privileges?

That API lists all the index or cluster privileges. "remote_cluster" is not a new privilege. Rather it is a new way to express existing cluster privileges for named remote clusters. Since there are not any new privileges, no need to for that API to get an update.

@legrego
Copy link
Member

legrego commented Apr 30, 2024

This API primarily exists in order to power the dropdown controls on our role management UI. Having a dedicated property which describes the allowed privileges to assign to the remote_cluster portion of a role would be very helpful, and aligned with the way we power the dropdowns for cluster and index privileges.

The alternative is for us to hardcode the list of allowed remote cluster privileges in Kibana. History has proved that this will deviate over time from what ES expects, leading to regressions.

@jakelandis
Copy link
Contributor Author

Ah... i see what you are asking for now. You want

"remote_cluster" : [
    "monitor_enrich",
    "<future_cluster_priv>"
]

So you can provide better support from the drop down box.

++ I can add that information to the API (but in a follow up to elastic/elasticsearch#107493). Will report back here when that is done (hopefully this week).

@legrego
Copy link
Member

legrego commented May 1, 2024

Yes, exactly - sorry for not being clearer in my original request. Thank you for taking a look!

@legrego
Copy link
Member

legrego commented May 8, 2024

Ah... i see what you are asking for now. You want

"remote_cluster" : [
    "monitor_enrich",
    "<future_cluster_priv>"
]

So you can provide better support from the drop down box.

++ I can add that information to the API (but in a follow up to elastic/elasticsearch#107493). Will report back here when that is done (hopefully this week).

@jakelandis is there an issue we can follow to track this request?

@jakelandis
Copy link
Contributor Author

@jakelandis is there an issue we can follow to track this request?

I logged an internal task: ES-8539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Users/Roles/API Keys Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants