Comments (3)
With patch:
--- a/test/sasl/sasl.lua
+++ b/test/sasl/sasl.lua
@@ -67,6 +67,7 @@ env['SASL_CONF_PATH'] = fio.pathjoin(fio.cwd(), '../sasl/config/')
box.cfg{
wal_mode = 'none',
slab_alloc_arena = 0.1,
+ log_level = 7,
}
local memcached = require('memcached')
log 'test/var/001_sasl/sasl.log' says:
2021-12-16 12:03:12.686 [1072974] main/123/server/127.0.0.1:33502 mc_sasl.c:142 E> SASL <level 2> Couldn't find mech XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2021-12-16 12:03:12.686 [1072974] main/123/server/127.0.0.1:33502 mc_sasl.c:244 E> <memcached_sasl_auth>: Failed <sasl_server_start> with exit code -4
2021-12-16 12:03:12.686 [1072974] main/123/server/127.0.0.1:33502 mc_sasl.c:142 E> SASL <level 2> Password verification failed
2021-12-16 12:03:12.686 [1072974] main/123/server/127.0.0.1:33502 mc_sasl.c:244 E> <memcached_sasl_auth>: Failed <sasl_server_start> with exit code -20
2021-12-16 12:03:12.686 [1072974] main/123/server/127.0.0.1:33502 mc_sasl.c:142 E> SASL <level 2> Password verification failed
2021-12-16 12:03:12.686 [1072974] main/123/server/127.0.0.1:33502 mc_sasl.c:244 E> <memcached_sasl_auth>: Failed <sasl_server_start> with exit code -20
2021-12-16 12:03:12.689 [1072974] main/128/server/127.0.0.1:33512 mc_sasl.c:142 E> SASL <level 2> Password verification failed
2021-12-16 12:03:12.689 [1072974] main/128/server/127.0.0.1:33512 mc_sasl.c:244 E> <memcached_sasl_auth>: Failed <sasl_server_start> with exit code -20
2021-12-16 12:03:12.689 [1072974] main/129/server/127.0.0.1:33514 mc_sasl.c:142 E> SASL <level 2> Password verification failed
2021-12-16 12:03:12.689 [1072974] main/129/server/127.0.0.1:33514 mc_sasl.c:244 E> <memcached_sasl_auth>: Failed <sasl_server_start> with exit code -20
2021-12-16 12:03:12.690 [1072974] main/130/server/127.0.0.1:33516 mc_sasl.c:142 E> SASL <level 2> Password verification failed
2021-12-16 12:03:12.690 [1072974] main/130/server/127.0.0.1:33516 mc_sasl.c:244 E> <memcached_sasl_auth>: Failed <sasl_server_start> with exit code -20
2021-12-16 12:03:24.776 [1072974] main C> got signal 2 - Interrupt
from memcached.
Looks like SASL doesn't work:
$ pip2 install python-binary-memcached==0.27.0
$ cat sasl-client.py
import bmemcached
client = bmemcached.Client(('127.0.0.1:8080', ), 'testuser', 'testpasswd')
client.set('key', 'value')
client.set('key1', 'value1')
print(client.get('key'))
print(client.get('key1'))
$ cat init.lua
box.cfg{
log_level = 7,
feedback_enabled = false,
}
mc = require('memcached')
m = mc.create('instance_1', '8080', {
expire_enabled = false,
verbosity = 3,
sasl = true
})
require('console'):start()
$ export SASL_CONF_PATH=$(pwd)/test/sasl/config
$ tarantool init.lua
...
$ python2 sasl-client.py:
Traceback (most recent call last):
File "sasl-client.py", line 3, in <module>
client.set('key', 'value')
File "/home/sergeyb/.local/lib/python2.7/site-packages/bmemcached/client/replicating.py", line 172, in set
returns.append(server.set(key, value, time, compress_level=compress_level))
File "/home/sergeyb/.local/lib/python2.7/site-packages/bmemcached/protocol.py", line 606, in set
return self._set_add_replace('set', key, value, time, compress_level=compress_level)
File "/home/sergeyb/.local/lib/python2.7/site-packages/bmemcached/protocol.py", line 573, in _set_add_replace
time, str_to_bytes(key), value))
File "/home/sergeyb/.local/lib/python2.7/site-packages/bmemcached/protocol.py", line 239, in _send
self._open_connection()
File "/home/sergeyb/.local/lib/python2.7/site-packages/bmemcached/protocol.py", line 151, in _open_connection
self._send_authentication()
File "/home/sergeyb/.local/lib/python2.7/site-packages/bmemcached/protocol.py", line 314, in _send_authentication
raise MemcachedException('Code: %d Message: %s' % (status, extra_content), status)
bmemcached.exceptions.MemcachedException
Description of SASL commands is here https://github.com/couchbase/memcached/blob/master/docs/sasl.md
NOTE: SASL support has been added in c49af59.
from memcached.
Sample sasl-client.py
described in previous comment works after fixes added to branch ligurio/gh-51-fix-sasl
.
from memcached.
Related Issues (20)
- Wrong check for 'readahead' option value
- Convert port number to string automatically HOT 1
- text/noreply.test.py fails sporadically
- Hotreload is unsupported
- libmemcached doesn't build on Ubuntu 22.04.1 LTS HOT 4
- module doesn't work correctly after switching rw->ro->rw HOT 2
- text/getset.test.py has failed
- SASL authorization error
- No such option 'proto'
- CMake target 'libmemcached' is broken HOT 5
- Fix memtier benchmark
- Update tests for Python 3
- memcached uses libmemcached in personal GH account
- CMake target 'libmemcached' is not idempotent
- Use libmemcached benchmark memaslap
- Replace libmemcached GIT submodule with OS package libmemcached HOT 6
- Bump version of memtier submodule
- Bump version of small library HOT 1
- All memcached tests fail with tarantool 2.10.0-beta1-376-gd2a012455 (master branch) HOT 3
- Report statistics to tarantool/metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memcached.