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

Send an email / text when there's a login from another country #9152

Open
tsteur opened this issue Nov 2, 2015 · 10 comments
Open

Send an email / text when there's a login from another country #9152

tsteur opened this issue Nov 2, 2015 · 10 comments
Labels
c: New plugin For features that probably will not be added to Matomo, but could be implemented as plugins. c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github.

Comments

@tsteur
Copy link
Member

tsteur commented Nov 2, 2015

See #9140

We should send an email when there's a login from another country (if GeoIP is enabled). It should be optional, possibly enabled by default (users that live near a border might want to disable it).

Email could contain IP and location, maybe even user agent / device information

@tsteur tsteur added c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github. c: New plugin For features that probably will not be added to Matomo, but could be implemented as plugins. labels Nov 2, 2015
@hpvd
Copy link

hpvd commented Nov 3, 2015

great!
we should think on the definition of "another country":

  • do we be track and store always login place for each user and compare on next login?
  • do a user have to set a home country manually?
  • do we make a global "white list" within an installation for countries being valid for all piwik users?

@hpvd
Copy link

hpvd commented Nov 3, 2015

one could also use this to give other login behaviours depending on country matching
e.g. in foreign countries having a lager delay after false passwort etc.

@tsteur
Copy link
Member Author

tsteur commented Nov 3, 2015

I reckon it would be good to look at some other platforms and how they solve it (eg wordpress plugins etc.). Possibly we need some settings to make it maybe configurable. Without thinking too much I'd probably only store the last country. Let's maybe better send an email too often than too less. In worst case a user gets an email too much. Would also have the benefit to signal the user that the feature works :) Don't think it justifies to store a complete history / whitelist of countries for a specific user for now

@tsteur
Copy link
Member Author

tsteur commented Nov 5, 2015

Also we could send an email when there's a login from another device / browser. We could generate a configId based on some browser data or set a cookie to identify a device and if one ever logs in from another device we send an email once. This might be rather related to 2 factory authentication (#2846) though

@tsteur
Copy link
Member Author

tsteur commented Nov 5, 2015

If text messages are configured in a Piwik (eg for scheduled reports) one should ideally also be able to receive it as a text message on your phone to be able to react quickly in case it wasn't you who logged in...

@tsteur tsteur changed the title Send an email when there's a login from another country Send an email / text when there's a login from another country Nov 5, 2015
@hpvd
Copy link

hpvd commented Nov 5, 2015

"Also we could send an email when there's a login from another device / browser."
and
"one should ideally also be able to receive it as a text message on your phone"
sounds perfect!

@hpvd
Copy link

hpvd commented Nov 6, 2015

An idea what data to be included in email:

1) Reason for this mail:
There was a login from another country than last time

2) Full description of the account one is talking about:
Username
Alias
Email

3) Details of finding:
Country of Login last time
Country of Login this time

4) What to do now?
If you are the one who logs-in in a different country you can delete this mail.
If you aren't the one: Please contact your admin as fast as possible.

Maybe on should ad the email-adress of an admin for direct contact?
without a user may have no information who it is

@hpvd
Copy link

hpvd commented Nov 6, 2015

Maybe email should not only be send to user but also to admin?

@tsteur
Copy link
Member Author

tsteur commented Nov 8, 2015

I wouldn't go that far and send it to the admin as well. It should be enough to send it to the user.

If we have an "Activity log" page one day we could maybe allow a super user to see all activites of all users (such as when did a user login / logout, it shows time of creating/updating websites, users, ... etc) and maybe also add it to the Custom Alerts feature but this is a different topic :)

@mattab mattab added this to the Mid term milestone Nov 26, 2015
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
@grzchr15
Copy link

grzchr15 commented Jan 4, 2021

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: New plugin For features that probably will not be added to Matomo, but could be implemented as plugins. c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github.
Projects
None yet
Development

No branches or pull requests

4 participants