Link to home
Start Free TrialLog in
Avatar of alexmac05
alexmac05Flag for United States of America

asked on

What is a best practice for obfuscating unique tokens in logs?

What is a best practice for obfuscating unique tokens in logs?

Unique tokens are emailed to users and that token is what is used to trigger the workflow process. That token is stored encrypted in the database, but when the user clicks the link, the token is shown in clear text in the app logs. How can this best be handled?
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alexmac05

ASKER

What hash function do you recommend for this?

So, perhaps the answer is to have a token that is a hash that is unguessable or close.

All I am trying to achieve is an understanding of best practices about this particular workflow where you have to send a token to a customer in an email that they click that brings them back to the web application for some function and how to do this in a best practice way knowing that the token will be exposed in logs, emails, and on the front-end.

Thank you for your answer and your help!
Avatar of noci
noci

Unless correctly encrypted,  any email is a public medium ... (sealed letter vs. picture postcard).
You can use such onetime links to validate email addresses.. not a lot more.
They need to be time constrained anyway.
I think this is also called a one-click login.
Usual practice is to use a GUID / UUID