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

Closed
rupal-bq opened this issue Apr 19, 2024 · 4 comments
Closed

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

rupal-bq opened this issue Apr 19, 2024 · 4 comments
Labels
bug Something isn't working v3.0.0 v3.0.0

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.

@cwperks cwperks added the v3.0.0 v3.0.0 label Mar 26, 2025
@cwperks
Copy link
Member

cwperks commented Mar 26, 2025

A fix for this was merged into the security and common-utils repos. See opensearch-project/security#2756 (comment) for details.

This fix will be released in OpenSearch 3.0.0.

Closing this issue.

@cwperks cwperks closed this as completed Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3.0.0 v3.0.0
Projects
None yet
Development

No branches or pull requests

4 participants