Project

General

Profile

Bug #5076

last_login and last_logout are not updated with SASL SCRAM*.

Added by Wojciech Kapcia TigaseTeam almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
2017-03-15
Due date:
2017-03-24
% Done:

100%

Estimated time:
Database:
Derby, MongoDB, MySQL, PostgreSQL, SQL Server
Applicable version:
git/stable
Source Code Disclaimer:

Description

%kobit you mentioned in #4878#note-1 that those are/may be needed using external tools so should this be fixed?

Associated revisions

Revision d005b9f7 (diff)
Added by Bartosz Małkowski TigaseTeam almost 2 years ago

#5076: last_login and last_logout are not updated with SASL SCRAM*.

Revision acaded23 (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 2 years ago

#5076: added implementation of new method in AuthRepository interface

Revision f0c72d52 (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 2 years ago

#5076: fixed issue in MySQL schema upgrade file

History

#1 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam almost 2 years ago

  • Assignee changed from Artur Hefczyc to Wojciech Kapcia

Yes, this should be fixed.

I wonder why this problem exists at all. There is/was an API in Tigase and these columns are updated automatically without any special code in the plugin. So it should work for all authentication methods. Does it not use/follow our APIs the way other plugins do?

#2 Updated by Wojciech Kapcia TigaseTeam almost 2 years ago

  • Assignee changed from Wojciech Kapcia to Bartosz Małkowski

I'll let Bartek explain it.

#4 Avatar?id=6098&size=24x24 Updated by Bartosz Małkowski TigaseTeam almost 2 years ago

SASL tries to not to use database stored procedure at all (well, Plain mechanism uses). Especially SCRAM mechanism reads password from database and processing it.

#5 Updated by Wojciech Kapcia TigaseTeam almost 2 years ago

  • Assignee changed from Bartosz Małkowski to Artur Hefczyc

#6 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam almost 2 years ago

  • Assignee changed from Artur Hefczyc to Bartosz Małkowski

I understand, in the past not all authentication methods used stored procedures either, at least not for authentication. But they all recorded user login/logout time. I guess we lost this functionality at some point. Is the user login/logout time recorded for any other methods/mechanisms? What about SASL external?

It seems to me that it is relatively simple thing to implement and maintain but very useful so we should make sure we have it back for all authentication methods and mechanisms.

Therefore it should be implemented through some common API, in such a way that it is called automatically, even if somebody implements a new mechanism in the future. Also, make sure it is configurable, and can be switched off.

#7 Avatar?id=6098&size=24x24 Updated by Bartosz Małkowski TigaseTeam almost 2 years ago

  • Status changed from New to In QA
  • Assignee changed from Bartosz Małkowski to Artur Hefczyc

I'm changing current API (*Repo) to add methods to store login time in databases. It will be called by SaslAuth, so it will works the same way for all SASL mechanisms.

#8 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam almost 2 years ago

  • Status changed from In QA to Feedback
  • Assignee changed from Artur Hefczyc to Bartosz Małkowski

Ok. When it's done, please close the ticket.

#9 Avatar?id=6098&size=24x24 Updated by Bartosz Małkowski TigaseTeam almost 2 years ago

  • Assignee changed from Bartosz Małkowski to Andrzej Wójcik

Would you like to update Tigae-MongoDB project?

#10 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 2 years ago

  • Status changed from Feedback to In QA
  • Assignee changed from Andrzej Wójcik to Wojciech Kapcia

I've fixed compilation issue of Tigase MongoDB by adding implementation of a new method and forwarding call to internal instance of @AuthRepositoryImpl@.

#11 Updated by Wojciech Kapcia TigaseTeam almost 2 years ago

self-notes: new schema files added (*-7-2-sp.sql):

  • code responsible for checking version should be updated;

  • db-properties should be updated (creating *-7-2.sql and properties files);

  • including upgrade script/handling.

Not sure if #1092 will be included in 7.2.0 (as we should make it ready for release for spring-ish time frame)

#14 Updated by Wojciech Kapcia TigaseTeam almost 2 years ago

  • Status changed from In QA to Resolved
  • % Done changed from 0 to 100

Works as expected.

#15 Updated by Wojciech Kapcia TigaseTeam almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF