-
Notifications
You must be signed in to change notification settings - Fork 292
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
[FEATURE] Create a way to add action oriented APIs to update configuration values #2559
Comments
How is this approach better than having different documents for different configurations/properties, specially in case of properties such as tenancy which in general shouldn't have been included in security config in the first place? |
It minimizes the surface of the changes needed, de-risking the proposed feature from breaking changes that need to be kept in sync until the fields are deprecated, and it postpones a decision of reorganizing configuration fields in different files. |
@peternied one gotcha here is that the parent SecurityConfig's contract can break the tenancyConfig(assuming part of security config). Assume, there are following Admins in the order of the High to Low permissions:
The permissions for Security Config should always be more or equal to permission of TenancyAPIs |
Want to provide an update as the POC isn't coming online as I had hoped, but wanted to response to some of the comments on this issue.
@prabhat-chaturvedi I'm not sure I understand the scenario associated with this, could you provide more context? I'll write out what I think are a couple of relevant scenarios around access. Lets assuming there is an permission called
Are there other scenarios that need to be take into consideration or access controls that are missing? More detail on what was not working for those interestedI was planning on building off AbstractApiAction as it handles accepting updates to the configuration system, verifying them and then refreshing the security configuration on all nodes in the cluster. This has an existing security model that is based on role membership, and doesn't support 'action' level granularity. I built up a fresh Rest API action and then had to pull in PrivilegesEvaluator, which meant that that certificate authentication for super admin scenarios wasn't supported... definitely a little tail chasing. Coming from the other direction of implementing the config builder and then associating transport layer actions which could be permissioned directly I ran into injection related issues. I've pushed the work in progress to my fork main...peternied:security:config-access-protos |
I meant more of configuration issue but that should be handled well in the code and restrictions put in place so that Customer's don't shoot on their foot. In your above example, lets assume IT security team has the securityAdmin privileges. But Tenancy is decided only the leadership level. Which means only they should be allowed to change the tenancy and not the IT security team. In that use-case how do we control IT security team not updating tenancy. |
@prabhat-chaturvedi Yes - this is a limitation of the current security model. I've finished a draft pull request for how to model this behavior along with tests. |
[Triage] This seems like a desirable change. Thank you for filing the issue and taking the time to create a prototype. |
@peternied where do we stand on this one after #2607 merged? |
I don't know that we have a good use case for this scenario broadly, while it would make exposing many more settings easier, we haven't really discussed intermediate management of configuration values or permissioning parts of the security configuration since this was filed. I'll close and we can revisit in the future. |
Re-opening this issue. There's a use-case that this could be good for like updating the value of There could be other dynamic values that would also benefit from a generic solution. I think we can build a generic solution, but make user's configure an |
Is your feature request related to a problem?
The security config of OpenSearch covers a lot of surface area. Some of these settings are very sensitive, others operators might want to allow for more control over. There is no clean way to provide granular access to these settings.
Lets take into consideration a recent configuration setting that was added
jwt_clock_skew_tolerance_seconds
. The legwork required to expose GET / POST / DELETE (restore to default value) is large and difficult.What solution would you like?
There should be a way to declare that there should be an configuration based action handler to support exposing this setting such as the following:
After registering the ConfigActionDescription object a handler would be built up that would support integer values following a straight forward convention of retrieve, update and set to default. When attempting to access the endpoint, the permission would would be required to be prefixed with 'securityconfig:' and read from the users roles.
Example REST APIs
Retrieve
Request
Response
Update
Request
Response
Set to default
Request
Response
Do you have any additional context?
I think this would be a good way to work through problems around duplicate data and filtered access for dynamically modifying tenant config. I think using a 'action' oriented framework would help create abstraction layers from being exposed to downstream users, e.g.
GET _plugins/_security/config/tenancy/multitenancy_enabled
The text was updated successfully, but these errors were encountered: