Skip to content

Expose owner realm_type in the returned API key information #105629

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

Merged

Conversation

albertzaharovits
Copy link
Contributor

@albertzaharovits albertzaharovits commented Feb 19, 2024

When querying or getting API key information, ES returns the key owner's username and realm (i.e. the realm name that authenticated the username that last updated the API key).
This PR adds the realm_type to the information on the key's owner.

@albertzaharovits albertzaharovits changed the title ApiKey with realm_type Show owner realm_type for returned API keys Feb 20, 2024
@albertzaharovits albertzaharovits added :Security/Security Security issues without another label >enhancement labels Feb 20, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @albertzaharovits, I've created a changelog YAML for you.

@albertzaharovits albertzaharovits marked this pull request as ready for review February 20, 2024 11:47
@elasticsearchmachine elasticsearchmachine added the Team:Security Meta label for security team label Feb 20, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@albertzaharovits albertzaharovits changed the title Show owner realm_type for returned API keys Expose owner realm_type in the returned API key information Feb 20, 2024
Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -88,6 +89,7 @@ public String value() {
private final Instant invalidation;
private final String username;
private final String realm;
private final String realmType;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: @Nullable here too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Security/Security Security issues without another label Team:Security Meta label for security team v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants