-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Add ignore_url for setting based files entitlement #123541
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
Conversation
File entitlements which read a setting may actually contain urls. This commit adds an optional `ignore_url` property for the entitlement to skip any values which are urls.
Pinging @elastic/es-core-infra (Team:Core/Infra) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
String path = pathLookup.settingResolver().apply(setting); | ||
return path == null ? Stream.of() : Stream.of(Path.of(path)); | ||
return result.map(Path::of); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what scenario would it make sense to not use ignore_url in a file entitlement? Wouldn't calling Path.of()
explode on such a value if it weren't filtered out? Should this behavior be the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it would explode. But we don't support urls in all settings? These are very specific settings that allow a url to be present. I don't want to add leniency generally to all file settings.
File entitlements which read a setting may actually contain urls. This commit adds an optional `ignore_url` property for the entitlement to skip any values which are urls.
File entitlements which read a setting may actually contain urls. This commit adds an optional `ignore_url` property for the entitlement to skip any values which are urls.
File entitlements which read a setting may actually contain urls. This commit adds an optional `ignore_url` property for the entitlement to skip any values which are urls.
File entitlements which read a setting may actually contain urls. This commit adds an optional
ignore_url
property for the entitlement to skip any values which are urls.