NEST client with BasicAuthentication and SecureString

Hello,

I am currently initializing the ElasticClient like below

    var settings = new ConnectionSettings(new Uri(mEsQuerySource.Url));
    settings.EnableHttpCompression();
    settings.BasicAuthentication("user", "plain text password");
    mClient = new ElasticClient(settings);

But I don't want to copy my password from SecureString to plain string. Is there a way that I provide directly my SecureString for BasicAuthentification?

In fact, I want to use "NetworkCredential(string userName, SecureString password)" with NEST client.

Thanks,
Niaz

Hi Niaz,

Unfortunately, no. NEST currently doesn't support SecureString. However I think it's worth considering- I've opened https://github.com/elastic/elasticsearch-net/issues/2505.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.