当前位置:网站首页>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 .
边栏推荐
- Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
- SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)
- Record: MySQL changes the time zone
- [optics] vortex generation based on MATLAB [including Matlab source code 1927]
- Yolov3 network model building
- Thinking about festivals
- 知其然,而知其所以然,JS 对象创建与继承【汇总梳理】
- 达梦数据库的物理备份和还原简解
- Zero length array
- FBI warning: some people use AI to disguise themselves as others for remote interview
猜你喜欢

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

These problems should be paid attention to in the production of enterprise promotional videos

Yolov3 network model building
![[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

A green plug-in that allows you to stay focused, live and work hard

leetcode:11. 盛最多水的容器【雙指針 + 貪心 + 去除最短板】

Add control at the top of compose lazycolumn

Dart JSON编码器和解码器剖析

Smart wax therapy machine based on STM32 and smart cloud

Simulation scheduling problem of SystemVerilog (1)
随机推荐
SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)
How does if ($variable) work? [repeat] - how exactly does if ($variable) work? [duplicate]
Zhengda futures news: soaring oil prices may continue to push up global inflation
利用可视化结果,点击出现对应的句子
How to design a high concurrency system
Php based campus lost and found platform (automatic matching push)
Ego planner code parsing Bspline_ Optimizer section (3)
Differential constrained SPFA
Web3 credential network project galaxy is better than nym?
The more you talk, the more your stupidity will be exposed.
Suffix derivation based on query object fields
为什么要做特征的归一化/标准化?
[free sharing] kotalog diary2022 plan electronic manual ledger
Foundation of ActiveMQ
User identity used by startup script and login script in group policy
Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]
Flutter network and data storage framework construction-b1
cipher
ActiveMQ的基础
Record: solve the problem that MySQL is not an internal or external command environment variable