Anonymous User - Multiple Authentication

@pablo

My opensearch version is: 2.6.0
I am running my opensearch, opensearch-dashboards as services.

Thank you so much it is working now!
I had to follow the link that you mentioned earlier Applying changes to configuration files - OpenSearch documentation

Now will I be able to share the dashboard with the url and login anonymously from an angular app for example? Or should I need further steps?

@MelissaL What authentication domains did you activate in config.yml? Is it just basicauth and anonymous?

@MelissaL I have basicauth and anonymous enabled and I’m able to access the OpenSearch Dashboards with an iframe.

Could you share your example?

So I login as anonymous, I go to the dashboard section → share → embed code → copy iframe code
image

I create locally an html file containing the copied iframe code.
When I open the html file, it shows me this:
<server_name> redirected you too many times.

And yes I do have basicauth and anonymous enabled

@MelissaL What browser do you use? Have you tried with Firefox?

The thing is I don’t want to run it with Firefox, I need it with Chrome.
However I tried it with FIrefox, I got: XHRGET
<server_dns>/api/v1/restapiinfo
[HTTP/1.1 401 Unauthorized 65ms]

Content Security Policy: The page’s settings blocked the loading of a resource at inline (ā€œscript-srcā€).

@MelissaL What do you see when you paste the shared link (not the full iframe) into the Firefox and Chrome browsers?

Similar behavior when I copy the short url. It seems like there’s something missing in the configuration to enable this share iframe from a different server.

@MelissaL I was just checking your opensearch_dashboards.yml file and it has basicauth and saml enabled.
Is that still the case in your current config?

I’ve checked all other options from your config and it is working for me in Firefox either with iframe or just a link.

What is your OpenSearch version?

Yes it is still the case. I do have both of them and I have the option to choose between anonymous or basicauth.

Are you able to run it on Chrome with the same config?

I am working with opensearch 2.6.0

@MelissaL I’m confused now. So, you have basicauth and anonymous in config.yml. Then in opensearch_dashboards.yml - saml and basicauth with anonymous?

It doesn’t work in Chrome. It looks like Chrome is blocking iframes by default.
Found some articles but none of the allowed me to enable iframes.

Firefox is the only browser that is not using Windows OS keystore and Internet settings by default.

Sorry for the confusion. So to clarify, in my config.yml, it is still the same I just enabled anonymous. The default configuration is still the same. And in my opensearch_dashboard.yml I have opensearch_security.auth.type: [ā€œbasicauthā€, ā€œsamlā€]

I see so it something related to Chrome specific.

@MelissaL Finally I’ve got it working with Chrome and Opera using these lines in opensearch_dashboards.yml.

opensearch_security.cookie.isSameSite: "None"
opensearch_security.cookie.secure: true

However, this would require enabling SSL in OpenSearch Dashboards.

server.ssl.enabled: true
server.ssl.certificate: <opensearch_dashboards.crt>
server.ssl.key: <opensearch_dashboards.key>

In regards to your config, it doesn’t make sense to use SAML in OpenSearch Dashboards when it is not enabled in OpenSearch (config.yml).

Amazing!
Can you provide me please with more details how to enable SAML in config.yml?
Also regarding the:
server.ssl.certificate: <opensearch_dashboards.crt>
server.ssl.key: <opensearch_dashboards.key>

Do I need to create the certificates or is it automatically added from opensearch? If I need to create the certificate, please can you provide me with the commands?

just to note openid doesn’t work on my end

@MelissaL Please find more details about SAML configuration and config examples in OpenSearch Documentation.

Regarding the certificates, you must create new client TLS certificates.
You can find some information about creating certificates in OpenSearch Documentation.