Good morning,
i’d like to ask,
i am facing issue within security analytics plugin, following errors are appearing immediately after click on security analytics from dashboard.
im trying under root and also ldap user which has mapped all_access ,
version of opensearch is. v 2.13.0
i tried add via gui role security_analytics_full_access according documentation:
reserved: true
cluster_permissions:
- ‘cluster:admin/opensearch/securityanalytics/alerts/’
- 'cluster:admin/opensearch/securityanalytics/correlations/’
- ‘cluster:admin/opensearch/securityanalytics/detector/’
- 'cluster:admin/opensearch/securityanalytics/findings/’
- ‘cluster:admin/opensearch/securityanalytics/logtype/’
- 'cluster:admin/opensearch/securityanalytics/mapping/’
- ‘cluster:admin/opensearch/securityanalytics/rule/’
index_permissions: - index_patterns:
- '’
allowed_actions: - ‘indices:admin/mapping/put’
- ‘indices:admin/mappings/get’
( also tried via roles.yml in secret [ restart statefulset] somehow does not want to load…)
but i think is not necessary to add this role as i have mapped all_access…
some logs from opensearch-master pod
24-05-07T21:27:23.411971307+02:00 [2024-05-07T19:27:23,407][ERROR][o.o.s.u.SecurityAnalyticsException] [opensearch-cluster-master-1] Security Analytics error:
[2024-05-07T19:30:10,817][INFO ][o.o.s.t.SecureTransportAction] [opensearch-cluster-master-1] User and roles string from thread context: a3663612| offline_access, uma_authorization],[default-roles-opensearch|all_access,security_analytics_full_access|Tenant1
2024-05-07T21:30:10.825768530+02:00 [2024-05-07T19:30:10,825][ERROR][o.o.s.u.SecurityAnalyticsException] [opensearch-cluster-master-1] Security Analytics error: 2024-05-07T21:30:10.825792298+02:00 org.opensearch.transport.RemoteTransportException: [opensearch-cluster-master-2][10.42.0.185:9300][indices:admin/mapping/put]
2024-05-07T21:30:10.825795687+02:00 Caused by: java.lang.IllegalArgumentException: Mapper for [name] conflicts with existing mapper:
e.g. create detector for anomaly detection works fine same as any other plugins except analytics …
log from dashboard pod:
Security Analytics - RulesService - getRules: StatusCodeError: [security_analytics_exception] [opensearch-cluster-master-2][10.42.0.185:9300][indices:admin/mapping/put]
2024-05-09T14:41:02.504010610+02:00 at respond (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:349:15)
2024-05-09T14:41:02.504017838+02:00 at checkRespForFailure (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:306:7)
2024-05-09T14:41:02.504023064+02:00 at HttpConnector.<anonymous> (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
2024-05-09T14:41:02.504028288+02:00 at IncomingMessage.wrapper (/usr/share/opensearch-dashboards/node_modules/lodash/lodash.js:4991:19)
2024-05-09T14:41:02.504034698+02:00 at IncomingMessage.emit (node:events:529:35)
2024-05-09T14:41:02.504039996+02:00 at IncomingMessage.emit (node:domain:489:12)
2024-05-09T14:41:02.504047983+02:00 at endReadableNT (node:internal/streams/readable:1400:12)
2024-05-09T14:41:02.504053509+02:00 at processTicksAndRejections (node:internal/process/task_queues:82:21) {
2024-05-09T14:41:02.504058996+02:00 status: 400,
2024-05-09T14:41:02.504064607+02:00 displayName: 'BadRequest',
2024-05-09T14:41:02.504069508+02:00 path: '/_plugins/_security_analytics/rules/_search?pre_packaged=true',
2024-05-09T14:41:02.504074652+02:00 query: {},
body: {
2024-05-09T14:41:02.504084201+02:00 error: {
2024-05-09T14:41:02.504089134+02:00 root_cause: [Array],
2024-05-09T14:41:02.504094009+02:00 type: 'security_analytics_exception',
2024-05-09T14:41:02.504099234+02:00 reason: '[opensearch-cluster-master-2][10.42.0.185:9300][indices:admin/mapping/put]',
caused_by: [Object]
2024-05-09T14:41:02.504108796+02:00 },
2024-05-09T14:41:02.504113767+02:00 status: 400
2024-05-09T14:41:02.504118757+02:00 },
statusCode: 400,
response: '{"error":{"root_cause":[{"type":"security_analytics_exception","reason":"[opensearch-cluster-master-2][10.42.0.185:9300][indices:admin/mapping/put]"}],"type":"security_analytics_exception","reason":"[opensearch-cluster-master-2][10.42.0.185:9300][indices:admin/mapping/put]","caused_by":{"type":"exception","reason":"org.opensearch.transport.RemoteTransportException: [opensearch-cluster-master-2][10.42.0.185:9300][indices:admin/mapping/put]"}},"status":400}',
2024-05-09T14:41:02.504135115+02:00 toString: [Function (anonymous)],
2024-05-09T14:41:02.504139979+02:00 toJSON: [Function (anonymous)]
2024-05-09T14:41:02.504145120+02:00 }
{"type":"response","@timestamp":"2024-05-09T12:41:02Z","tags":[],"pid":1,"method":"post","statusCode":200,"req":{"url":"/_plugins/_security_analytics/rules/_search?prePackaged=true","method":"post","headers":{"host":"logs.com","x-request-id":"386c7472726da2210aebfb0fba60b0bf","x-real-ip":"10.0.254.13","x-forwarded-for":"10.0.254.13","x-forwarded-host":"logs.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-scheme":"https","x-scheme":"https","content-length":"86","sec-ch-ua":"\"Chromium\";v=\"124\", \"Google Chrome\";v=\"124\", \"Not-A.Brand\";v=\"99\"","dnt":"1","sec-ch-ua-mobile":"?0","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36","osd-version":"2.13.0","content-type":"application/json","osd-xsrf":"osd-fetch","sec-ch-ua-platform":"\"macOS\"","accept":"*/*","origin":"https://logs.com","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty","referer":"https://logs.com/app/opensearch_security_analytics_dashboards","accept-encoding":"gzip, deflate, br, zstd","accept-language":"sk-SK,sk;q=0.9,cs;q=0.8,en-US;q=0.7,en;q=0.6","priority":"u=1, i","securitytenant":"Tenant1"},"remoteAddress":"10.42.2.0","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36","referer":"https://logs.com/app/opensearch_security_analytics_dashboards"},"res":{"statusCode":200,"responseTime":66,"contentLength":9},"message":"POST /_plugins/_security_analytics/rules/_search?prePackaged=true 200 66ms - 9.0B"}
thank you for any hint
L