opensearch-project / opensearch-project/security-analytics
[BUG] Alerting error: "Filter by user backend roles is enabled with security disabled."
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 111
- Forks
- 111
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 13
Description
A user reported the following via the forum:
I have recently upgraded the opensearch to 2.6 version and Alerting plugin is throwing exception
Below is the exception showing when I open the monitor or the alerting page
I am not able to figure out the issue and the security admin script is also working and the cluster is security enabled
Do you have any additional context?
Here's an error log:
[2023-04-05T08:21:40,974][ERROR][o.o.a.u.AlertingException] [olselkdev-manager-1] Alerting error: OpenSearchStatusException[Filter by user backend roles is enabled with security disabled.]
[2023-04-05T08:21:40,975][ERROR][o.o.a.t.TransportGetAlertsAction] [olselkdev-manager-1] Failed to get alerts
org.opensearch.alerting.util.AlertingException: Filter by user backend roles is enabled with security disabled.
at org.opensearch.alerting.util.AlertingException$Companion.wrap(AlertingException.kt:70) ~[?:?]
at org.opensearch.alerting.transport.SecureTransportAction$DefaultImpls.validateUserBackendRoles(SecureTransportAction.kt:82) ~[?:?]
at org.opensearch.alerting.transport.TransportGetMonitorAction.validateUserBackendRoles(TransportGetMonitorAction.kt:36) ~[?:?]
at org.opensearch.alerting.transport.TransportGetMonitorAction.doExecute(TransportGetMonitorAction.kt:61) ~[?:?]
at org.opensearch.alerting.transport.TransportGetMonitorAction.doExecute(TransportGetMonitorAction.kt:36) ~[?:?]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:218) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.indexmanagement.rollup.actionfilter.FieldCapsFilter.apply(FieldCapsFilter.kt:118) ~[?:?]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:216) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:264) ~[?:?]
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149) ~[?:?]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:216) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78) ~[?:?]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:216) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:188) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:107) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:465) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.alerting.transport.TransportGetAlertsAction$resolveAlertsIndexName$2$getMonitorResponse$1.invoke(TransportGetAlertsAction.kt:165) ~[opensearch-alerting-2.6.0.0.jar:2.6.0.0]
at org.opensearch.alerting.transport.TransportGetAlertsAction$resolveAlertsIndexName$2$getMonitorResponse$1.invoke(TransportGetAlertsAction.kt:164) ~[opensearch-alerting-2.6.0.0.jar:2.6.0.0]
at org.opensearch.alerting.opensearchapi.OpenSearchExtensionsKt.suspendUntil(OpenSearchExtensions.kt:153) ~[alerting-core-2.6.0.0.jar:?]
at org.opensearch.alerting.transport.TransportGetAlertsAction$resolveAlertsIndexName$2.invokeSuspend(TransportGetAlertsAction.kt:164) ~[opensearch-alerting-2.6.0.0.jar:2.6.0.0]
at org.opensearch.alerting.transport.TransportGetAlertsAction$resolveAlertsIndexName$2.invoke(TransportGetAlertsAction.kt) ~[opensearch-alerting-2.6.0.0.jar:2.6.0.0]
at org.opensearch.alerting.transport.TransportGetAlertsAction$resolveAlertsIndexName$2.invoke(TransportGetAlertsAction.kt) ~[opensearch-alerting-2.6.0.0.jar:2.6.0.0]
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91) ~[kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:146) ~[kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) ~[kotlinx-coroutines-core-1.1.1.jar:?]
at org.opensearch.alerting.transport.TransportGetAlertsAction.resolveAlertsIndexName(TransportGetAlertsAction.kt:156) ~[opensearch-alerting-2.6.0.0.jar:2.6.0.0]
at org.opensearch.alerting.transport.TransportGetAlertsAction$doExecute$1$1.invokeSuspend(TransportGetAlertsAction.kt:132) [opensearch-alerting-2.6.0.0.jar:2.6.0.0]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.6.10.jar:1.6.10-release-923(1.6.10)]
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?]
Caused by: java.lang.Exception: org.opensearch.OpenSearchStatusException: Filter by user backend roles is enabled with security disabled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack-trace entry points in SecureTransportAction.kt, especially validateUserBackendRoles, and TransportGetMonitorAction.kt. Reproduce the error when opening the monitor or alerting page with the reported security configuration; done means the page no longer raises the reported backend-roles/security-disabled exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100