Skip to content
New issue

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

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

Already on GitHub? # to your account

SASL authentication fails #17

Closed
m6w6 opened this issue Jan 20, 2020 · 2 comments
Closed

SASL authentication fails #17

m6w6 opened this issue Jan 20, 2020 · 2 comments

Comments

@m6w6
Copy link
Collaborator

m6w6 commented Jan 20, 2020

Imported from Launchpad using lp2gh.


SASL authentication doesn't work.

When connecting to a server using SASL, we have the following callstack :

  • memcached_connect
  • memcached_sasl_authenticate_connection
  • memcached_response
  • _read_one_response

in function _read_one_response, during SASL authentication, the rc value is set to MEMCACHED_AUTH_CONTINUE.

This value is not considered as a success by memcached_fatal which result in closing the connection to memcached, preventing the authentication to complete properly.

the memcached_fatal function should look like this :

static inline bool memcached_fatal(memcached_return_t rc)
{
return (
rc != MEMCACHED_BUFFERED &&
rc != MEMCACHED_CLIENT_ERROR &&
rc != MEMCACHED_DATA_EXISTS &&
rc != MEMCACHED_DELETED &&
rc != MEMCACHED_E2BIG &&
rc != MEMCACHED_END &&
rc != MEMCACHED_ITEM &&
rc != MEMCACHED_ERROR &&
rc != MEMCACHED_NOTFOUND &&
rc != MEMCACHED_NOTSTORED &&
rc != MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE &&
rc != MEMCACHED_STAT &&
rc != MEMCACHED_STORED &&
rc != MEMCACHED_SUCCESS &&
rc != MEMCACHED_VALUE &&
rc != MEMCACHED_AUTH_CONTINUE);
}

@m6w6
Copy link
Collaborator Author

m6w6 commented Jan 20, 2020


see also https://bugs.launchpad.net/libmemcached/+bug/1155004

@m6w6 m6w6 removed the New label Jan 20, 2020
@m6w6
Copy link
Collaborator Author

m6w6 commented Jan 21, 2020

Related to #14

m6w6 added a commit that referenced this issue Jan 21, 2020
MEMCACHED_AUTH_CONTINUE was considered a failure condition which led to
IO reset
@m6w6 m6w6 closed this as completed Jan 21, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant