-
Notifications
You must be signed in to change notification settings - Fork 70
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] Can't create reporting indices due to permission issue #998
Comments
@dblock we're have the same issue in 2.14.0 and this is definitely the bug. Could you please advise what's minimum permission required for "Generate CSV"? |
One possible causes we saw before is that it happens because the reporting plugin needs to use some indexes to store metadata, but user doesn't have permission to create index. see #309 A workaround is to use admin to go to the reporting plugin page once, it will automatically create the indexes, then have users to create report Although I'm not sure why it also happens with all_access, this might be different |
@joshuali925 which indices? System indices? If reporting needs to write to a system index, then make sure to surround the calls with:
|
@cwperks yes it's system indices, but it's already removing thread context reporting/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportInstancesIndex.kt Line 54 in fb95c0e
reporting/src/main/kotlin/org/opensearch/reportsscheduler/util/SecureIndexClient.kt Lines 43 to 56 in fb95c0e
|
Is it using the SecureIndexClient in this case? I'm not an expert in this plugin. From a quick analysis, I see that its restoring and then calling executeRequest here. Curious, why is restore called the first line after stashing? Will |
yes
The code came from opensearch-project/notifications#274, unfortunately i don't remember much besides the PR description |
w/o diving deeper into the plugin, could the issue potentially be that there is no wrapper for index creation in https://github.com/opensearch-project/reporting/blob/main/src/main/kotlin/org/opensearch/reportsscheduler/util/SecureIndexClient.kt? |
FYI I think you can make that class more generic and stash the context for any action. Something like this (this is Java code):
|
thanks it's good to know about
I think I'd need to look into how it has been working. The code didn't change for a few years and this is the only case having permission issue with all_access |
Describe the bug
Hi everyone!
I am facing problems with creating reports. Logs say that i have permissions errors, but it happens even with
all_access
role mapped, which makes no sense.We use oidc to access dashboards.
This is the role for regular users:
and it's rolemapping:
When i go to the saved searches, then to Reporting and there Generate CSV i get
Insufficient permissions
error in UI and that log on a master node:The same happens with the
all_access
role, we just map it with our backend_role for admins:The error:
Parts with
No indices:admin/create permission
andno permissions for []
completely baffle me.indices:admin/create
is present everywhere but not considered?[]
) with permissions?You can see the same behaviour when you go to Reporting directly from the left panel and click refresh.
Related component
Plugins
To Reproduce
There are two ways:
Expected behavior
Reports are generated and downloaded.
Additional Details
Plugins
Host/Environment:
The text was updated successfully, but these errors were encountered: