Skip to content

Rehome CCS/CCR permissions - #6934

Merged
yetanothertw merged 7 commits into
mainfrom
436-permissions-ccs-ccr
Jun 23, 2026
Merged

Rehome CCS/CCR permissions#6934
yetanothertw merged 7 commits into
mainfrom
436-permissions-ccs-ccr

Conversation

@yetanothertw

@yetanothertw yetanothertw commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #436 and #6810

This PR moves the cross-cluster privilege configuration out of the remote cluster setup pages and into the feature pages of CCR and CCS where readers actually need it.

  • Configuring privileges for cross-cluster search now lives on the Cross-cluster search page and includes separate API key and TLS certs subsections (depending on the security model employed in the remote cluster setup).
  • Configure privileges for cross-cluster replication is deduplicated and now lives on the Configure privileges for cross-cluster replication page and also includes API key and TLS certs subsections.
  • The 2 setup pages are now slimmed down: Add remote clusters using API key authentication and Add remote clusters using TLS certificate authentication. They now cover connection setup only, and link to the CCS and CCR pages respectively (for privileges configuration).
  • Existing links and redirects have been updated.

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No

Used Cursor's Auto Agent mode to validate some concepts and find links to update. Also super handy way to create the necessary redirects.

@yetanothertw yetanothertw self-assigned this Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@yetanothertw
yetanothertw requested a review from eedugon June 16, 2026 15:33

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Docs review summary

Focus areas

  • Style and clarity: One typo and one Vale wordiness suggestion in the new CCS section (see inline comments). Other Vale findings in changed files (may, disabled, Disable, and/or, menu arrows) are all in pre-existing, untouched lines.
  • Jargon: No new jargon issues. CCS, CCR, API key, and TLS are all adequately contextualised in the new content.
  • Frontmatter and applies_to: The CCR file's applies_to change from the verbose deployment: eck/ess/ece/self to stack: all is valid and consistent with repo usage. Inline {applies_to} directives on the deprecated TLS cert sections are correctly applied.
  • Content type fit: The restructuring works. The CCS page was already a reference/how-to hybrid; adding the privilege section fits its existing shape and reader needs.
  • Parent issue satisfaction: Based on the PR description, the stated goals (move privilege config out of setup pages into feature pages, slim down setup pages, update links) appear satisfied. The detection rules link update introduces a content accuracy issue worth fixing before merge (see inline comment on line 30).

Nits

  • cross-cluster-search.md line 133: The run_as privilege in the new TLS cert subsection is plain backtick text, while the parallel CCR file links it to the privilege docs (`(reference/redacted) Consider linking for consistency.
  • cross-cluster-search.md line 110: "Note that you only need to create this user on the local cluster." uses informal prose while line 176–178 uses a formal ::::{note} admonition for the same information in the adjacent TLS section. Minor inconsistency.

Generated by Docs review agent for issue #6934 · 419.8 AIC · ⌖ 25.4 AIC · ⊞ 32.8K

Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread solutions/security/detect-and-alert/cross-cluster-search-detection-rules.md Outdated
Comment thread explore-analyze/cross-cluster-search.md Outdated

@eedugon eedugon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've only had time to review the snippet. Sharing a comment about it. As it's a snippet used in a lot of pages I think we should give a bit of extra love to it, and also mention the TLS cert-based authentication possibility.

Comment thread deploy-manage/remote-clusters/_snippets/configure-roles-and-users.md Outdated

@eedugon eedugon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've suggested some changes, I think it's a good time to refine and enhance some of the content at the same time as doing this movement.

I think the suggested changes are low effort, but feel free to ignore any of them as we could leave them for a later stage.

Comment thread explore-analyze/cross-cluster-search.md
Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread explore-analyze/cross-cluster-search.md Outdated
Comment thread redirects.yml
anchors:
'enable-elastic-capabilities': 'elastic-capabilities'

# Rehome CCS and CCR privileges from remote-clusters-cert.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Impressive work with redirections here!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Was really easy to do with Cursor, so I'm afraid I can't take much credit for this specific task. Previous encounters with redirects gave me nightmares 😂

@yetanothertw
yetanothertw requested a review from eedugon June 19, 2026 16:57
@yetanothertw

Copy link
Copy Markdown
Member Author

Hi @eedugon, thank you so much for your insightful review, really appreciate it! 💡 🙏

I think I've addressed your feedback and this is ready for another round of reviews whenever you get the chance.

Many thanks in advance! 😸

@eedugon eedugon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great! I've added one suggestion to remove the note, that IMO doesn't add any value on the TLS cert-based auth.

I've tested the flow completely in a lab (2 ECK clusters) with TLS cert based auth, and the suggested roles work perfectly fine.

If you want me to test the setup with RCS 2.0 (API key based auth) let me know but that should wait until next week.

Besides that I think we need to create a separate issue to enrich this with API key based requests (note that I'm not talking here about how remote cluster is set up, but about how the end user trying CCS is running the request. All our examples (role + user creation) consider user based auth, and not API key based auth). We should tell users if CCS also work with API keys and how to set up the API key in that case (again not the "remote cluster API key", but the user API key).

Comment thread explore-analyze/cross-cluster-search.md
Comment thread explore-analyze/cross-cluster-search.md Outdated
@yetanothertw

Copy link
Copy Markdown
Member Author

Besides that I think we need to create a separate issue to enrich this with API key based requests (note that I'm not talking here about how remote cluster is set up, but about how the end user trying CCS is running the request. All our examples (role + user creation) consider user based auth, and not API key based auth). We should tell users if CCS also work with API keys and how to set up the API key in that case (again not the "remote cluster API key", but the user API key).

I've opened #7064 for this. Please feel free to add to it/edit the description to refine it further, @eedugon

@florent-leborgne florent-leborgne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM for experience-docs & docs shared files

@leemthompo leemthompo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Edu has forgotten more about these topics than I will ever know, so I defer to his approval TBH. I made one minor suggestion about dropdown-ing the deprecated TLS approach :)

Certificate based authentication is deprecated. Configure [API key authentication](/deploy-manage/remote-clusters/remote-clusters-api-key.md) instead or follow a guide on how to [migrate remote clusters from certificate to API key authentication](/deploy-manage/remote-clusters/remote-clusters-migrate.md).
:::

After [connecting remote clusters](/deploy-manage/remote-clusters/remote-clusters-self-managed.md), create matching user roles on both the local and remote clusters and assign the necessary privileges. With TLS-based authentication, the local user's role names are forwarded to the remote cluster, which authorizes the request by evaluating roles with the same names defined locally.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd consider whacking all this in a dropdown to underline the "are you sure?" messaging and slimming the page down a bit :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Love this! If it's deprecated it should be prioritised less. 👍

I'll add this suggestion to #7064 as there's a few more improvements that could be applied to some of the sections. I'll implement this as part of 7064

@yetanothertw
yetanothertw merged commit c02737b into main Jun 23, 2026
8 checks passed
@yetanothertw
yetanothertw deleted the 436-permissions-ccs-ccr branch June 23, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants