Identity provider manages SSO sessions
By using cookie-based protocols to manage SSO session information on the client side, the complexity and cost problems of Web SSO session management in industrial software are solved, efficient session state preservation and recovery is achieved, hardware and maintenance costs are reduced, and the hardware and maintenance costs are improved. System scalability.
Patent Information
- Application Number
- CN202080023197.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-25
- Filing Date
- 2020-03-24
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-03-24
AI Technical Summary
In the industrial software field, client-based Web SSO session management technology faces the problems of rebuilding service lists, processing browser response orders different from those of http servers, and cookie size restrictions, resulting in increased costs and increased complexity.
By using a cookie-based protocol to manage SSO session information on the client side, multiple randomly generated temporary state cookies are combined into one state cookie, avoiding the server side of storing session state, using bitmask and compression technology to reduce the size of the cookie, and A sign of the static information is represented as a signed bill.
It realizes efficient storage and recovery of SSO session status on the client side, reduces installation, licensing and maintenance costs, improves scalability, and avoids the need for redundant infrastructure on the server side.
Smart Images

Figure CN113678123B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to methods, systems and computer program products for SSO session management for multiple services by an identity provider. Background Art
[0002] Conveniently, the embodiments may also be applied in the field of industrial software, and in particular in the field of MOM.
[0003] Recently, the term MOM (Manufacturing Operations Management) is increasingly used instead of the term MES (Manufacturing Execution System).
[0004] In the field of industrial software, identity providers are used together with web single sign-on (SSO) functionality in order to integrate logins between different web applications that may also be provided by different products.
[0005] An application, called a relayer, can request a login session from the identity provider, and if a session exists, the application can join a global session shared between different relayers. When the state of the global session changes or terminates, all relayers receive a notification.
[0006] The relaying party is typically a web application or service in the cloud that wants to join a web SSO session, and the relaying party receives authentication information from the identity provider in an assertion.
[0007] To increase availability, identity providers are often implemented in a cluster of nodes.
[0008] In the art, information for managing and restoring SSO sessions is usually stored on the server side, such as a server-side session managed by a web server or maintained in an external system (eg, SQL, distributed cache) in case of redundancy.
[0009] In such a scenario, there is a need to increase infrastructure for redundancy purposes, with the associated disadvantages of increased costs in terms of additional hardware and maintenance complexity.
[0010] Therefore, a technique for web SSO session management in which the session state is maintained at the client side is a desirable option.
[0011] Unfortunately, in the art, such client-based techniques may experience one or more of the following challenging technical issues:
[0012] - Ability to rebuild service lists when performing login requests to different nodes;
[0013] - handle browser response order which is different from the browser response order of http server;
[0014] - are limited by the cookie size which cannot exceed a certain threshold.
[0015] Therefore, improved techniques are needed. DETAILED DESCRIPTION
[0016] The above objects are achieved by a method, system and computer program product for SSO session management for multiple services by an identity provider, wherein the SSO session information is maintained on the client side via a cookie-based protocol.
[0017] The above objects are achieved by a method, system and computer program product for performing SSO session management for multiple services by an identity provider, the method, system and computer program product comprising:
[0018] a) Information about the SSO session is managed by the identity provider via a cookie-based protocol;
[0019] b) Maintaining a list of services of relay parties participating in the same SSO session information in one session cookie and multiple temporary state cookies with randomly generated names, thereby representing the list of session services using a bit mask representation within the cookie; and thereby merging the multiple temporary state cookies into one state cookie.
[0020] In an embodiment, the bitmask may advantageously be represented in a compressed format.
[0021] In an embodiment, the SSO session state may be conveniently saved and restored via cookies, and there is no need to maintain the SSO session state on the server side.
[0022] In an embodiment, session static information may preferably be represented as a signed ticket, whereby both the ticket and the signature are stored in a separate cookie.
[0023] In an embodiment, when a new relaying party joins a global SSO session, the session cookie may be conveniently updated by adding the new relaying party to the list of global session participants.
[0024] In an embodiment, information about the session state is stored on the client side of the browser.
[0025] In an embodiment, the required session information is stored via cookies.
[0026] In an embodiment, a list of relaying parties for an SSO session is maintained in one or more state cookies.
[0027] In an embodiment, the state cookie has a randomly generated name.
[0028] In an embodiment, the session services are listed using a bit mask representation.
[0029] In an implementation, multiple state cookies are merged into one merged state cookie, and temporary state cookies are deleted.
[0030] In an embodiment, the bitmask may preferably be compressed.
[0031] Furthermore, a computer program element may be provided, which comprises a computer program code for executing the steps according to the above-mentioned method, when the computer program code is loaded into a digital processor of a computing device.
[0032] Additionally, a computer program product stored on a computer usable medium may be provided, the computer program product comprising a computer readable program code for causing a computing device to perform the method mentioned.
[0033] In an embodiment, the SSO protocol implementation uses client-side storage of session state.
[0034] In an embodiment, once a new session is created, all required session state information is stored and sent back to the browser via a cookie.
[0035] In an embodiment, the required session information is stored in a node's memory-cache, and in case it is not present, the session information can be restored from the session cookie and the state cookie.
[0036] In an embodiment, the SSO protocol implementation conveniently maintains a list of services of relaying parties participating in the same authentication session in one or more cookies so that the identity provider can dispatch session notifications to each relaying party of the session.
[0037] In an embodiment, if the node receives a valid ticket, the web SSO session is reestablished.
[0038] Advantageously, there is no need to store centralized session information on the server side to verify whether a session is still valid and invalid.
[0039] When a new relayer joins a global session, the session state is updated and the new relayer is added to the list of global session participants. The list contains endpoints registered to receive notifications. Examples of session requests include, but are not limited to, authentication, update, and logout requests.
[0040] In an implementation, the service must be registered in the whitelist.
[0041] In an embodiment, services are preferably represented in the service list in the "state" cookie using one bit in a binary mask. Thus, the cookie size problem is advantageously minimized. For example, Set-Cookie:STATE=00010 with the fourth bit ON refers to the fourth service.
[0042] In an embodiment, the representation via the bitmask may be compressed by various compression techniques.
[0043] In an embodiment, base-32 encoding can be conveniently used, thereby advantageously reducing the size to one-fifth to alleviate the size problem of the http header due to the binary string representation.
[0044] In an embodiment, substrings consisting of all zeros can be conveniently replaced by their counts. Thus, the size can also be advantageously reduced.
[0045] In an embodiment, a state cookie with a randomly generated name is used to enable session state maintained with cookies. Thus, any bit loss due to the unpredictability of browser responses is advantageously avoided so that a cookie first defined by the server and subsequently set in the browser does not overwrite the previous value.
[0046] Utilizing embodiments, client-side session management is provided for a web SSO identity provider with a cookie state protocol.
[0047] In an embodiment, session static information (does not change over time) is represented as a signed ticket: both the ticket and the signature (base64 encoded) are stored in a separate cookie.
[0048] In an embodiment, information about a session is maintained using one session cookie and multiple temporary state cookies, which can then be conveniently reduced / merged into one state cookie.
[0049] With an embodiment, session state is saved via cookies and can be restored via cookies.
[0050] With an implementation embodiment, no session state is maintained on the server side.
[0051] With an embodiment, no state needs to be saved in physical memory or memory cache when requesting single sign-out functionality on multiple cluster nodes.
[0052] With an embodiment, the cookie state protocol in the Web SSO identity provider gives the possibility to keep the session state on the client side. Advantageously, there is no need to have a specific server infrastructure to manage the session.
[0053] With the implementation method, installation, licensing and maintenance costs are reduced because in case of redundancy, it is necessary to purchase specific software or use OSS equivalents.
[0054] With the implementation method, scalability is improved, since it is sufficient to add a new server in the load balancer.
[0055] Now refer to the attached Figure 1 To Attachment Figure 4 The present invention has been described in terms of preferred but not exclusive embodiments.
[0056] Figure 1 , Figure 2 and Figure 3 is a diagram of an example of an information exchange process between a browser, an identity provider node, and a relay according to an exemplary embodiment of the present invention.
[0057] Examples of relay parties may include, but are not limited to, applications SCADA, MOM systems, MES Simatic IT and / or TIA portals.
[0058] Figure 1 is a graph created by a session according to an implementation.
[0059] exist Figure 1 , a new session first session is created for the first relayer RyP_1 101, and then the second relayer RyP_2 102 joins the web SSO session. When service 1 is registered and joins the session, a first status cookie "STATUS_123456=10000" is created 103, the first bit of the mask is ON to indicate that service 1 (the endpoint of relayer RyP_1) is in the session. When service 2 (the endpoint of relayer RyP_2) joins the same session, a second status cookie "STATUS_234567=01000" (with a different random name) is created 104. Note that in this simple example, a first status cookie is created for service 1 and a second status cookie is created for service 2, and it is easy for a technician in the field to understand that other options / implementations are also possible, for example, the first status cookie can be created for service 5 (the fifth bit of the mask) for relayer 5 not shown.
[0060] Figure 2 is a diagram of an example of cookie merging according to an implementation scheme.
[0061] exist Figure 2 In the example, the first two status cookies are merged into one status cookie STATUS_456789=11000, where the first two bits of the bit mask are ON for relays 1 and 2. The previous status cookie is deleted by using the expiration attribute 231.
[0062] With an embodiment, by merging state cookies into one state cookie, the size requirement is advantageously reduced. In an embodiment, when there is an authentication request and more than one state cookie is received, it is merged into a single state cookie. In other embodiments, other scenarios may trigger cookie merging.
[0063] Figure 3 is a diagram of a parallel join request (silent login) according to an embodiment. Figure 3 In this example, two parallel silent logins are routed to two different nodes. State cookies are always added and relayer registrations are not lost.
[0064] Figure 4 is a diagram of generation of a state cookie according to an exemplary embodiment.
[0065] exist Figure 4 In the upper part 410, assuming that service 4 has been logged in, the browser requests parallel login of two services, service 5 and service 1, which are sent by the load balancer (not shown) to two nodes, node 1 and node 2. A new state cookie is created for service 5 with the fifth bit being ON and service 1 with the first bit being ON.
[0066] exist Figure 4 In the lower part 430, assuming that a logout is performed on another node 434, if there is more than one state cookie, they are aggregated 437 in the newer state cookie, and for service 1, service 4 and service 5, the first, fourth and fifth bits of the aggregated bit mask are ON.
[0067] For example: Set-Cookie:STATE_12_56_9=00010.
[0068] If simultaneous login requests are performed to different nodes, each of the following / consecutive requests sent by the browser contains all state cookies. Advantageously, each node can collect overall information on the service list.
[0069] In an embodiment, when newly collected cookies are added, older cookies will be removed.
[0070] In an embodiment, state cookies have names with a common initial prefix (e.g., STATE) and a random portion (e.g., 456789, 567890, 789012).
[0071] In an embodiment, requests arriving from different nodes are sent by the browser to the http server which responds with a cookie "set".
[0072] Table 1 below is an example implementation of a session cookie format.
[0073]
[0074] Table 1
[0075] It will be readily appreciated by those skilled in the art that various other non-disclosed but advantageous embodiments of the claimed invention are possible.
[0076] Nothing in the description in this application should be read as implying that any particular element, step, or function is essential to be included in the claims scope: the scope of patented subject matter is limited only by the allowed claims.
[0077] Reference numerals and figure text
[0078] Figure 1
[0079] 101 RyP_l acronym for Relying Party 1
[0080] 102 RyP_2 Acronym for Relying Party 2
[0081] 103 Creation of first state cookie
[0082] 110 Browser
[0083] 120 IdP_l Acronym for Identity Provider 1
[0084] 121 IdP_2 Acronym for Identity Provider 2
[0085] 130 Set-Cookie:
[0086] STATUS_123456=10000
[0087] 131 Cookies:
[0088] STATUS_123456=10000
[0089] 132 Set-Cookie:
[0090] STATUS_234567=01000
[0091] In this case, only the new session record is sent back (the browser keeps the existing
[0092] STATUS_XXX cookies)
[0093] 133 Cookies in browser:
[0094] STATUS_123456=10000
[0095] STATUS_234567=01000
[0096] 150 Authentication required
[0097] 151 Credentials
[0098] 152 Create WebSSO Session
[0099] 153 Statement
[0100] 154 Statement
[0101] 155 Authentication required
[0102] 156 Silent Login
[0103] 157 Get session from cookie
[0104] 158 Statement
[0105] 159 Statement
[0106] Figure 2
[0107] 110 Browser
[0108] 120 IdP_l Acronym for Identity Provider 1
[0109] 121 IdP_2 Acronym for Identity Provider 2
[0110] 201 RyP_3 Acronym for Relying Party 3
[0111] 202 RyP_4 Acronym for Relying Party 4
[0112] 230 STATUS_123456=10000
[0113] STATUS_234567=01000
[0114] 231 Set-Cookie:
[0115] STATUS_456789=11000
[0116] STATUS_123456 (deleted using expired attributes)
[0117] STATUS_234567 (deleted using expired attributes)
[0118] 232 Cookies in browser:
[0119] STATUS_456789=11000
[0120] 250 Authentication required
[0121] 251 Silence
[0122] 252 Get session from cookie
[0123] 253 Statement
[0124] 254 Statement
[0125] Figure 3
[0126] 110 Browser
[0127] 120 IdP_l Acronym for Identity Provider 1
[0128] 121 IdP_2 Acronym for Identity Provider 2
[0129] 301 RyP_3 Acronym for Relying Party 3
[0130] 302 RyP_4 Acronym for Relying Party 4
[0131] 330 STATUS_456789=11000
[0132] 331 STATUS_456789=11000
[0133] 332 Set-Cookie:
[0134] STATUS_789012=00001
[0135] In this case, only the new session record is sent back (the existing STATUS_XXX cookie is kept in the browser)
[0136] 333 Set-Cookie:
[0137] STATUS_567890=00010
[0138] 334 Cookies in browser:
[0139] STATUS_456789=11000
[0140] STATUS_567890=00010
[0141] STATUS_789012=00001
[0142] 350 Authentication required
[0143] 351 Authentication required
[0144] 352 Silent (Silent Service 4)
[0145] 353 Silent (Silent Service 5)
[0146] 354 Get session from cookie
[0147] 355 Get session from cookie
[0148] 356 Statement
[0149] 357 Statement
[0150] 358 Statement
[0151] 359 Statement
[0152] Figure 4
[0153] 410 Upper part
[0154] 411 Browser
[0155] Assume you have logged in to service 4
[0156] 412 STATE_12_56_9=00010
[0157] 413 Login (Service 5)
[0158] 414 Node 1
[0159] Registration Service 5
[0160] 415 STATE_12_56_9=00010
[0161] 416 STATE_2_15_33=00001
[0162] 417 Login (Service 1)
[0163] 418 Node 2
[0164] Registration Service 1
[0165] 419 STATE_12_56_9=00010
[0166] 420 STATE_47_56_24=10000
[0167] 430 Lower part
[0168] 431 Browser
[0169] Suppose you log out of another node
[0170] 432 STATE_12_56_9=00010
[0171] 433 STATE_2_15_33=00001
[0172] 434 STATE_47_56_24=10000
[0173] 435 Updates
[0174] 436 If more than one state cookie exists, aggregate them in the newer state cookie
[0175] 437 Node 3
[0176] The service list uses the last state cookie to retrieve aggregate information
[0177] 438 STATE_66_10_51=10011
[0178] 439
[0179] 440
[0180] 441
Claims
1. A method for performing single sign-on (SSO) session management for multiple services by an identity provider, the method comprising the following steps: Information about the SSO session is managed by the identity provider via a cookie-based protocol; maintaining a list of session services of relaying parties participating in the same SSO session in a session cookie and a plurality of temporary state cookies having randomly generated names, wherein the plurality of temporary state cookies maintain information about the same SSO session, and wherein each of the plurality of temporary state cookies includes a bit mask indicating at least one session service in the list of session services; and The multiple temporary state cookies are merged into one state cookie, in which a list of all session services in the same SSO session is represented using a bit mask representation.
2. The method according to claim 1, wherein: The bit mask is represented in a compressed format.
3. A method according to any one of the preceding claims, wherein: The SSO session state is saved via cookies and can be restored via cookies, and does not need to be maintained on the server side.
4. A method according to any one of the preceding claims, wherein: Session static information is represented as a signed ticket, whereby both the ticket and the signature are stored in a single cookie.
5. A method according to any one of the preceding claims, wherein: When a new relaying party joins the global SSO session, the session cookie is updated by adding the new relaying party to the list of global session participants.
6. A system for performing single sign-on (SSO) session management for multiple services by an identity provider, the system comprising the following apparatus: means for managing, by an identity provider via a cookie-based protocol, information about an SSO session; and means for maintaining a list of session services of relay parties participating in the same SSO session in a session cookie and a plurality of temporary state cookies with randomly generated names, wherein, The plurality of temporary state cookies maintain information about the same SSO session, and wherein each of the plurality of temporary state cookies comprises a bit mask indicating at least one session service in the list of session services, The multiple temporary state cookies are merged into one state cookie, in which a list of all session services in the same SSO session is represented using a bit mask representation.
7. The system according to claim 6, wherein: The bit mask is represented in a compressed format.
8. A system according to any one of claims 6 to 7, wherein: The SSO session state is saved via cookies and can be restored via cookies, and does not need to be maintained on the server side.
9. A system according to any one of claims 6 to 8, wherein: Session static information is represented as a signed ticket, whereby both the ticket and the signature are stored in a single cookie.
10. The system according to any one of claims 6 to 9, wherein: When a new relaying party joins the global SSO session, the session cookie is updated by adding the new relaying party to the list of global session participants.
11. A computer program product for performing the steps of the method according to any one of claims 1 to 5.
