当前位置:网站首页>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 .
边栏推荐
- SQL: special update operation
- Dynamic planning -- expansion topics
- Integrated easy to pay secondary domain name distribution system
- 【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
- Day-27 database
- Record: writing MySQL commands
- Think of new ways
- 【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
- Add control at the top of compose lazycolumn
- Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
猜你喜欢

【光学】基于matlab涡旋光产生【含Matlab源码 1927期】

Why should the gradient be manually cleared before back propagation in pytorch?

Day_ 18 IO stream system

Pan for in-depth understanding of the attention mechanism in CV

Why should we do feature normalization / standardization?

We have built an intelligent retail settlement platform

Help change the socket position of PCB part

22.2.14 -- station B login with code -for circular list form - 'no attribute' - 'needs to be in path selenium screenshot deviation -crop clipping error -bytesio(), etc

【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】

我们做了一个智能零售结算平台
随机推荐
C enum contains value - C enum contains value
Le changement est un thème éternel
leetcode:556. Next larger element III [simulation + change as little as possible]
cipher
235. Ancêtre public le plus proche de l'arbre de recherche binaire [modèle LCA + même chemin de recherche]
Thinking about festivals
leetcode:11. Container with the most water [double pointer + greed + remove the shortest board]
變化是永恒的主題
application
我們做了一個智能零售結算平臺
Streaming media server (16) -- figure out the difference between live broadcast and on-demand
SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)
Go home early today
[leetcode周赛]第300场——6110. 网格图中递增路径的数目-较难
【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
Scrapy爬虫框架
利用可视化结果,点击出现对应的句子
VLAN experiment
Foundation of ActiveMQ
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]