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

Plugin Security - Initial changes for roles injection #546

Conversation

skkosuri-amzn
Copy link
Contributor

Issue #, if available:
To support below use cases:
opendistro-for-elasticsearch/alerting#6
opendistro-for-elasticsearch/alerting#215
Similar use cases are present for other plugins.

Description of changes:

  1. Added a way to inject roles using thread-context. This is for the plugin background jobs which doesn't have user context.
  2. Added new API /rolesinfo, REST and transport layer call. This call is used to get user and roles details of the logged on user. I couldn't use /authinfo call, as it doesn't have a transport layer call.
  3. To support /rolesinfo transport layer call, had to moved the request, response, action classes to commons library. (opendistro-commons). That means security plugin will have dependency on this library.
  4. Unit tests are not added to this first version. If this approach looks good, will go ahead and tests.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@skkosuri-amzn skkosuri-amzn requested a review from a team as a code owner July 6, 2020 15:59
@@ -22,4 +22,4 @@ java.version=1.8
# elasticsearch release. This version is checked when the plugin
# is loaded so Elasticsearch will refuse to start in the presence of
# plugins with the incorrect elasticsearch.version.
elasticsearch.version=7.7.1
elasticsearch.version=7.7.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version change is only for testing on 7.7.0

@@ -68,7 +68,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>

<elasticsearch.version>7.7.1</elasticsearch.version>
<elasticsearch.version>7.7.0</elasticsearch.version>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version change is only for testing on 7.7.0

@skkosuri-amzn skkosuri-amzn self-assigned this Jul 6, 2020
Copy link
Contributor

@vrozov vrozov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open PR against master branch first. Once it is approved and merged, open backport PRs if necessary.

@skkosuri-amzn
Copy link
Contributor Author

Creating PR's against master.

gaobinlong pushed a commit to gaobinlong/security that referenced this pull request Aug 30, 2023
…pensearch-project#546)

* add instruction view for tenant list when multitenancy is disabled

* wording update by UX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants