当前位置:网站首页>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 .
边栏推荐
- 变化是永恒的主题
- Summary of composition materials for 2020 high-frequency examination center of educational resources
- [mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]
- The way to treat feelings
- cipher
- VLAN experiment
- User identity used by startup script and login script in group policy
- Driveseg: dynamic driving scene segmentation data set
- 【光学】基于matlab介电常数计算【含Matlab源码 1926期】
- Simulation scheduling problem of SystemVerilog (1)
猜你喜欢
【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
Integrated easy to pay secondary domain name distribution system
leetcode:11. Container with the most water [double pointer + greed + remove the shortest board]
In addition to the prickles that pierce your skin, there are poems and distant places that originally haunt you in plain life
利用可视化结果,点击出现对应的句子
These problems should be paid attention to in the production of enterprise promotional videos
We have built an intelligent retail settlement platform
Using the visualization results, click to appear the corresponding sentence
Record: solve the problem that MySQL is not an internal or external command environment variable
Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext
随机推荐
Processing of user input parameters in shell script
Pan for in-depth understanding of the attention mechanism in CV
I didn't cancel
How to design a high concurrency system
my. INI file not found
Using the visualization results, click to appear the corresponding sentence
Find the median of two positive arrays
记录在模拟器中运行flutter时报的错
變化是永恒的主題
The installation path cannot be selected when installing MySQL 8.0.23
Driveseg: dynamic driving scene segmentation data set
How to read the source code [debug and observe the source code]
【光学】基于matlab涡旋光产生【含Matlab源码 1927期】
Understanding of database architecture
“google is not defined” when using Google Maps V3 in Firefox remotely
[mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]
Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
235. The nearest common ancestor of the binary search tree [LCA template + same search path]
为什么要做特征的归一化/标准化?
EGO Planner代码解析bspline_optimizer部分(1)