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] Unable to generate report if username contains | #345

Open
rupal-bq opened this issue Apr 19, 2024 · 3 comments
Open

[BUG] Unable to generate report if username contains | #345

rupal-bq opened this issue Apr 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rupal-bq
Copy link
Contributor

What is the bug?
Generating report with username containing | fails with

Error generating report.

Insufficient permissions. Reach out to your OpenSearch Dashboards administrator.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create a username which contains |
  2. Try downloading any report

What is the expected behavior?
Report should be downloaded

Do you have any additional context?
Username is parsed in https://github.com/opensearch-project/common-utils/blob/main/src/main/java/org/opensearch/commons/authuser/User.java#L160 where User String format must be pipe separated as : user_name|backendrole1,backendrole2|roles1,role2

@joshuali925
Copy link
Member

similar issue opensearch-project/reporting#1045

@hasanaltinkaynak
Copy link

hi, we are planning to upgrade our domains. is the issue fixed with the version 2.17? Thanks

@cwperks
Copy link
Member

cwperks commented Feb 8, 2025

hi, we are planning to upgrade our domains. is the issue fixed with the version 2.17? Thanks

I think the fix for this would need to be in the security plugin: opensearch-project/security#2756 (comment)

^ | is a special character and should not be used in usernames, but for SSO flows like OIDC where the subject cannot be controlled it should be possible to escape pipes behind the scenes.

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
None yet
Development

No branches or pull requests

4 participants