Open rdvansloten opened 1 month ago
As I hit enter on this, I decided to try something dumb and I set it to "global"
curl 'http://localhost:56237/api/saved_objects/index-pattern' \
-X 'POST' \
-H 'Content-Type: application/json' \
-H 'osd-xsrf: osd-fetch' \
-u 'user:password' \
-H 'securitytenant: global' \
--data-binary '{"attributes":{"title":"fluentd-*","timeFieldName":"@timestamp" }}'
And it works. But this is poorly documented. Perhaps this can be fixed.
@rdvansloten,
Thank you for opening. Glad you were able to find that out. Will redirect to the security repo for follow-ups on docs.
@opensearch-project/admin could please redirect to the security repo. Seems like a documentation gap but the security team can provide more feedback if needed.
[Triage] Hi @rdvansloten, thanks for filing this issue. It looks like this is a documentation problem so could someone from @opensearch-project/triage please transfer this over? Thank you
I've been googling around for a solid hour now, including getting into dead issues on this very repo, but nobody has seemingly given a working answer on how to create an index pattern for the global tenant in Opensearch Dashboards.
What I have working so far:
Admin tenant:
Works flawlessly. However, switching admin_tenant to global_tenant or no value produces the same visual output:
What also works is copying the entire browser request as a CURL. I noticed that when going into the browser local storage, this value:
is set to
admin_tenant
when on the admin_tenant, and to""
(not empty, but two quotes) when on global. However, when passingsecuritytenant: ""
in a header, it defaults to creating it in__user__
When I dump two almost identical requests from the browser in OS Dashboards to CURL, the only difference is the cookie:
This one creates in admin:
This one in global:
Sadly this is where my investigation ends, I have no idea how to decrypt a SHA265 cookie generated by Opensearch.