security icon indicating copy to clipboard operation
security copied to clipboard

Deprecate opendistro in API requests and responses

Open shikharj05 opened this issue 11 months ago • 1 comments

Is your feature request related to a problem? https://github.com/opensearch-project/security/issues/5092 The security repo has lingering usages of the legacy terms like opendistro_security is API requests and responses, these should be replaced with opensearch_security, however legacy API contracts are not explicitly marked as deprecated. This task is to track marking opendistro API request/responses as deprecated.

What solution would you like? Mark opendistro API requests/responses as deprecated, removal in a next major version. Replace with opensearch - for e.g. opendistro_security_roles in Create User - https://opensearch.org/docs/latest/security/access-control/api/#create-user

APIs impacted-

https://opensearch.org/docs/latest/security/access-control/api/#create-user

PUT _plugins/_security/api/internalusers/<username>
{
  "password": "kirkpass",
  "opendistro_security_roles": ["maintenance_staff", "database_manager"],
  "backend_roles": ["role 1", "role 2"],
  "attributes": {
    "attribute1": "value1",
    "attribute2": "value2"
  }
}

https://opensearch.org/docs/latest/security/access-control/api/#patch-user

PATCH _plugins/_security/api/internalusers/<username>
[
  {
    "op": "replace", "path": "/backend_roles", "value": ["klingons"]
  },
  {
    "op": "replace", "path": "/opendistro_security_roles", "value": ["ship_manager"]
  },
  {
    "op": "replace", "path": "/attributes", "value": { "newattribute": "newvalue" }
  }
]

shikharj05 avatar Feb 07 '25 07:02 shikharj05

[Triage] Thank you for filing this issue Shikhar. Can we add the APIs that would be affected by the change and the names of the fields to the PR description?

cwperks avatar Feb 10 '25 16:02 cwperks