当前位置:网站首页>Implementation of single sign on
Implementation of single sign on
2022-06-28 08:55:00 【Talent】
be based on cookie:
Use Cookie As a medium , Store user credentials , After the user logs in, an encrypted cookie When accessing sub applications , Take this cookie, Authorized application decryption cookie, Log in to this application after the verification is passed . however cookie Single sign on is not secure and cross domain login is not possible .
Distributed session Realization :
When a user registers, the user's information is stored as a set of key value pairs in session Back to one sessionid To the client , When the user logs in again, compare the currently logged in user id Whether or not session Medium id Do the same and then match , If the verification is successful, the information will be stored in cookie in , If the verification fails, return to the login page to log in again .
SSO( Single sign on Technology ):
You only need to log in once to access other mutually trusted reference systems in multiple application systems .
Under the same domain (session Pattern ): The user logs in for the first time , After logging in, the user information will be stored in session in , then session Store yourself in cookie in , Wait until the user logs in for the second time , Background verification session Whether there is user information in .
Cross domain (CAS Pattern ):1、 The first time a user visits the site , from CAS Client Redirect to after processing CAS server, Did you find any cookie Then redirect to CAS server Login page for , meanwhile URL Carry the address of the website in , It is convenient to perform a jump after the authentication is successful ;2、 After the user logs in successfully, a ticket is generated according to the user name and user password TGT(Ticket Granting ticket) Stored on the server , Reuse TGT Generate a one-time verification ticket ST(Service Ticket) as well as TGC(Ticket Granting Cookie) It is used to store user information and is controlled by server Send to Client End , Finally back to ST and Cookie Go to browser ;3、 The browser carries ST Visit the address you want to visit ;4、 Browser received ST Later CAS server To verify , After verification, you will be redirected to the beginning URL And display the page information , This is the end of the first login ;5、 Then log in to another account with CAS Website , Again by CAS Client Redirect to CAS Server Verification in , But at this time there is TGC You don't have to log in again , then CAS server To create a ST Then redirect to the page you need to visit ;7、 Received by the browser ST Go to CAS Server Do verification in , If the verification is successful, the page information will be displayed
notes :CAS in CAS Client Be responsible for handling the client's request for access to protected resources , Redirect to when you need to log in again CAS server;CAS server Independent deployment is required. It is mainly responsible for user authentication .
Single sign on cross domain implementation :
use first Spring-session take session Stored in redis in , Each subsystem can access session; Implement that all systems in the cross domain use one session, It's in every cookie Set the same in cookie```
边栏推荐
- Implement global double finger long press to return to the desktop
- 【云原生 | Kubernetes篇】深入了解Pod(六)
- Three body attack (three-dimensional split plus two points)
- Quelle est la largeur de bande du serveur de bavardage sonore pour des centaines de millions de personnes en même temps?
- Integer partition
- [untitled]
- Applet: traverse the value of an array in the list, which is equivalent to for= "list" list An item in comment
- containerd1.5.5的安装
- Infinite penetration test
- Privacy computing fat----- offline prediction
猜你喜欢

SQL注入之文件读写
![[cloud native | kubernetes] in depth understanding of pod (VI)](/img/ae/f16f5c090251ab603b88ddadff7eb3.png)
[cloud native | kubernetes] in depth understanding of pod (VI)

rman備份報ORA-19809 ORA-19804

webrtc优势与模块拆分

Using transform:scale causes the page mouse hover event to disappear

Application of current limiting protector in preventing electrical fire in shopping malls

DEJA_ Vu3d - 051 of cesium function set - perfect realization of terrain excavation

Matlab tips (20) matrix analysis -- principal component regression

MATLAB小技巧(20)矩阵分析--主成分回归

从知识到智慧:知识图谱还要走多远?
随机推荐
Common faults and solutions of Substation
Anniversary party
40多岁的人如何配置年金险?哪款产品比较合适?
Goldbach`s Conjecture
[big case] Xuecheng online website
【云原生 | Kubernetes篇】深入了解Pod(六)
Basic twelve style classes for duilib
Implementation of code scanning login
MySQL8.0 忘记 root 密码
与普通探头相比,差分探头有哪些优点
罗氏线圈可以测量的大电流和频率范围
电子元器件销售ERP管理系统哪个比较好?
Explain observer mode
DEJA_ Vu3d - 051 of cesium function set - perfect realization of terrain excavation
Wasmedge 0.10.0 release! New plug-in extension mechanism, socket API enhancement, llvm 14 support
[.Net6] GRP server and client development cases, as well as the access efficiency duel between the minimum API service, GRP service and traditional webapi service
抖音服务器带宽有多大,才能供上亿人同时刷?
DEJA_VU3D - Cesium功能集 之 052-模拟卫星轨道(高空)效果
Assertions used in the interface automation platform
Using transform:scale causes the page mouse hover event to disappear