Navigation Menu

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

When exporting data and "Show export URL" is clicked, don't reveal the full token_auth #13413

Open
mattab opened this issue Sep 11, 2018 · 6 comments
Labels
c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github.

Comments

@mattab
Copy link
Member

mattab commented Sep 11, 2018

The new feature "Show export URL" is very valuable in giving everyone quick access to the API and seeing how the URL is constructed, making it easy to share, etc.

However for security reasons we would not want to reveal the full token_auth on screen.
Similarly in the Personal settings page where the token_auth is displayed to the user, it requires an extra click to reveal the full token.

So the goal if this issue is to slightly change the behavior, proposal:

  • When "Show export URL" is clicked, show the textarea but in the string, only show the first few characters and write ....
  • When user clicks the field to copy/paste it, then reveal the full token_auth and full URL

follows up #11958 #12987

@mattab mattab added the c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github. label Sep 11, 2018
@mattab mattab added this to the 3.6.1 milestone Sep 11, 2018
@tsteur
Copy link
Member

tsteur commented Sep 12, 2018

Is this really needed considering you already have to click to see it?

@mattab
Copy link
Member Author

mattab commented Dec 24, 2018

Just tested and noticed that currently you need to click, and then double click to select the string. Ideally on the first click to reveal the full URL then the full URL would be selected and then user can copy. it would be more usable.

But an even more secure / usable solution could be maybe:

  • The full token_auth is never displayed on screen, and instead it shows the full URL and replaces token_auth=full_token_here by token_auth=start_tok***********
  • on click on the textarea, the value is copied into the clipboard
  • and a feedback "Copied to your clipboard!" is displayed

Not showing the token_auth on screen would be a security improvement as the token can be easily seen/recorded by someone viewing the screen.

@tsteur
Copy link
Member

tsteur commented Dec 24, 2018

I won't be working on this, so unassigning myself. I don't agree with any of the flows. Even the original in the issue.

@tsteur tsteur removed their assignment Dec 24, 2018
@mattab mattab changed the title When exporting data and "Show export URL" is clicked, don't reveal the full token_auth until field is clicked When exporting data and "Show export URL" is clicked, don't reveal the full token_auth Dec 24, 2018
@mattab
Copy link
Member Author

mattab commented Dec 24, 2018

is there maybe a better way not to show the token_auth on screen? anyway it's not urgent for now so removing from milestone

@mattab mattab removed this from the 3.8.0 milestone Dec 24, 2018
@tsteur
Copy link
Member

tsteur commented Dec 24, 2018

Either you have only a "copy url" link, or you simply show it directly on "show export url" and accept the fact how Matomo works currently and eventually it'll be refactored to have proper authentication in place.

@tsteur
Copy link
Member

tsteur commented Dec 24, 2018

Also when you paste a URL in the address bar, it will show the end of the URL which is usally the token. Next, a more likely risk than screen recording is that users send the exported URL to other people. Ideally you neither show them the URL nor let them copy the URL. Then when we POST to export the URL, the token won't be in the URL at all and will neither appear in access logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants