SCRAM authentication

HI
I got SCRAM working with ODBC and it was storing hashed passwords
I using ejabberd 15.11 and my configure for scram is :

auth_method: odbc
auth_password_format: scram

but not working, when use register command my users register in mnesia not my sql data base. how to config scram for working using mysql?

When I enabled auth_method:

When I enabled

auth_method: odbc
auth_password_format: scram

and tried to register a new account, this error was logged:

10:51:40.394 [info] ({socket_state,gen_tcp,#Port<0.21900>,<0.530.0>})
 Failed legacy authentication for user111222@localhost/tka1vim xm from 127.0.0.1
10:51:41.641 [error] SQL query 'insert into
 users(username, password, serverkey, salt, iterationcount)
 values ('user111222', 'kBsYMj45T+kJcjtm7F219L3IYqE=',
 '3CZ6WCAMKCbfWeAw2Mp8/odv/Wc=', '2DbkjnwI5SIjIS+2nEGEBA==', '4096');'
 failed: "#42S22Unknown column 'serverkey' in 'field list'"

Looking at sql/mysql.sql, I found comments that pointed to the solution. I executed those queries in the MySQL database:

ALTER TABLE users ADD COLUMN serverkey text NOT NULL DEFAULT '';
ALTER TABLE users ADD COLUMN salt text NOT NULL DEFAULT '';
ALTER TABLE users ADD COLUMN iterationcount integer NOT NULL DEFAULT 0;

After that, new account registrations in ODBC were stored as SCRAM, not plain.

Syndicate content