-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add support for setting based file entitlements #122656
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
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a `path_setting` can now be used. The value may be an explicit setting, or a setting glob with a single `*`. relates ES-10844
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| } | ||
| } | ||
|
|
||
| final class AbsolutePathFileData implements FileData { |
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.
Note: I'll align these implementations completely once #122658 is merged.
ldematte
left a comment
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.
One optional observation but LGTM
| Path configDir, | ||
| Path[] dataDirs, | ||
| Path tempDir, | ||
| Function<String, String> settingResolver, |
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.
This is why I think and interface is better than a record here; a record with 2 Function is just and interface in disguise. OK to keep *Dir() as simple getters though.
Not blocking.
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.
I'm still in favor of the record here as there is only a single implementation. The resolvers are just necessary due to Settings not being available in the entitlements lib
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.
I agree with Moritz, I prefer a record because it is "things" we are passing in. Creating an interface would require creating an implementation, but the record provides that.
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a `path_setting` can now be used. The value may be an explicit setting, or a setting glob with a single `*`. relates ES-10844
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a `path_setting` can now be used. The value may be an explicit setting, or a setting glob with a single `*`. relates ES-10844
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a `path_setting` can now be used. The value may be an explicit setting, or a setting glob with a single `*`. relates ES-10844
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a `path_setting` can now be used. The value may be an explicit setting, or a setting glob with a single `*`. relates ES-10844
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a `path_setting` can now be used. The value may be an explicit setting, or a setting glob with a single `*`. relates ES-10844
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a `path_setting` can now be used. The value may be an explicit setting, or a setting glob with a single `*`. relates ES-10844
With Security Manager we have SecuredConfigFileSettingAccessPermission. This commit adds an entitlement equivalent. With each entry in files entitlement, a
path_settingcan now be used. The value may be an explicit setting, or a setting glob with a single*.relates ES-10844