Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication for Client.Legacy is only URL-Based #84

Closed
Wawszczak opened this issue Apr 20, 2020 · 3 comments · Fixed by #86
Closed

Authentication for Client.Legacy is only URL-Based #84

Wawszczak opened this issue Apr 20, 2020 · 3 comments · Fixed by #86
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Wawszczak
Copy link

Unfortunatelly, URL-based authentication mechanizm is not recomended by InfluxDB documentation.
Moreover, it is unsecure because URLs are visible in every log of network device.
Is there any possibility to add HTTP Basic Auth scheme to the list of possible options?

@bednar bednar added the enhancement New feature or request label Apr 20, 2020
@bednar bednar added this to the 1.8.0 milestone Apr 20, 2020
@bednar
Copy link
Contributor

bednar commented Apr 20, 2020

@Wawszczak thanks! we will take a look!

@bednar
Copy link
Contributor

bednar commented Apr 20, 2020

@rolincova, reuse an implementation from v2

internal void BeforeIntercept(IRestRequest request)

@bednar
Copy link
Contributor

bednar commented Apr 22, 2020

Hi @Wawszczak,

The issue is fixed in 1.8.0 milestone.

// client creation
var options = new FluxConnectionOptions("http://127.0.0.1:8086", "my-user", "my-password".ToCharArray(),
    FluxConnectionOptions.AuthenticationType.BasicAuthentication);

var fluxClient = FluxClientFactory.Create(options);

fluxClient.QueryAsync(...)
...

details - https://github.com/influxdata/influxdb-client-csharp/tree/master/Client.Legacy#basic-authentication

If you would like to use a preview version use our nightly build: InfluxDB.Client 1.8.0-dev.669.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants