Skip to content
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

[Extensions] Create extension point to be able to register security settings into extensions.yml #2746

Closed
cwperks opened this issue May 8, 2023 · 8 comments
Assignees
Labels
bug Something isn't working triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.

Comments

@cwperks
Copy link
Member

cwperks commented May 8, 2023

The security plugin uses the ActionPlugin.getSettings() extension point to add security settings to opensearch.yml. For extensions, there are multiple instances where the security plugin will need to register security settings for an extension.

Examples include:

There needs to be an extension point that the security plugin can hook into to add settings that would be placed into extensions.yml so that the security plugin can read in the settings.

@cwperks cwperks added bug Something isn't working untriaged Require the attention of the repository maintainers and may need to be prioritized labels May 8, 2023
@peternied peternied self-assigned this May 8, 2023
@davidlago
Copy link

[Triaging] @peternied to take a look at this, related to the Extensions project.

@davidlago davidlago added triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. and removed untriaged Require the attention of the repository maintainers and may need to be prioritized labels May 8, 2023
@peternied
Copy link
Member

I'm tackling making these items available, but I won't reuse the 'Settings' interface, we will use the extensions object so there is a strong interface between core <-> security plugin

@saratvemulapalli
Copy link
Member

saratvemulapalli commented May 9, 2023

Coming from: #2749 (comment)
Thanks @cwperks for more information.

The terminology confused me, settings in OpenSearch are a way to configure at bootstrap/runtime and is driven by SettingsModule[1].
Extensions also support settings, and these settings are registered with OpenSearch SettingsModule[2]. Also as a side note, opensearch.yml is not modified after the node bootstrap its one time read only file, any changes to settings are in memory, tracked by SettingsModule.

Looks like we'd want to register few settings from Security plugin for extensions.
I would like to understand how they look like and are they per extension?
On the flip side, it absolutely makes sense for extensions.yml to have security config at bootstrap.

[1] https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/common/settings/SettingsModule.java
[2] opensearch-project/OpenSearch#3753

@peternied peternied removed their assignment May 9, 2023
@peternied
Copy link
Member

Removed myself since it looks like @cwperks might want to take point with the implementation

@cwperks
Copy link
Member Author

cwperks commented May 9, 2023

Thank you @peternied, I will look into it.

@cwperks
Copy link
Member Author

cwperks commented May 11, 2023

@peternied I created a PR in core that shows an implementation of how the IdentityPlugin can define additional settings in extensions.yml that can then be read in by the security plugin: opensearch-project/OpenSearch#7526

@cwperks
Copy link
Member Author

cwperks commented May 11, 2023

@saratvemulapalli I opened up a PR in core that demonstrates how the IdentityPlugin can extend the settings in extensions.yml to add settings needed for security: opensearch-project/OpenSearch#7526

@cwperks
Copy link
Member Author

cwperks commented Aug 8, 2023

Closing this issue as the PR in core was merged: opensearch-project/OpenSearch#7526

@cwperks cwperks closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Projects
Status: Done
Development

No branches or pull requests

4 participants