Open mjbogusz opened 5 years ago
Update: I've checked with an XMPP server hosted on a real domain with a valid certificate and it works as intended.
How about something like this?
def register(self, accept_selfsigned = False):
....
def start(self, auto_register = True, accept_selfsigned = False):
...
I'm not sure how difficult it would be.
Additionally I'm not sure whether differentiation between self-signed and otherwise invalid certificates (outdated, rejected, invalid domain etc) is needed at all, maybe just an accept_invalid
flag would suffice while probably simplifying the required code.
The agent constructor already has a verify_security=False
flag that should work (it works for me).
A common mistake is to have the username already registered in the server with a different password. Could you check that?
The problem is with registering a new account. If the account is created beforehand, it goes through smoothly; invalid password results in a different error.
I've noticed the verify_security=False
flag, but it does not set the STARTTLS to "disabled" or "if-available", and the default value is "required". So my hypothesis is that either the underlying library whines about the cetificate due to the required STARTTLS, or it just ignores the disabled security flag during registration.
Ok, let me check that use case and I'll try to figure out how to solve it.
Description
Agents should be able to self-register on the XMPP server (as per #31), but both
register()
andstart(auto_register=True)
fails withaiosasl.AuthenticationFailure
andspade.agent.AuthenticationFailure
.Important note: I'm yet to test it with an XMPP server hosted under a proper domain name and with a valid certificate - this might be the underlying issue here. For testing purposes I've tried registering a new user using Pidgin and it went through without problems, though it did require confirming reception of server's self-signed certificate.
What I Did
My almost-minimal not working example:
run as
$ pipenv run ./testRegister.py
outputs: