Our application currently generates “invitation” emails containing an encrypted personId in the query string of an https link. When the recipient clicks the link, the application validates the personId, returns the home page, and sets a never-expires cookie that will identify and authenticate the user for all future visits.

Can we make this process more secure without sacrificing the ease of use? We think the weak point is the use of the query string. The secure token, because its passed in the query string, will be stored in the browser history, server logs, and possibly firewall logs if they do man-in-the-middle https inspection. We could put the same details in a form with hidden inputs, but I read that forms in emails cause the panic reaction in email clients.

The resources being secured aren’t super precious. Are there obvious improvements that I’ve overlooked?

emails containing an encrypted personId in the query string of an
https link

Firstly, encryption isn’t really what you want in this scenario – you really want entropy. Your login token should be entirely independent of your personId, instead it should be a random string generated using a cryptographically secure method.

Of course you will need to store the random token in your database, and you may choose to hash+salt that value, but the value emailed to them should not be the hashed value.

Can we make this process more secure without sacrificing the ease of
use? We think the weak point is the use of the query string.

I don’t think the issue is so much that your token is in the query string, but rather that your tokens aren’t single use.

Single use tokens would resolve browser history and server logs because once it’s been accessed the links in the logs/history wouldn’t work any more.

With regard to:

if they do man-in-the-middle https inspection

If they have installed a malicious CA on the machine then they can inspect any of the traffic, so regardless of where you put the value (in the Request URL header or in the request body) they could access it.

Overall I’d consider this to be a pretty low threat, it’s not easy to install a malicious CA and if someone malicious has managed to do so then you probably can’t trust anything whatsoever on that machine.

You could of course also make them manually type the code rather than using a link – which would mitigate some of these threats. At the least you might be able to have some separate and easier to type code (eg. a 4 digit value) and an appropriate failed attempt lockout in addition to the link containing the main token.

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật