Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to only prevent auth if ip fails whitelist #5

Open
3 of 5 tasks
brendanheywood opened this issue Jun 27, 2016 · 2 comments
Open
3 of 5 tasks

Add an option to only prevent auth if ip fails whitelist #5

brendanheywood opened this issue Jun 27, 2016 · 2 comments

Comments

@brendanheywood
Copy link

brendanheywood commented Jun 27, 2016

ie the use case if that we don't want to actually authenticate via this plugin, but via some other existing plugin like ldap or saml which don't have an internal password. So we'd configure this plugin to be earlier in the plugin priority list, and then have a new config checkbox something like 'Don't authenticate, just prevent login unless in ip whitelist'

  • add settings for 'also check IP before logging in', along with a configurable fail message
  • If this setting is true then the existing ip logic would be implemented in the pre_loginpage_hook and loginpage_hook, if they fail they get a nice configurable error message.
  • have tokens in the error message to clearly help the user see why it failed and what their own ip address is
  • MAYBE? If set the user_login() would always return false too. test how this works with the saml2 auth and see how the two pre_auth hooks clash or not
  • have a way to logout anyone currently logged in who's ip address doesn't match
@jpahullo
Copy link
Member

Thanks for the feedback!

Nice option to be added and I personally like it.

However, we are in hard work nowadays. If you need that in the short time, please, consider making a PR. Otherwise, we will evaluate this in the middle term.

Thanks a lot!

Jordi

@brendanheywood
Copy link
Author

brendanheywood commented Jun 27, 2016

Awesome! Yes we will try and get a PR together, it's a little bit down our list too. We originally tried to get this into core but it was knocked back:

https://tracker.moodle.org/browse/MDL-53563

@brendanheywood brendanheywood changed the title Add on option to only prevent auth if ip fails whitelist Add an option to only prevent auth if ip fails whitelist Jun 29, 2016
This was referenced Jul 12, 2016
dmitriim added a commit to catalyst/moodle-auth_ip that referenced this issue Jul 13, 2016
dmitriim added a commit to catalyst/moodle-auth_ip that referenced this issue Jul 14, 2016
dmitriim added a commit to catalyst/moodle-auth_ip that referenced this issue Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants