Home Common Problem What does single sign-on mean?

What does single sign-on mean?

Jun 28, 2020 pm 04:38 PM
sso

Single sign-on SSO means that in multiple application systems, users only need to log in once to access all mutually trusted application systems. It is one of the solutions for enterprise business integration. Its advantages: 1. Improve User efficiency; 2. Improve developer efficiency; 3. Simplify management.

What does single sign-on mean?

#In the very early days of the company, a company might only have one Server, but gradually the number of Servers began to increase. Each Server must be registered and logged in, and when logging out, one must log out one by one. The user experience is very bad! You can imagine that going to Douban and logging into Douban FM, Douban Reading, Douban Movies, Douban Diary... it will really make people collapse. We want another login experience: a company's services only require one registration, one login when logging in, and one logout when logging out. How to do it?

One registration. It’s not difficult to register once. Think about it, is it just a matter of synchronizing user information between servers? Yes, but this description is not complete. We will explain it in detail later when we talk about user registration. In fact, the management of user information is the real difficulty of SSO. But as beginners, our difficulty lies in the technology to implement SSO! Let’s discuss the means of implementation first.

One login and one logout. Looking back at the story of ordinary shopping malls, what is the key thing to keep logged in? Recorder(session)? That kind of paper called a cookie? The ID written on the paper? It is the information recorded in the session and the ID. Cookies are not just a tool for recording IDs. The client holds the ID and the server holds the session, and both are used together to maintain the login status. The client needs to use the ID as a credential, and the server needs to use the session to verify the validity of the ID (the ID may have expired, it may be forged at all and the corresponding information cannot be found, the client corresponding to the ID has not yet performed login verification, etc. ). However, the session is unique to each server at the beginning. Douban FM has its own session, Douban Reading has its own session, and the cookie that records the ID cannot be cross-domain. Therefore, if we want to log in and log out once, we only need to find a way to let each server share the same session information so that the client can hold this ID under each domain name. Going further, as long as each server gets the same ID, there is a way to check the validity of the ID and get the user information corresponding to the ID, that is, it can check the ID;

Single sign-on implementation method

server side

Based on how the server group generates and verifies IDs, it is roughly divided into two types:

"Shared Cookie" This is For the method of sharing session mentioned above, I think it is better to call it "shared session". In essence, cookie is just a medium for storing session-id, and session-id can also be placed in the URL of each request. It is said that this method is unsafe, so I didn’t go into it in details. Can anyone recommend some relevant information? I will add it later. In fact, it is. After all, the session mechanism is one server for each session from the beginning. It is indeed a bit strange to take out the session and let all servers share it.

SSO-Token method Because the method of sharing session is not secure, we no longer use session-id as the identity identifier. We generate another identifier and name it SSO-Token (or Ticket). This identifier is unique to the entire server group, and all server groups can verify the token and obtain the information of the user behind the token. . What we are going to discuss is also this way, and the specific flow chart will be shown later.

Browser side

There is a very critical step in single sign-on. This step has nothing to do with the way of verifying the token on the server side. The earliest "shared session" method is still the current "token" " method, the identity identifier will face such a problem on the browser side: after the user successfully logs in and gets the token (or session-id), how can the browser store and share it to other domain names? The same domain name is very simple. Store the token in the cookie and set the cookie path to the top-level domain name so that all subdomains can read the token in the cookie. This is how to share cookies (this is called shared cookies, the one above should be called shared session). For example: Google, google.com is its top-level domain name, mail.google.com for email services and map.google.com for map services are both its subdomains. But what should we do when going cross-domain? Google also has a domain name, youtube.com, which provides video services.

Recommended tutorial: "PHP"



The above is the detailed content of What does single sign-on mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use PHP to implement efficient and stable SSO single sign-on How to use PHP to implement efficient and stable SSO single sign-on Oct 15, 2023 pm 02:49 PM

How to use PHP to achieve efficient and stable SSO single sign-on Introduction: With the popularity of Internet applications, users are faced with a large number of registration and login processes. In order to improve user experience and reduce user registration and login intervals, many websites and applications have begun to adopt single sign-on (Single Sign-On, referred to as SSO) technology. This article will introduce how to use PHP to implement efficient and stable SSO single sign-on and provide specific code examples. 1. SSO single sign-on principle SSO single sign-on is an identity authentication solution

OAuth in PHP: Building a multi-platform SSO solution OAuth in PHP: Building a multi-platform SSO solution Jul 28, 2023 pm 09:38 PM

OAuth in PHP: Building a Multi-Platform SSO Solution With the rapid development of the Internet, it has become the norm for people to use various applications in multiple platforms. This brings up a question: How to implement single sign-on (SSO) between different platforms? OAuth (Open Authorization) has become an excellent choice to solve this problem. OAuth is an open standard that allows users to authorize third-party applications to access their Internet resources without sharing their credentials. OAuth can be used to build a multi-

Discuss the security and vulnerability prevention of PHP SSO single sign-on Discuss the security and vulnerability prevention of PHP SSO single sign-on Oct 15, 2023 pm 02:36 PM

Security and vulnerability prevention of PHPSSO single sign-on 1. Introduction With the development of the Internet, more and more websites have implemented user authentication functions. However, users need to enter their account number and password every time they log in to different websites, which is inconvenient and easy to forget. In order to solve this problem, Single Sign-On (SSO) came into being. SSO is a solution for user identity authentication on multiple websites. Users only need to log in once to achieve seamless access to other websites. 2. PH

Let's talk about how to implement single sign-on (SSO) based on Node Let's talk about how to implement single sign-on (SSO) based on Node Dec 06, 2022 pm 07:49 PM

What is single sign-on? What is the principle? How to achieve it? The following article will take you through single sign-on and talk about how to use Node to implement single sign-on SSO. I hope it will be helpful to you!

Design practice of SSO single sign-on system based on Swoole Design practice of SSO single sign-on system based on Swoole Jun 14, 2023 pm 04:08 PM

With the rapid development of the Internet, more and more websites and applications need to implement user single sign-on (Single Sign-On, SSO) functions to provide a more convenient and secure user experience. In this context, the SSO single sign-on system based on Swoole has gradually become a hot topic in the industry. This article will introduce how to design and implement a SSO single sign-on system based on Swoole. 1. SSO single sign-on system design idea The purpose of the SSO single sign-on system is to enable users to log in to a system.

Latest best practices for Java JAAS Latest best practices for Java JAAS Feb 23, 2024 pm 10:52 PM

1. JAAS Overview JavaJAAS (JavaAuthenticationandAuthorizationService) is a framework for multi-system single sign-on (SSO) integration, role-based access control (RBAC) and authorization management. JAAS allows applications to protect access to data or resources and define access control mechanisms. 2. The latest best practices of JAAS 1. Use JAAS for authentication JAAS provides two main authentication methods: Token-based authentication: This method uses tokens (for example, username and password) to verify user identity. Certification-based authentication: This method uses certification (for example, a digital certificate) to verify the user's identity. 2

In-depth understanding of the working principle and technical mechanism of PHP SSO single sign-on In-depth understanding of the working principle and technical mechanism of PHP SSO single sign-on Oct 15, 2023 am 09:19 AM

Deeply understand the working principle and technical mechanism of PHPSSO single sign-on. With the rapid development of the Internet, the number of various websites and applications is also increasing. In order to access different websites and applications, users need to register different accounts and passwords respectively, which brings inconvenience and annoyance to users. In order to solve this problem, Single Sign-On (SSO) came into being. SSO is an authorization and authentication system that allows users to seamlessly access multiple systems after they successfully log in. This article will provide an in-depth understanding of P

Practical application cases of PHP SSO single sign-on in multi-system integration Practical application cases of PHP SSO single sign-on in multi-system integration Oct 15, 2023 am 11:45 AM

Practical application cases of PHPSSO single sign-on in multi-system integration Introduction: With the rapid development of the Internet and the growth of user needs, more and more websites and applications need to implement user single sign-on (SSO) functions. As a widely used server-side scripting language, PHP is flexible, simple and easy to integrate, making it the first choice of many developers. This article will introduce a PHP-based single sign-on solution and demonstrate its application in multi-system integration through practical cases. 1. What is single sign-on?