Allow configuring SAML private attributes#133154
Merged
slobodanadamovic merged 17 commits intoelastic:mainfrom Aug 22, 2025
Merged
Allow configuring SAML private attributes#133154slobodanadamovic merged 17 commits intoelastic:mainfrom
slobodanadamovic merged 17 commits intoelastic:mainfrom
Conversation
This PR is twofold: - it adds a new `secure_attributes` setting to the SAML realm, and - introduces extension point that allows providing a custom `SamlAuthenticateResponseHandler` The `secure_attributes` setting can be used to define which SAML attributes should be treated as secure. This implies that these attributes should not be logged, or returned as part of user's metadata when `populate_user_metadata` is set to `true`.
Collaborator
|
Hi @slobodanadamovic, I've created a changelog YAML for you. |
…ure-attrtibutes # Conflicts: # x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java
...n/core/src/main/java/org/elasticsearch/xpack/core/security/authc/saml/SamlRealmSettings.java
Outdated
Show resolved
Hide resolved
tvernum
approved these changes
Aug 20, 2025
| */ | ||
| public static final Function<String, Setting.AffixSetting<List<String>>> SECURE_ATTRIBUTES = (type) -> Setting.affixKeySetting( | ||
| RealmSettings.realmSettingPrefix(type), | ||
| "secure_attributes", |
Contributor
There was a problem hiding this comment.
Is secure the right word? It implies that other attributes are "insecure".
Maybe private or confidential?
Contributor
Author
There was a problem hiding this comment.
Thanks for the callout. I was on the fence between secure, private and secret. Went with secure as it seemed like a better fit (at least implementation wise). I'm okay with private. Technically, the main goal is to allow hiding certain attributes and treating them as private only.
...lugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlAttributes.java
Outdated
Show resolved
Hide resolved
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
…/elasticsearch into saml-secure-attrtibutes
tvernum
approved these changes
Aug 21, 2025
ankit--sethi
approved these changes
Aug 21, 2025
pabloem
pushed a commit
to pabloem/elasticsearch
that referenced
this pull request
Aug 22, 2025
This PR is twofold: - adds a new `private_attributes` setting to the SAML realm, and - introduces extension point that allows providing a custom `SamlAuthenticateResponseHandler` The `private_attributes` setting can be used to define which SAML attributes should be treated as private. This implies that these attributes will not be logged or returned as part of user's metadata when `populate_user_metadata` is set to `true`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is twofold:
private_attributessetting to the SAML realm, andSamlAuthenticateResponseHandlerThe
private_attributessetting can be used to define which SAML attributes should be treated as private. This implies that these attributes will not be logged or returned as part of user's metadata whenpopulate_user_metadatais set totrue.