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

[BUG] Security plugin create user response not found #809

Open
zelinh opened this issue Jan 27, 2025 · 2 comments · May be fixed by #810
Open

[BUG] Security plugin create user response not found #809

zelinh opened this issue Jan 27, 2025 · 2 comments · May be fixed by #810
Assignees
Labels
bug Something isn't working

Comments

@zelinh
Copy link
Member

zelinh commented Jan 27, 2025

What is the bug?

When we first create a new user with security plugin from API

curl -XPUT "http://localhost:9200/_plugins/_security/api/internalusers/<username>" -H 'Content-Type: application/json' -d'
{
  "password": "kirkpass",
  "opendistro_security_roles": ["maintenance_staff", "database_manager"],
  "backend_roles": ["role 1", "role 2"],
  "attributes": {
    "attribute1": "value1",
    "attribute2": "value2"
  }
}
'

the response status is 201 with context message like

{
  "status":"CREATED",
  "message":"User kirk created"
}

However, the spec doesn't have such response.

responses:
'200':
$ref: '#/components/responses/security.create_user@200'

How can one reproduce the bug?

Run the command above and retrieve the response status.

What is the expected behavior?

There should be a response of 201 for PUT /_plugins/_security/api/internalusers/{username}.

@zelinh zelinh added bug Something isn't working untriaged labels Jan 27, 2025
@zelinh zelinh linked a pull request Jan 27, 2025 that will close this issue
@zelinh
Copy link
Member Author

zelinh commented Jan 27, 2025

Found this issue when I run the smoke tests from opensearch-build repo when onboarding security plugin into the test framework.

@zelinh zelinh self-assigned this Jan 27, 2025
@dblock dblock removed the untriaged label Jan 28, 2025
@dblock
Copy link
Member

dblock commented Jan 28, 2025

Want to try to contribute this @zelinh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants