当前位置:网站首页>Web Security (VII) specific process of authentication with session cookie scheme
Web Security (VII) specific process of authentication with session cookie scheme
2022-07-03 19:08:00 【jinyangjie0】
summary
every time web request , Actually by sessionId To identify the request session .
1、 When the client successfully requests the login interface and passes the authentication , The server records this time session Information , And put seesionId Back to the client , The client stores the information in cookie.
2、 When the same user sends a new request , Will be able to sessionId close , The server compares the existing session Information , User identity can be recognized .
Describe the process in more detail
1、 The user sends the user name to the server 、 password 、 The captcha is used to log in to the system .
2、 After the server is verified , The server creates a Session, And will Session Information stored .
3、 The server returns a... To the user SessionID, Write the user's Cookie.
4、 When the user remains logged in ,Cookie Will be sent with each subsequent request .
5、 The server can store in Cookie Upper SessionID And stored in memory or database Session Compare information , To authenticate the user , When the response information is returned to the user's client, the current status of the user will be attached .
Use Session Precautions for
1、 rely on Session Make sure the client is turned on Cookie.
2、 Be careful Session The expiration time of .
Multi server nodes Session-Cookie How to do it ?
When the server level expands to multiple nodes , Problems that may cause user login information to be out of sync .
Reference plan :
1、 All requests of a user are allocated to the same server for processing through the hash policy of the feature . In this case , Each server holds a portion of the user's Session Information . Server down , All that it keeps Session The information is completely lost .
2、 Every server keeps Session Information is synchronized with each other , That is to say, every server has saved the full amount of Session Information . Every time a server Session Information changes , We'll synchronize it to other servers . It's too expensive , also , More nodes , The higher the cost of synchronization .
3、 Use a single data node that all servers can access ( Such as caching ) To hold the Session Information . To ensure high availability , Try to avoid single data node .
边栏推荐
- How about the Moco model?
- Which do MySQL and Oracle learn?
- Flask generates swagger documents
- EGO Planner代碼解析bspline_optimizer部分(1)
- SQL injection for Web Security (1)
- __ Weak and__ The difference between blocks
- [academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
- Latex image rotates with title
- Le changement est un thème éternel
- The most valuable thing
猜你喜欢

Counting from the East and counting from the West will stimulate 100 billion industries. Only storage manufacturers who dare to bite the "hard bone" will have more opportunities

PyTorch中在反向传播前为什么要手动将梯度清零?

The online customer service system developed by PHP is fully open source without encryption, and supports wechat customer service docking

EGO Planner代码解析bspline_optimizer部分(3)

Foundation of ActiveMQ

Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week

EGO Planner代码解析bspline_optimizer部分(2)

Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
![[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD](/img/51/209e35e0b94a51b3b406a184459475.png)
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD

为什么要做特征的归一化/标准化?
随机推荐
EGO Planner代码解析bspline_optimizer部分(3)
Find the median of two positive arrays
The most valuable thing
硬盘监控和分析工具:Smartctl
Differential constrained SPFA
Processing of user input parameters in shell script
flask 生成swagger文档
Smart wax therapy machine based on STM32 and smart cloud
OSPF - detailed explanation of stub area and full stub area
We have built an intelligent retail settlement platform
EGO Planner代码解析bspline_optimizer部分(1)
Reading a line from ifstream into a string variable
Dart JSON编码器和解码器剖析
“google is not defined” when using Google Maps V3 in Firefox remotely
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
Change is the eternal theme
Streaming media server (16) -- figure out the difference between live broadcast and on-demand
Software development freelancer's Road
leetcode:556. Next larger element III [simulation + change as little as possible]
[new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)