EionRobb / purple-rocketchat

Rocket.Chat Plugin for libpurple
GNU General Public License v3.0
21 stars 2 forks source link

"User has no password set" even though I have a password? #6

Closed BenWiederhake closed 4 years ago

BenWiederhake commented 4 years ago

I get the pidgin message "Bad username/password", and in the debug log (see below) it's apparently because the rocket instance thinks I don't have a password set. I happen to know that the Rocket instance to which I'm trying to connect uses LDAP for authentication, so maybe that has something to do with it? If you can verify that, and tell me what a bugreport for Rocket.Chat has to look like, I'd be happy to handle this.

``` (13:05:29) account: Connecting to account | (13:05:29) connection: Connecting. gc = 0x555652cd8da0 (13:05:29) rocketchat: Fetching url https:///api/info (13:05:29) util: requesting to fetch a URL (13:05:29) dnsquery: Performing DNS lookup for (13:05:29) dnsquery: Performing DNS lookup for (13:05:29) signals: Signal data for chat-conversation-typing not found! (13:05:29) dns: Successfully sent DNS request to child 404649 (13:05:29) dns: Successfully sent DNS request to child 404650 (13:05:29) dns: Got response for '' (13:05:29) dnsquery: IP resolved for (13:05:29) proxy: Attempting connection to 136.243.230.177 (13:05:29) proxy: Connecting to :443 with no proxy (13:05:29) proxy: Connection in progress (13:05:29) dns: Got response for '' (13:05:29) dnsquery: IP resolved for (13:05:29) proxy: Attempting connection to 136.243.230.177 (13:05:29) proxy: Connecting to :443 with no proxy (13:05:29) proxy: Connection in progress (13:05:29) proxy: Connecting to :443. (13:05:29) proxy: Connected to :443. (13:05:29) proxy: Connecting to :443. (13:05:29) proxy: Connected to :443. (13:05:29) nss: SSL version 3.4 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit TLS 1.3, Key Exchange: 255-bit TLS 1.3, Compression: NULL Cipher Suite Name: TLS_AES_256_GCM_SHA384 (13:05:29) nss: subject=CN= issuer=CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US (13:05:29) nss: partial certificate chain (13:05:29) certificate/x509/tls_cached: Starting verify for (13:05:29) certificate/x509/tls_cached: Checking for cached cert... (13:05:29) certificate/x509/tls_cached: ...Found cached cert (13:05:29) nss/x509: Loading certificate from /home/user/.purple/certificates/x509/tls_peers/ (13:05:29) certificate/x509/tls_cached: Peer cert matched cached (13:05:29) nss/x509: Exporting certificate to /home/user/.purple/certificates/x509/tls_peers/ (13:05:29) util: Writing file /home/user/.purple/certificates/x509/tls_peers/ (13:05:29) nss: Trusting CN= (13:05:29) certificate: Successfully verified certificate for (13:05:29) util: request constructed (13:05:29) nss: SSL version 3.4 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit TLS 1.3, Key Exchange: 255-bit TLS 1.3, Compression: NULL Cipher Suite Name: TLS_AES_256_GCM_SHA384 (13:05:29) nss: subject=CN= issuer=CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US (13:05:29) nss: partial certificate chain (13:05:29) certificate/x509/tls_cached: Starting verify for (13:05:29) certificate/x509/tls_cached: Checking for cached cert... (13:05:29) certificate/x509/tls_cached: ...Found cached cert (13:05:29) nss/x509: Loading certificate from /home/user/.purple/certificates/x509/tls_peers/ (13:05:29) certificate/x509/tls_cached: Peer cert matched cached (13:05:29) nss/x509: Exporting certificate to /home/user/.purple/certificates/x509/tls_peers/ (13:05:29) util: Writing file /home/user/.purple/certificates/x509/tls_peers/ (13:05:29) nss: Trusting CN= (13:05:29) certificate: Successfully verified certificate for (13:05:29) util: Response headers: 'HTTP/1.1 200 OK Date: Fri, 07 Aug 2020 11:05:29 GMT Server: Apache X-XSS-Protection: 1 X-Instance-ID: Cache-Control: no-store Pragma: no-cache content-type: application/json Vary: Accept-Encoding Via: 1.0 Connection: close ' (13:05:29) rocketchat: Got response: {"version":"3.0.1","success":true} (13:05:29) rocketchat: got frame data: o (13:05:29) rocketchat: got frame data: a["{\"server_id\":\"0\"}"] (13:05:29) rocketchat: sending frame: ["{\"msg\":\"connect\",\"version\":\"1\",\"support\":[\"1\"]}"] (13:05:29) rocketchat: got frame data: a["{\"msg\":\"connected\",\"session\":\"\"}"] (13:05:29) rocketchat: sending frame: ["{\"msg\":\"method\",\"method\":\"login\",\"params\":[{\"user\":{\"username\":\"\"},\"password\":{\"digest\":\"\",\"algorithm\":\"sha-256\"}}],\"id\":\"1\"}"] (13:05:29) rocketchat: got frame data: a["{\"msg\":\"updated\",\"methods\":[\"1\"]}"] (13:05:29) rocketchat: got frame data: a["{\"msg\":\"result\",\"id\":\"1\",\"error\":{\"isClientSafe\":true,\"error\":403,\"reason\":\"User has no password set\",\"message\":\"User has no password set [403]\",\"errorType\":\"Meteor.Error\"}}"] (13:05:29) rocketchat: Error during login: (null) (13:05:29) connection: Connection error on 0x555652cd8da0 (reason: 2 description: Bad username/password) (13:05:29) account: Disconnecting account | (0x555652a931a0) (13:05:29) connection: Disconnecting connection 0x555652cd8da0 (13:05:29) connection: Destroying connection 0x555652cd8da0 (13:05:29) util: Writing file prefs.xml to directory /home/user/.purple (13:05:29) util: Writing file /home/user/.purple/prefs.xml (13:05:34) util: Writing file accounts.xml to directory /home/user/.purple (13:05:34) util: Writing file /home/user/.purple/accounts.xml ```
bug commented 4 years ago

Create an API token on RC's side and use personal_access_token_user_id/personal_access_token for your account access rather than your username/password.

BenWiederhake commented 4 years ago

Thanks! That was it.

jarkkojs commented 2 years ago

Hi, even if I create the token, I still get a password request. In my case Github authentication is being used. Could it be configuration issue in the server side?

jarkkojs commented 2 years ago

I also found: https://github.com/mbologna/docker-bitlbee/issues/3. So what is the correct approach to set up an account?

EionRobb commented 2 years ago

@jarkkojs can you start a new issue and include a purple debug log from bitlbee? If you're getting the "User has no password set" error then it's still trying to login with email+password instead of using the token, so would be good to try work through it