大网数据广告活动
服务器运维问答

Session Resumption caching in Nginx

· 52CE 我爱测

Some days ago i read a blogpost about session resumption in nginx. In that text the author claims that nginx does not provide the ability to regularly clear the session cache. After "ssl_session_timeout" has expired, the session …

问题原文

原帖链接 · robusto · CC BY-SA 4.0

Some days ago i read a blogpost about session resumption in nginx.

In that text the author claims that nginx does not provide the ability to regularly clear the session cache. After "ssl_session_timeout" has expired, the session is no longer used, but the file is still on the hard disk and could be read by an attacker therefore "Forward Secrecy" would be useless at this point.

Instead of using Session ID's, he suggests deactivating the Session Cache and using session tickets. To do this, a "ticket_key" with 80 bytes of randomness must be created at least once a day.

I searched the internet for more information but couldn't find anything helpful.

Q1: What is the location of the nginx session cache and how could I check if TLS connection data(sessions) are on the hard disk?

Q2: Is it advisable to use Session Tickets?

已采纳解答

原帖链接 · Barry Pollard · CC BY-SA 4.0

I can’t answer the first question but can talk a little about the second.

This blog post gives some good info on flaws with session tickets on TLSv1.2: https://blog.filippo.io/we-need-to-talk-about-session-tickets/.

So like Michael says they both have their problems and only if you use TLSv1.3 (literally just signed off and so just becoming available in implementations at the time of writing) can you use TLS resumption completely safely.

However saying that the performance cost of not using TLS session resumption is significant, and IMHO the risks are relatively low (if someone has access to your server then it’s game over as far as I’m concerned). So for now I recommend using both session ids and session tickets. Especially as some clients (Safari and IE on Windows 7 and earlier) don’t support session tickets. Safari in particularly still has a lot of users on mobile and tablet - do you really want to significantly slow down all iOS users?

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。