Projects tigase _server server-core Issues #90
plz file ticket for authentication issue (#90)
Closed
tom quas opened 1 decade ago

from the chatroom:

init.properties:

tom 2:07here's on more: TigaseAuthCustom seems to have changed significantly since beta2. i can't seem to make the below config work any longer. any clue what's goin on?

--auth-db=tigase-custom

--auth-db-uri=jdbc:postgresql://localhost/db?user=x&password=y

basic-conf/auth-repo-params/get-password-query=select 'i_am_in'

basic-conf/auth-repo-params/sasl-mechs=PLAIN

2:08i do see these exceptions:

tigase.db.UserNotFoundException: User does not exist: bot_444792@domain

at tigase.db.jdbc.TigaseCustomAuth.userLoginAuth(TigaseCustomAuth.java:991) ....

discussion:

tom 2:29for some reason, #userLoginAuth is called in #plainAuth when i didn't define user-login-query at all. are the prefixes aka 'basic-conf/auth-repo-params' in init.properties still valid?

Wojtek 2:42yes, those are still valid

2:43if you don't define user-login-query then the default is used, either way userLoginAuth() will be balled

tom 2:47yeah, tha's the assumption if there wouldn't be this bug:

        userlogin_query = getParamWithDef(params, DEF_USERLOGIN_KEY, DEF_USERLOGIN_QUERY);

        if (userlogin_query  != null) {

            data_repo.initPreparedStatement(userlogin_query, userlogin_query);

            userlogin_active = true;

        }

#getParamWithDef returns the default query and so is never null, and therefore userlogin_active always true; as a consequence, get-password-query is never active. bummer!

2:48from the logs:

2012-01-26 13:16:06 TigaseCustomAuth.getParamWithDef() CONFIG: Custom query

loaded for 'get-password-query': 'select 'i_am_in''

2012-01-26 13:16:06 TigaseCustomAuth.getParamWithDef() CONFIG: Default queryy

loaded for 'user-login-query': '{ call TigUserLoginPlainPw(?, ?) }'

workaround:

add the following to init.properties to nullify user-login-query:

basic-conf/auth-repo-params/user-login-query=select ?,?

tom-

patugo gmbh – tom@patugo.com (mailto:tom@patugo.com) – http://patugo.com

managing director: thomas quas. district court munich. HRB 185090.

Artur Hefczyc commented 1 decade ago

We changed slightly how default values are set for the TigaseCustomAuth database connection. To disable default query completely (so it is null and never called) you have to set an empty query or put none as a query as in examples below. Please note, that was always intended way for it to work.

basic-conf/auth-repo-params/user-login-query=

or

basic-conf/auth-repo-params/user-login-query=none

I am sorry for confusion and apparent behavior change from version to version.

Artur Hefczyc commented 1 decade ago

Closed due inactivity, considered resolved.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
427
Version
tigase-server-5.1.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#90
Please wait...
Page is in error, reload to recover