? ? Success

User tests: Successful: Unsuccessful:

avatar ITPrism
ITPrism
27 Dec 2015

Added an event that can be useful for developers who would like to protect the front-end of their websites. They will be able to use this event to do the login process more secure.

The changes...

  • Added event onUserBeforeAuthenticate. This event will be handled before onUserAuthenticate. It returns boolean. If it returns false, the system will interrupt the process of authentication.
  • Replaced _$authenticate->authorise..._ with _$this->triggerEvent('onUserAuthorisation'..._. It was a static method used as not static. It was only used in the method "login," so we can replace it with triggerEvent. You can deprecate JAuthentication::authorise in Joomla! v4.0.
  • Now, the variable _$options_ is going to be passed by reference. So, we will be able to change its values. We will be able to change the value of option 'silent' in the plugins.

If you would like, you can test the changes with this plugin User - Face Control.

avatar ITPrism ITPrism - open - 27 Dec 2015
avatar ITPrism ITPrism - change - 27 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Dec 2015
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 27 Dec 2015

Can we also have an OnUserBeforeBeforeBeforeAuthenticate for even more security

avatar Bakual
Bakual - comment - 27 Dec 2015

I wonder if that couldn't be done with a regular authentication plugin. By replacing the regular Joomla core plugin you could do whatever you want security wise. It wouldn't need an additional plugin event.

avatar ITPrism
ITPrism - comment - 28 Dec 2015

You are right @Bakula. I agree with you. It is possible to be done replacing Joomla core authentication plugins.
However, my point is...

  • If I do that, I will not be able to share that additional functionality with other people. No one will want to disable their core plugins and to use third-party authentication plugin.
  • If I use several authentication plugins (gmail, ldap,...), I will have to replace all of them.
  • I prefer to leave the core authentication plugins on you. So, if there is a patch for one of them, it will not be necessary to patch my ones. I just need to add some additional protection.
  • I prefer to keep the authentication separate from additional functionality like those that I need.

I guess, this event can be useful for many developers. They will be able to find different ways to protect the login process.
In my case, I prefer to restrict front-end authentication only for my IP address. Additional, If someone is trying to attack the login process (trying SQL Injections, Brute Force Attacks,...), the plugin will send me an email. So, I will be able to add some rules to the firewall to protect my website in time.

That should become before the authentication (onUserAuthenticate). So, the event onUserBeforeAuthenticate will give us that power and we will be able to do extensions that will make Joomla more secure. :)

avatar chrisdavenport
chrisdavenport - comment - 28 Dec 2015

Rather than adding a new event, I think a better approach might be to allow an authentication plugin to abort the login process. I think that was the intention behind the STATUS_DENIED constant, but it was never implemented.

avatar creativeprogramming
creativeprogramming - comment - 30 Dec 2015

I guess, this event can be useful for many developers. They will be able to find different ways to protect the login process.
In my case, I prefer to restrict front-end authentication only for my IP address. Additional, If someone is trying to attack the login process (trying SQL Injections, Brute Force Attacks,...), the plugin will send me an email. So, I will be able to add some rules to the firewall to protect my website in time.

That should become before the authentication (onUserAuthenticate). So, the event onUserBeforeAuthenticate will give us that power and we will be able to do extensions that will make Joomla more secure. :)

Check this extension: http://extensions.joomla.org/extension/brute-force-stop, https://github.com/codeling/bfstop it already implements anti-brute-force protection very well, using a system plugin.

avatar brianteeman brianteeman - change - 14 Mar 2016
Category Libraries
avatar brianteeman brianteeman - change - 14 Mar 2016
Labels
avatar brianteeman brianteeman - change - 27 Apr 2016
Category Libraries Language & Strings Libraries
avatar brianteeman
brianteeman - comment - 4 Jan 2018

I am closing this. It is two years old with little interest

avatar brianteeman brianteeman - close - 4 Jan 2018
avatar brianteeman brianteeman - change - 4 Jan 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-01-04 22:13:08
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment