Skip to content

Conversation

slobodanadamovic
Copy link
Contributor

@slobodanadamovic slobodanadamovic commented Jan 23, 2025

The query role API now returns built-in roles as well.
This PR notes this and adds an example on how the built-in roles can be filtered out.

The query roles API now returns built-in roles as well.
This PR clarifies notes this and adds an example on how the built-in
roles can be filtered out.
@slobodanadamovic slobodanadamovic added >docs General docs changes :Security/Security Security issues without another label Team:Security Meta label for security team auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 labels Jan 23, 2025
@slobodanadamovic slobodanadamovic self-assigned this Jan 23, 2025
Copy link
Contributor

Documentation preview:

@slobodanadamovic slobodanadamovic marked this pull request as ready for review January 23, 2025 17:43
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Jan 23, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

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

@lcawl
Copy link
Contributor

lcawl commented Jan 24, 2025

Hi! This is a drive-by comment to make sure folks are aware that these API docs will not be carried forward to V9, so if the changes in this PR are applicable to that version, please ensure they occur in the following location:
https://github.com/elastic/elasticsearch-specification/tree/main/specification/security/query_role

That's how we'll be generating API documentation going forward (e.g. https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-role).

NOTE that since the rest of the documentation will also be undergoing a big migration, just a reminder not to hard-code any links when you're adding content to the specifications. For example, if you want to link to https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html I'd recommend using @ext_doc_id so it doesn't break (per https://github.com/elastic/elasticsearch-specification/blob/main/docs/modeling-guide.md#ext_doc_id).

If you want more info, please reach out on #docs!

@slobodanadamovic
Copy link
Contributor Author

@lcawl Thanks for the heads up! I'll open a PR in https://github.com/elastic/elasticsearch-specification since this documentation change is also relevant for v9.

@leemthompo
Copy link
Contributor

@slobodanadamovic can you get this approved and merged by tomorrow? Otherwise, you'll need to wait until February 20 to work on this after the docs freeze.

@slobodanadamovic
Copy link
Contributor Author

slobodanadamovic commented Jan 28, 2025

@slobodanadamovic can you get this approved and merged by tomorrow? Otherwise, you'll need to wait until February 20 to work on this after the docs freeze.

Thanks for the info! Does this freeze also apply for docs update in https://github.com/elastic/elasticsearch-specification?

The query roles API does not retrieve roles that are defined in `roles.yml` files.
You can optionally filter the results with a query. Also, the results can be paginated and sorted.

NOTE: As of Elasticsearch version *8.18.0*, this API automatically returns <<built-in-roles,built-in>> roles as well.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: not sure if we want to mention an ES version here. Wouldn't current docs be >=8.18 already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I'll remove it.

@leemthompo
Copy link
Contributor

@slobodanadamovic can you get this approved and merged by tomorrow? Otherwise, you'll need to wait until February 20 to work on this after the docs freeze.
Thanks for the info! Does this freeze also apply for docs update in https://github.com/elastic/elasticsearch-specification?

I'm pretty sure it does not impact the spec, but @lcawl will keep me honest.

(I shared the email link in Slack for full comms info)

@slobodanadamovic slobodanadamovic merged commit 953f174 into elastic:main Jan 28, 2025
5 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

slobodanadamovic added a commit to slobodanadamovic/elasticsearch that referenced this pull request Jan 28, 2025
The query role API now returns built-in roles as well.
This PR notes this and adds an example on how the 
built-in roles can be filtered out.
elasticsearchmachine pushed a commit that referenced this pull request Jan 28, 2025
The query role API now returns built-in roles as well.
This PR notes this and adds an example on how the 
built-in roles can be filtered out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >docs General docs changes :Security/Security Security issues without another label Team:Docs Meta label for docs team Team:Security Meta label for security team v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants