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 Username+Password+Certificate #86

Closed
tr4shitter opened this issue Oct 6, 2020 · 3 comments
Closed

Authentication Username+Password+Certificate #86

tr4shitter opened this issue Oct 6, 2020 · 3 comments

Comments

@tr4shitter
Copy link

Hello,

i am using your library to connect successfully to one of our CTI providers using username+password.

Sadly, the second one is using username+password and required additionally a certificate (.crt and .key file).
Is it possible to use this authentication methods using taxii2client? I get the following error message:

taxii2client.exceptions.InvalidArgumentsError: Only one of a connection, username/password, or auth object may be provided._

I looked into your source and could verify that you check that not both methods are provided at the same time. Is there a way around that other than editing the library? Will this feature be added in the future?

Thank you very much in advance.

@emmanvg
Copy link
Contributor

emmanvg commented Oct 14, 2020

@tr4shitter, would you be able to provide more details to better understand your issue. It was not clear to me if after editing the library you were able to successfully authenticate to the TAXII Server with the username/password + key/cert combination scenario? Do you know in which order they are used, etc.?

@tr4shitter
Copy link
Author

tr4shitter commented Oct 17, 2020

@emmanvg thanks for your reply. I didn't want to edit the library so i didn't try it out. I just looked into the source code of the library to verify that it checks that not both (username/pw+client certificate) can be used at the same time. Sorry for the misunderstanding.

I think the client side certificate is used to encrypt the traffic to the server before username and password is transmitted.

@clenk
Copy link
Contributor

clenk commented Feb 9, 2021

With #89 the Server and endpoint classes now take a cert parameter that can be either a tuple of (‘cert’, ‘key’) or a filepath to a cert file. This should allow the functionality you need, but if you run into any issues please let us know.

@clenk clenk closed this as completed Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants