alexmac05
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
You can use such onetime links to validate email addresses.. not a lot more.
They need to be time constrained anyway.
ASKER
I think this is also called a one-click login.
Usual practice is to use a GUID / UUID
ASKER
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!