opensearch-project / opensearch-project/security

[FEATURE] Default labeling rule for security based tenancy labeling

Open
#4,402 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement triaged
Dominant language
Java
Stars
252
Forks
395
Avg merge
1d 11h
Merged PRs (30d)
76

Description

Is your feature request related to a problem?
As part of the effort to introduce multi-tenancy as a construct in OpenSearch (https://github.com/opensearch-project/OpenSearch/issues/13341), we are introducing a labeling service to attach tenancy labels to search requests. Plugins can define their rules to compute labels based on the given request and thread context. We need to add a "default" labeling rule in security plugin to get the tenancy information if the cluster is using security plugin as their auth method as part of https://github.com/opensearch-project/OpenSearch/pull/13374

What solution would you like?
Add a default labeling rule so that we can attach user info in a request.

What alternatives have you considered?
We can also maintain all rules in the core repo, but it would be better to let plugins implement their own rules, which would get registered with the RuleBasedLabelingService in core.

Do you have any additional context?
Please see
https://github.com/opensearch-project/OpenSearch/issues/13341
https://github.com/opensearch-project/OpenSearch/pull/13374

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading OpenSearch issue 13341 and pull request 13374 to understand the labeling service contract and tenancy context. Then inspect how the security plugin can register a default labeling rule and determine how user information is obtained; done means the rule is registered and attaches the expected user tenancy information to requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.