WO2022027904A1 - Server login method, system and device - Google Patents

Server login method, system and device Download PDF

Info

Publication number
WO2022027904A1
WO2022027904A1 PCT/CN2020/138588 CN2020138588W WO2022027904A1 WO 2022027904 A1 WO2022027904 A1 WO 2022027904A1 CN 2020138588 W CN2020138588 W CN 2020138588W WO 2022027904 A1 WO2022027904 A1 WO 2022027904A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
server
login
target server
target
Prior art date
Application number
PCT/CN2020/138588
Other languages
French (fr)
Chinese (zh)
Inventor
吴宏亮
李涛
Original Assignee
郑州阿帕斯数云信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 郑州阿帕斯数云信息科技有限公司 filed Critical 郑州阿帕斯数云信息科技有限公司
Publication of WO2022027904A1 publication Critical patent/WO2022027904A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords

Definitions

  • the present application relates to the technical field of information security, and in particular, to a server login method, system and device.
  • the user in the process of user login to the server, the user generally interacts with the server, according to the user's uid (user identify, user identity certificate), gid (group identify, group identity certificate), home User-related data such as directory path, login public key, and server login authority to verify whether the user can log in to the server.
  • uid user identify, user identity certificate
  • gid group identify, group identity certificate
  • home User-related data such as directory path, login public key, and server login authority to verify whether the user can log in to the server.
  • uid user identify, user identity certificate
  • gid group identify, group identity certificate
  • home User-related data such as directory path, login public key, and server login authority to verify whether the user can log in to the server.
  • the server verifies whether the user has the right to log in to the server according to the relevant data of the user, which not only leads to redundant information, but also makes the data storage pressure of the server great, and it is inconvenient for the user to log in to the server. to manage.
  • Embodiments of the present application provide a server login method, system, and device, which are used to solve the problems in the prior art that storing and managing user's login authority information on a server leads to high data storage pressure in the server and poor management and control effect of login authority information. .
  • one or more embodiments of this specification provide a server login method, applied to an authentication center, including: receiving a login request sent by a target server and directed to the target server by a first user; the login request includes the User identification information of the first user, server identification information of the target server, and first login password for logging in to the target server; according to the user identification information of the first user, determine the user category of the first user ; The user category includes at least one of user identity, user level, and belonging user group; based on the user category of the first user, determine the target login authority information corresponding to the second user belonging to the user category, and according to The target login authority information is used to authenticate the first authority of the first user to log in to the target server; if the authentication of the first authority is passed, the second authority corresponding to the target server is returned to the target server. login password, so that the target server determines whether to allow the first user to log in to the target server according to the first login password and the second login password.
  • an embodiment of the present application provides a server login method, which is applied to a target server and includes: receiving a login request from a first user to the target server; the login request includes user identification information of the first user, The server identification information of the target server and the first login password for logging in to the target server; forwarding the login request to the authentication center; the authentication center is used to determine the user identification information of the first user The user category of the first user, and based on the user category of the first user, the first authority of the first user to log in to the target server is authenticated; the second login password, and determine whether the first login password and the second login password match; the second login password is sent to the target by the authentication center after passing the authentication of the first authority server; determining whether to allow the first user to log in to the target server according to the judgment result.
  • an embodiment of the present application provides a server login system, including a target server and an authentication center; the target server is configured to receive a login request from a first user to the target server; forward the login request to all the authentication center; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; the authentication center is used to receive all the login request sent by the target server; determine the user category of the first user according to the user identification information of the first user; determine the second user belonging to the user category based on the user category of the first user
  • the target login authority information corresponding to the user, and according to the target login authority information, the first authority of the first user to log in to the target server is authenticated; Return the second login password corresponding to the target server; the target server is further configured to receive the second login password corresponding to the target server sent by the authentication center, and determine the first login password and the whether the second login password matches; according to the judgment result, determine whether to allow the first user to log in
  • an embodiment of the present application provides a server login device, including: a first receiving module, configured to receive a login request sent by a target server and sent by a first user to the target server; the login request includes the first receiving module.
  • a first determining module configured to determine the first user according to the user identification information of the first user
  • the user category of the first user includes at least one of a user identity, a user level, and a user group to which he belongs;
  • a first execution module configured to determine the user category belonging to the user category based on the user category of the first user the target login authority information corresponding to the second user, and authenticate the first authority of the first user to log in to the target server according to the target login authority information;
  • a return module is used to authenticate if the first authority If passed, return the second login password corresponding to the target server to the target server, so that the target server determines whether
  • an embodiment of the present application provides a server login device, including: a third receiving module configured to receive a login request from a first user to a target server; the login request includes user identification information of the first user, The server identification information of the target server and the first login password used to log in to the target server; the forwarding module is used to forward the login request to the authentication center; the authentication center is used to User identification information, determine the user category of the first user, and authenticate the first permission of the first user to log in to the target server based on the user category of the first user; the fourth execution module is used to receive The authentication center sends the second login password corresponding to the target server, and judges whether the first login password matches the second login password; the second login password is checked by the authentication center for all users. After the first authority authentication is passed, it is sent to the target server; the fourth determination module is configured to determine whether to allow the first user to log in to the target server according to the judgment result.
  • an embodiment of the present application provides a server login device, comprising: a processor; and a memory arranged to store computer-executable instructions, the executable instructions, when executed, cause the processor to: receive a target server The sent login request of the first user to the target server; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login for logging in to the target server.
  • the user category determines the user category of the first user according to the user identification information of the first user; the user category includes at least one of user identity, user level, and user group to which he belongs; User category, determine the target login authority information corresponding to the second user belonging to the user category, and authenticate the first authority of the first user to log in to the target server according to the target login authority information; if the If the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server can determine whether to allow the The first user logs in to the target server.
  • an embodiment of the present application provides a server login device, comprising: a processor; and a memory arranged to store computer-executable instructions, the executable instructions, when executed, cause the processor to: receive a first A user's login request for the target server; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; Forwarded to the authentication center; the authentication center is configured to determine the user category of the first user according to the user identification information of the first user, and based on the user category of the first user, log in to the first user.
  • the authenticate the first authority of the target server receives the second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match; the The second login password is sent to the target server by the authentication center after passing the authentication of the first authority; and whether the first user is allowed to log in to the target server is determined according to the judgment result.
  • an embodiment of the present application provides a storage medium for storing computer-executable instructions, and when the executable instructions are executed, the following process is implemented: receiving a message sent by a target server and sent by a first user for the target server A login request; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; according to the user identification information of the first user , determine the user category of the first user; the user category includes at least one item of user identity, user level, and user group to which he belongs; based on the user category of the first user, determine the second user category belonging to the user category
  • the target login authority information corresponding to the user, and according to the target login authority information, the first authority of the first user to log in to the target server is authenticated; The second login password corresponding to the target server is returned, so that the target server determines whether to allow the first user to log in to the target server according to the first login password and the second login password.
  • an embodiment of the present application provides a storage medium for storing computer-executable instructions, and when the executable instructions are executed, the following processes are implemented: receiving a login request from a first user to a target server; the login request Including the user identification information of the first user, the server identification information of the target server and the first login password for logging in to the target server; forwarding the login request to the authentication center; the authentication center is used for The user identification information of the first user, determine the user category of the first user, and authenticate the first permission of the first user to log in to the target server based on the user category of the first user; The second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match; After the first authority authentication is passed, it is sent to the target server; according to the judgment result, it is determined whether to allow the first user to log in to the target server.
  • the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and based on the user category of the first user, the first user logs in to the target server.
  • the first authority of the server is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server can judge whether to allow the first user according to the first login password and the second login password. Log in to the target server.
  • the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center, without storing user-related data in each server.
  • it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. data, thereby avoiding information redundancy and saving server storage resources.
  • the technical solution improves the convenience of management and control of the server login authority, and the management and control effect is better.
  • the technical solution only needs to change the user category to which the user belongs in the user-related data, or only needs to change the permission information corresponding to the user category to which the user belongs.
  • Each user can change the user's personal information and authority information separately, which makes the management and control of server login authority more flexible and fast.
  • FIG. 1 is a schematic structural diagram of a server login system provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a server login method provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a server login method provided by another embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a server login method provided by another embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a server login apparatus provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a server login apparatus provided by another embodiment of the present application.
  • FIG. 7 is a schematic diagram of a hardware structure of a server login device provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a hardware structure of a server login device provided by another embodiment of the present application.
  • Embodiments of the present application provide a server login method, system, and device, which are used to solve the problems in the prior art that storing and managing user's login authority information on a server leads to high data storage pressure in the server and poor management and control effect of login authority information. .
  • FIG. 1 is a schematic structural diagram of a server login system according to an embodiment of the present application.
  • the server login system includes a server set and an authentication center 120 ; the server set includes a plurality of servers 110 , and each server 110 is connected to the authentication center 120 via a network.
  • the target server 110 to which the user wants to log in may be any server 110 in the server set.
  • the target server 110 is configured to receive a login request from the first user to the target server 110 , and forward the login request to the authentication center 120 .
  • the authentication center 120 is configured to receive the login request sent by the target server 110, determine the user category of the first user according to the user identification information of the first user, and determine the first user belonging to the user category based on the user category of the first user.
  • the target login authority information corresponding to the two users, and according to the target login authority information, the first authority of the first user to log in to the target server 110 is authenticated. Second login password.
  • the target server 110 is further configured to receive the second login password corresponding to the target server 110 sent by the authentication center 120, determine whether the first login password and the second login password match, and determine whether to allow the first login password according to the judgment result. A user logs into the target server 110 .
  • the following describes the specific operations performed by the authentication center 120 and the target server 110 in the server login system when the user requests to log in to the server.
  • FIG. 2 it is a schematic flowchart of a server login method according to an embodiment of the present application, which is applied to the authentication center as shown in FIG. 1.
  • the method in FIG. 2 may include:
  • S202 Receive a login request of the first user for the target server sent by the target server.
  • the login request includes user identification information of the first user, server identification information of the target server, and a first login password used to log in to the target server.
  • the user identification information of the first user may be information used to identify the user, for example, the uid, gid, and user name of the first user.
  • the server identification information of the target server may be the server name of the target server, for example, server X, server Y, and so on.
  • the first login password used to log in to the target server may be a unique password issued by the authentication center and corresponding to the target server, and the corresponding first login passwords are different for different servers.
  • S204 Determine the user category of the first user according to the user identification information of the first user.
  • the user category includes user identity, user level, user group to which they belong, and the like.
  • the user identity may include the user's social identity, for example, a student, a staff member, a teacher, and the like.
  • the user level may include the user's authority level, eg, primary, primary, advanced, and the like.
  • the user group to which they belong may include the work group they belong to, the study group they belong to, the family group they belong to, and so on.
  • the second user includes all users belonging to a certain user category, that is, the second user is used to identify a category of users.
  • the target login authority information includes server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first login password and second login password corresponding to each first server respectively Wait.
  • the server identification information of at least one first server to which the second user is authorized to log in includes server X, server Y, server Z, and the like.
  • the authorization time corresponding to each first server may include the authorization time corresponding to the server X (such as the authorization expiration time: May 2020), the authorization time corresponding to the server Y (such as the authorization expiration time: December 2020), the server The permission time corresponding to Z (such as permission expiration time: November 2020).
  • the login authority information corresponding to different user categories may be the same or different.
  • different user identities have different login authority information
  • different user levels have different login authority information
  • different user groups have the same or different login authority information.
  • the second login password is a password issued by the authentication center and corresponding to the target server.
  • the first login password and the second login password may be the same password, or may be a key pair that matches each other.
  • the first login password may be a private key
  • the second login password may be a public key matching the first login password.
  • the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and based on the user category of the first user, the first user logs in to the target server.
  • the first authority of the server is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server can judge whether to allow the first user according to the first login password and the second login password. Log in to the target server.
  • the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center, without storing user-related data in each server.
  • it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. data, thereby avoiding information redundancy and saving server storage resources.
  • the technical solution improves the convenience of management and control of the server login authority, and the management and control effect is better.
  • the authentication center Before receiving the login request of the first user for the target server sent by the target server, the authentication center may pre-create and store the corresponding relationship between the user-related data and the user identification information, and update the user-related data according to the actual situation.
  • the specific implementation is as follows.
  • the authentication center may obtain user-related data corresponding to the first user, and create and store the first user-related data and user identification information. A corresponding relationship. After the first corresponding relationship is created, the user identification information and the first login passwords corresponding to each first server can be sent to the first user, so that the first user can send the user identification information and the first login password to the first user based on the user identification information and the first login password.
  • the corresponding server initiates a login request.
  • the user-related data may include the user category of the first user and target login authority information corresponding to the second user belonging to the user category.
  • the user-related data may further include home directory path information corresponding to the first user, so that the target server creates the first user's home directory according to the home directory path information.
  • the authentication center can determine which server the first user requests to log in to according to the first login password carried in the login request.
  • the authentication center may actively create and store the corresponding relationship between the user-related data and the user identification information based on a preset frequency, Or, based on the creation request initiated by the user, the corresponding relationship between the user-related data and the user identification information is created and stored under the trigger of the creation request.
  • the authentication center may include multiple data interfaces, and accordingly, the first correspondence between some user-related data and user identification information may be created and stored in different data interfaces of the authentication center, so that the target The server calls different data interfaces of the authentication center through the user identification information to obtain the user-related data defined in the data interface.
  • the user-related data created by each data interface is described in detail below.
  • the authentication center at least includes four data interfaces, namely, an interface for querying users, an interface for querying user groups, an interface for querying user passwords, and an interface for querying user login public keys.
  • the four RESTFUL (a software architecture style) data interface based on HTTPS protocol access provided by the certification center, the first correspondence between the corresponding part of the user-related data and the user identification information can be created and stored respectively.
  • the first correspondence between user identification information (eg, name: user name) and data used to identify the user in the user-related data may be defined in the query user interface.
  • the data used to identify the user in the user-related data includes: name: username/passwd: password/uid: monotonically increasing user ID (Identity document, identity certificate)/gid: monotonically increasing group ID/gecos: user description/dir : User home directory path/shell: Default Shell path.
  • a first correspondence between user identification information (eg, name: user name) and data used to identify a user's group in the user-related data can be defined in the user group query interface.
  • the data used to identify the user's group in the user-related data includes: name: group name/passwd: group password/gid: monotonically increasing group ID/members: users in the group.
  • a first correspondence between user identification information (eg, name: user name) and data related to the user password in the user-related data can be defined in the interface for querying the user password.
  • data related to a user's password includes: name: username/passwd: encrypted password/last_change: last password change time/change_min_days: minimum password change interval/change_max_days: password validity period/change_warn_days: number of days to warn before a password needs to be changed /change_inactive_days: The grace days after the password expires/expire_date: Account expiration time/reserved: Reserved field.
  • a first correspondence between user identification information (eg, name: user name) and the user's login public key (eg, public_key: login public key) in the user-related data can be defined in the interface for querying the user login public key.
  • the user-related data defined in each data interface can be acquired by calling different data interfaces of the authentication center.
  • the authentication center creates and stores the first correspondence between some user-related data and user identification information in different data interfaces, so that the target server calls different data interfaces of the authentication center through the user identification information, The user-related data defined in the data interface can be obtained, and the accuracy of data interaction between the target server and the authentication center is improved.
  • an update request for performing an update operation on the target login authority information in the user identification information can be received, and the target login information can be updated according to the update request.
  • Permission information performs the corresponding update operation.
  • the update operation includes an operation of adding the server identification information of the second server, an operation of deleting the server identification information of the first server, an operation of modifying the authority time, an operation of modifying the first login password and the second login password, etc. .
  • the changed user category can be determined, and it is determined that the user category belongs to the user category.
  • the login authority information corresponding to the third user of the changed user category is updated, and the target login authority information in the user-related data is updated to the login authority information corresponding to the third user.
  • the third user includes all users belonging to the changed user category.
  • whether the user category in the user-related data changes can be monitored in real time, and when the user category changes, the target login authority information in the user-related data is updated accordingly, so as to ensure that users of different categories are Accurate management and control of the login authority information it has to prevent users from logging into the server due to incorrect login authority information after the user category is changed.
  • the authentication center may authenticate the login of the first user to the target server according to the information carried in the login request.
  • the specific implementation is as follows.
  • pre-created user-related data corresponding to the user identification information may be acquired according to the user identification information of the first user, and the user category of the first user may be determined based on the user-related data.
  • the second authority of the target server to obtain the user-related data may be authenticated. If the authorization authentication is passed, the user-related data will be sent to the target server.
  • the server identification information of at least one first server in the target login authority information corresponding to the user category of the first user includes the server identification information of the target server, and the reception time of the login request is within the authority time, it is determined that the second Permission authentication passed.
  • the authorization time corresponding to the target server in the login authorization information has expired, for example, the server identification information of the target server is server X, the authorization expiry time corresponding to server X is May 2020, and the current authentication time is June 2020. Then it is determined that the second authority authentication fails. It can be seen that by setting the authority time in the login authority information, the functions of automatically reclaiming the user's authority to log in to the server and granting the user the authority to temporarily log in to the server are realized.
  • the target server can determine whether the first user is a legal user based on the user-related data, and if the target server determines that the first user is a legal user, the determination result can be fed back an authentication center, so that the authentication center performs the step of authenticating the first authority of the first user to log in to the target server.
  • the manner in which the target server feeds back the judgment result to the authentication center may include: feeding back only the judgment result to the authentication center, or, through an interface preset by the authentication center for receiving legal user data, sending the first user to the target server's data.
  • the login request is sent to the authentication center.
  • the interface preset by the authentication center for receiving legal user data may be the public key interface for querying user login listed in the above embodiment.
  • the authentication center When the designated data interface of the authentication center receives the first user's login request for the target server sent by the target server, the authentication center can be triggered to authenticate the second authority of the target server to obtain user-related data.
  • the designated data interface of the authentication center may include the query user interface, the user group query interface, and the user password query interface listed in the above embodiment.
  • the target server will trigger the sshd process to call the name resolution nss service in the local file of the target server when receiving the login request of the first user.
  • Query the user-related data such as the uid, gid, and home directory path of the first user. If the query is not available, the first user is separated based on the HTTPS protocol through the dynamic link library (create /usr/lib64/libnss_https.so dynamic link library).
  • the login request of the target server is sent to the query user interface, user group query interface and user password query interface of the authentication center, so as to trigger the authentication center to authenticate the second authority of the target server to obtain user-related data, and when the authentication is passed, Returns the user-related data defined in each interface.
  • the authentication center can be triggered to authenticate the first authority of the first user to log in to the target server. If passed, the second login password corresponding to the target server is returned to the target server.
  • another designated data interface of the authentication center may include the public key interface for querying user login listed in the above embodiment, and the first user and the target server may use ssh protocol for data transmission.
  • the target server receives the login request of the first user, trigger the sshd process to call the shell script through AuthorizedKeysCommand, write the login request of the first user in the shell script, and pass it to the authentication center's public key interface for querying user login through the HTTPS protocol , to trigger the authentication center to authenticate the first authority of the first user to log in to the target server, and when the authentication is passed, return the second login password defined in the interface for querying the user's login public key.
  • the following configuration can be added to the configuration file /etc/ssh/sshd_config of the target server in advance: AuthorizedKeysCommand/bin/sh/usr/libexec/openssh/get_keys.sh%u, so that the target server receives the login of the first user
  • the sshd process is triggered to use the AuthorizedKeysCommand to call the shell script, and the shell script accesses the authentication center's query user login public key interface.
  • the authentication center authenticates the second authority of the target server to obtain the user-related data according to the first user's login request to the target server and the target login authority information corresponding to the user category of the first user, and in the second When the authority authentication is passed, the user-related data is sent to the target server, so that the target server can determine whether the first user is a legal user based on the user-related data.
  • the first authority to log in to the target server is authenticated. It can be seen that the above embodiment can authenticate the user's authority to log in to the server according to the user category, and realize the effect of authenticating and managing the user's authority to log in to the server according to each user category. In terms of method, the convenience of management and control of server login permissions is improved, and the management and control effect is better.
  • the server when it is necessary to change the permission information of a user to log in to the server, it is only necessary to change the user category to which the user belongs in the user-related data, or only to change the permission information corresponding to the user category to which the user belongs.
  • Each user can change the user's personal information and authority information respectively, so that the control effect of server login authority is more flexible and fast.
  • the target login authority information corresponding to the second user belonging to the user category is determined based on the user category of the first user
  • the target login in the user-related data that matches the user category of the first user can be obtained authority information; or the target login authority information that matches the user category of the first user may be determined according to the second correspondence between each user category and the login authority information pre-created in the authentication center.
  • the authentication center may acquire user-related data corresponding to the user category based on the user category of the first user, thereby obtaining target login authority information recorded in the user-related data that matches the user category of the first user.
  • the authentication center may determine that the user category of the first user matches the user category of the first user according to the user category of the first user and the second correspondence between each user category and login authority information pre-created in the authentication center target login permission information.
  • the user's login authority information can be determined in various ways, which improves the flexibility of determining the login authority information.
  • the authority authentication result when authenticating the first authority of the first user to log in to the target server, the authority authentication result can be obtained according to various factors, thus effectively improving the accuracy of the authentication result.
  • FIG. 3 it is a schematic flowchart of a server login method according to another embodiment of the present application, which is applied to the target server as shown in FIG. 1 , and the method in FIG. 3 may include:
  • S302 Receive a login request from the first user for the target server.
  • the login request includes user identification information of the first user, server identification information of the target server, and a first login password used to log in to the target server.
  • the authentication center is configured to determine the user category of the first user according to the user identification information of the first user, and authenticate the first permission of the first user to log in to the target server based on the user category of the first user.
  • S306 Receive a second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match.
  • the second login password is sent to the target server by the authentication center after passing the authentication of the first authority.
  • the first login password and the second login password match, the first user is allowed to log in to the target server; if the first login password and the second login password do not match, the first user is not allowed to log in to the target server.
  • first login password and the second login password corresponding to the target server are the same password, then when the first login password and the second login password are the same, it is determined that the first login password and the second login password match; When the password and the second login password are different, it is determined that the first login password and the second login password do not match.
  • the matching relationship of the key pair can be preset.
  • the target server may support the ssh protocol.
  • the sshd process can be triggered to call the session module of the PAM module of the target server, and the session module creates the first user's home directory based on the home directory path information corresponding to the first user in the user-related data, in order to store the data of the first user.
  • the target server receives the login request from the first user to the target server, forwards the login request to the authentication center, receives the second login password corresponding to the target server sent by the authentication center, and judges the first Whether the login password matches the second login password, it is determined whether the first user is allowed to log in to the target server according to the judgment result. It can be seen that in this technical solution, through the interaction between the target server and the authentication center, the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center, without storing user-related data in each server.
  • the user-related data sent by the authentication center may be received, and based on the first user's login request for the target server and the user-related data, determine the first Whether the user is a legal user, if the first user is a legal user, the step of receiving the second login password corresponding to the target server sent by the authentication center is performed.
  • the target server can support the ssh protocol, and when the target server receives the user-related data sent by the authentication center, the sshd process can be triggered to call the auth interface of the PAM module of the target server to verify the legitimacy of the first user account, for example Verify whether the user identification information of the first user and the first login password are accurate. And call the account interface of the PAM module of the target server to verify the server to which the first user has the right to log in and the authorization time corresponding to each server.
  • the authentication center by receiving the user-related data sent by the authentication center, based on the first user's login request to the target server and the user-related data, it is determined whether the first user is a legal user, and when it is determined that the first user is a legal user , and execute the step of receiving the second login password corresponding to the target server sent by the authentication center. Since multiple verifications are performed, the security of data interaction in the process of user login to the server is effectively ensured.
  • the server identification information of at least one first server includes the server identification of the target server. information, and whether the reception time of the login request is within the authority time, if the server identification information of at least one first server contains the server identification information of the target server, and the reception time of the login request is within the authority time, it is determined that the first user is legitimate user.
  • the legitimacy of the user is judged according to various factors (whether the server identification information of the at least one first server includes the server identification information of the target server, and whether the login request is received within the authorized time period), When the server identification information of at least one first server includes the server identification information of the target server and the receiving time of the login request is within the authority time, it is determined that the first user is a legitimate user, which effectively improves the accuracy of the judgment result.
  • FIG. 4 is a schematic flowchart of a server login method according to another embodiment of the present application.
  • the server login method is applied to the server login system shown in FIG. 1 , and through the interaction between the authentication center and the target server, the effect of the user safely logging in to the server is realized.
  • the method of Figure 4 may include:
  • an authentication center acquires user-related data corresponding to a first user, and creates and stores a first correspondence between the user-related data and user identification information.
  • an update request for performing an update operation on the target login authority information may be received, and a corresponding update operation may be performed on the target login authority information according to the update request. update operation.
  • the update operation includes an operation of adding the server identification information of the second server, an operation of deleting the server identification information of the first server, an operation of modifying the authority time, an operation of modifying the first login password and the second login password, etc. .
  • the changed user category can be determined, and it is determined that the user category belongs to the user category.
  • the target login authority information in the user-related data is updated to the login authority information corresponding to the third user.
  • the authentication center sends the user identification information and the first login password corresponding to each first server to the first user, so that the first user initiates a login request to the corresponding server based on the user identification information and the first login password.
  • the target server receives a login request from the first user to the target server, and forwards the login request to the authentication center.
  • the login request includes user identification information of the first user, server identification information of the target server, and a first login password for logging in to the target server.
  • the authentication center obtains pre-created user-related data corresponding to the user identification information according to the user identification information of the first user in the received login request, and determines the user category of the first user based on the user-related data.
  • the user category includes user identity, user level, user group to which they belong, and the like.
  • the authentication center determines, based on the user category of the first user, target login authority information corresponding to the second user belonging to the user category.
  • the authentication center may acquire user-related data corresponding to the user category based on the user category of the first user, thereby obtaining target login authority information recorded in the user-related data that matches the user category of the first user.
  • the authentication center may determine that the user category of the first user matches the user category of the first user according to the user category of the first user and the second correspondence between each user category and login authority information pre-created in the authentication center target login permission information.
  • the target login authority information includes server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first login password and second login password corresponding to each first server respectively Wait.
  • the authentication center authenticates the second authority of the target server to obtain the user-related data according to the target login authority information corresponding to the user category to which the first user belongs; if the second authority authentication passes, execute S407; if the second authority authentication fails , then execute S414.
  • the authentication center sends the user-related data to the target server.
  • the target server determines whether the first user is a legitimate user according to the received user-related data; if yes, executes S409; if not, executes S415.
  • the target server determines whether the first user is a legal user by judging whether the server identification information of the at least one first server includes the server identification information of the target server and whether the login request is received within the authority time.
  • the target server determines that the first user is a legitimate user; if the server identification information of the at least one first server If the information does not include the server identification information of the target server, and the receiving time of the login request is not within the authority time, the target server determines that the first user is an illegal user.
  • the target server determines that the first user is a legitimate user.
  • the authentication center authenticates the first authority of the first user to log in to the target server according to the target login authority information corresponding to the user category to which the first user belongs; if the first authority authentication passes, execute S411; if the first authority authentication fails , then execute S414.
  • the authentication center returns the second login password corresponding to the target server to the target server.
  • the target server receives the second login password sent by the authentication center, and judges whether the first login password and the second login password match; if they match, execute S413; if they do not match, execute S416.
  • the target server allows the first user to log in to the target server.
  • the authentication center sends empty data to the target server, and then executes S416.
  • the target server determines that the first user is an illegal user, and then executes S416.
  • the target server does not allow the first user to log in to the target server.
  • the server login method provided by the embodiments of the present application can be applied in various scenarios, such as requests from teachers and students in schools to log in to the server, and requests from ordinary staff and administrators in companies to log in to the server.
  • the following describes the specific process of the server login method by taking the scenario where employee A in the company requests to log in to server X using user identification information a as an example.
  • the server login system adopts an asymmetric encryption algorithm to realize the secure login of the target server
  • the first login password is the private key
  • the second login password is the public key matching the first login password.
  • the user categories include ordinary staff and administrators, and ordinary staff and administrators correspond to their respective login authority information.
  • the login authority information corresponding to an ordinary employee includes server identification information of a server to which the ordinary employee has the right to log in, such as server X and server Y.
  • the permission time corresponding to each server may include the permission time corresponding to server X (eg, permission expiration time: May 2020) and the permission time corresponding to server Y (eg, permission expiration time: December 2020).
  • the first login password and the second login password corresponding to each server may include the public key and private key corresponding to server X, and the public key and private key corresponding to server Y.
  • the login authority information corresponding to the administrator includes server identification information of servers to which the administrator has the right to log in, such as server X, server Y, server Z, and the like.
  • the permission time corresponding to each server may include the permission time corresponding to server X (such as permission expiration time: May 2020), the permission time corresponding to server Y (such as permission expiration time: December 2020), and the corresponding permission time of server Z. Permission time (such as permission expiration time: November 2020).
  • the first login password and the second login password corresponding to each server may include the public key and private key corresponding to server X, the public key and private key corresponding to server Y, and the public key and private key corresponding to server Z.
  • the user category corresponding to employee A is an ordinary employee. If after the first correspondence between the user-related data and the user identification information a is created and stored, it is detected that the user category in the user-related data is changed to an administrator, the login authority information corresponding to the administrator can be determined, and the user The login permission information in the related data is updated to the login permission information corresponding to the administrator.
  • the authentication center authenticates and controls the permissions of users to log in to the server according to each user category, if you want to change the permission information of employee A to log in to the server, you can only change the user category to which employee A belongs in the user-related data of employee A, or Only the permission information corresponding to the user category to which employee A belongs is changed.
  • server X When employee A requests to log in to server X using the user identification information a and the first login password, server X receives the login request from employee A to server X, and forwards the login request to the authentication center.
  • the authentication center receives the login request of the employee A to the server X, and determines the user category to which the employee A belongs according to the user identification information a carried in the login request. Assuming that the authentication center determines that the user category is an ordinary employee, it can further determine the login authority information corresponding to the ordinary employee, and determine whether employee A has the right to log in to the server X according to the login authority information corresponding to the ordinary employee. If so, the authentication center sends the second login password corresponding to the server X to the server X.
  • the server X determines that the first login password and the second login password match, the employee A is allowed to log in.
  • the user category can also be divided according to the department to which the employee belongs. For example, employee A belongs to the XX department, and employee B belongs to the YY department.
  • the authentication center preconfigures the login authority information corresponding to the employees in different departments, so as to restrict the login authority of each employee to the server in the company.
  • the authentication center will determine whether the employee has the right to log in to the server according to the department to which the employee belongs. The specific authority judgment method has been described in detail in the above embodiments, and will not be repeated here.
  • the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center through the interaction between the target server and the authentication center, without needing to log in to each server.
  • it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, it does not need to be repeated in each server. Create user-related data of the same user, thereby avoiding information redundancy and saving server storage resources.
  • the technical solution improves the convenience of management and control of the server login authority, and the management and control effect is better.
  • the server login method provided by the embodiment of the present application is described above. Based on the same idea, the embodiment of the present application also provides a server login device.
  • FIG. 5 is a schematic structural diagram of a server login device according to an embodiment of the present application.
  • the server login device includes: a first receiving module 510, configured to receive a message sent by a target server and sent by the first user to the target server
  • the login request includes the user identification information of the first user, the server identification information of the target server and the first login password used to log in to the target server;
  • the first determination module 520 is used for, according to the user identification information of the first user, Determine the user category of the first user;
  • the user category includes at least one of user identity, user level, and user group to which he belongs;
  • the first execution module 530 is configured to determine, based on the user category of the first user, a second user belonging to the user category
  • the corresponding target login authority information, and according to the target login authority information, the first authority of the first user to log in to the target server is authenticated;
  • the return module 540 is used to return the target server corresponding to the target server if the first authority authentication is passed
  • the first determining module 520 includes: an acquiring unit, configured to acquire pre-created user-related data corresponding to the user identification information according to the user identification information of the first user; the user-related data at least include a user category and a target Login authority information; target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first server corresponding to each first server a login password and a second login password; and a first determination unit, configured to determine the user category of the first user based on user-related data.
  • the server login apparatus further includes: an acquisition module for acquiring user-related data corresponding to the first user; a creation and storage module for creating and storing the first correspondence between the user-related data and the user identification information relationship; the first sending module is used to send the user identification information and the first login password corresponding to each first server to the first user, so that the first user initiates the corresponding server based on the user identification information and the first login password. Login request.
  • the first execution module 530 includes: an execution unit configured to acquire target login permission information in the user-related data that matches the user category of the first user; or,
  • the target login authority information matching the user category of the first user is determined.
  • the server login apparatus further includes: a second receiving module configured to receive an update request for performing an update operation on the target login authority information;
  • the update operation includes at least one of the following: adding server identification information of the second server operation, deletion operation of the server identification information of the first server, modification operation of the authority time, modification operation of the first login password and the second login password;
  • the second execution module is used for the target login authority according to the update request. The information is updated accordingly.
  • the server login device further includes: a second determining module, configured to determine the changed user category if the user category in the user-related data is monitored; The login authority information corresponding to the third user of the latter user category;
  • the updating module is used for updating the target login authority information in the user-related data to the login authority information corresponding to the third user.
  • the first execution module 530 includes: a first judging unit, configured to judge whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the time when the login request is received within the authority time; the second determining unit is configured to, if yes, determine that the first authority authentication is passed.
  • the server login device further includes: an authentication module, configured to authenticate the second authority of the target server to obtain the user-related data based on the user identification information and the corresponding user-related data; a second sending module, used for if After the second authority authentication is passed, the user-related data is sent to the target server, so that the target server can determine whether the first user is a legal user based on the user-related data; the third execution module is used for determining whether the first user is a legal user, then The step of authenticating the first authority of the first user to log in to the target server is performed.
  • an authentication module configured to authenticate the second authority of the target server to obtain the user-related data based on the user identification information and the corresponding user-related data
  • a second sending module used for if After the second authority authentication is passed, the user-related data is sent to the target server, so that the target server can determine whether the first user is a legal user based on the user-related data
  • the third execution module is used for determining whether the first user is a legal
  • the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and logs the first user into the target server based on the user category of the first user.
  • the first authority is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server judges whether to allow the first user to log in according to the first login password and the second login password. target server. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server.
  • the server In the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. , thereby avoiding information redundancy and saving server storage resources.
  • the effect of authenticating and controlling the authority of the user to log in to the server according to each user category is realized, compared with the traditional way of individually managing authority information for users. , the device improves the convenience of management and control of the server login authority, and the management and control effect is better.
  • server login device can be used to implement the server login method performed by the above authentication center, and the detailed description thereof should be similar to that described in the foregoing method part, and will not be repeated here to avoid tediousness.
  • FIG. 6 is a schematic structural diagram of a server login device according to an embodiment of the present application.
  • the server login device includes: a third receiving module 610 for receiving a login request from a first user to a target server; login The request includes the user identification information of the first user, the server identification information of the target server and the first login password used to log in to the target server; the forwarding module 620 is used to forward the login request to the authentication center; the authentication center is used for according to the first user The user identification information of the first user is determined, and based on the user category of the first user, the first authority of the first user to log in to the target server is authenticated; the fourth execution module 630 is used for receiving the information sent by the authentication center and the target server.
  • the server login apparatus further includes: a fourth receiving module, configured to receive user-related data sent by the authentication center; the user-related data includes the user category of the first user and the target login corresponding to the second user belonging to the user category Authority information; target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first login corresponding to each first server password and the second login password; the judgment module is used to judge whether the first user is a legal user based on the login request and user-related data; the fifth execution module is used to receive the authentication center sending if the first user is a legal user the second login password corresponding to the target server.
  • a fourth receiving module configured to receive user-related data sent by the authentication center
  • the user-related data includes the user category of the first user and the target login corresponding to the second user belonging to the user category Authority information
  • target login authority information includes at least one of the following: server identification information of at least one first server to which the second user
  • the judging module includes: a second judging unit for judging whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the receiving time of the login request is within the authority time inside; a third determining unit, configured to determine if the first user is a legitimate user.
  • the target server receives the login request from the first user to the target server, forwards the login request to the authentication center, receives the second login password corresponding to the target server sent by the authentication center, and determines the first login request. Whether the password matches the second login password, it is determined whether the first user is allowed to log in to the target server according to the judgment result. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server.
  • server login device can be used to implement the server login method executed by the above target server, and the detailed description thereof should be similar to that described in the foregoing method section, and will not be repeated here to avoid tediousness.
  • an embodiment of the present application further provides a server login device, as shown in FIG. 7 .
  • the server login device may vary greatly due to different configurations or performances, and may include one or more processors 701 and a memory 702, and the memory 702 may store one or more storage applications or data. Among them, the memory 702 may be short-lived storage or persistent storage.
  • the application program stored in memory 702 may include one or more modules (not shown), each module may include a series of computer-executable instructions for logging into the device to the server. Still further, the processor 701 may be arranged to communicate with the memory 702 to execute a series of computer-executable instructions in the memory 702 on the server login device.
  • the server login device may also include one or more power supplies 703 , one or more wired or wireless network interfaces 704 , one or more input and output interfaces 705 , and one or more keyboards 706 .
  • the server login device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module
  • a series of computer-executable instructions in the device may include logging into the server
  • the one or more programs configured to be executed by the one or more processors include computer-executable instructions for performing the following: A user's login request for the target server; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; according to the user identification information of the first user, determine the first login User category of the user; the user category includes at least one of user identity, user level, and user group to which he belongs; based on the user category of the first user, determine the target login authority information corresponding to the second user belonging to the user category, and log in according to the target Authority information, to authenticate the first authority of the first user to log in to the target server; if the first authority authentication is passed, return the second
  • the processor may further: obtain pre-created user-related data corresponding to the user identification information according to the user identification information of the first user; the user-related data at least Including user category and target login authority information; target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, each first server The corresponding first login password and the second login password respectively; based on the user-related data, the user category of the first user is determined.
  • the processor may further: acquire user-related data corresponding to the first user; create and store a first correspondence between the user-related data and the user identification information ; Send the user identification information and the first login password corresponding to each first server to the first user, so that the first user initiates a login request to the corresponding server based on the user identification information and the first login password.
  • the processor may further: acquire target login authority information in the user-related data that matches the user category of the first user; or, according to the authentication center The second corresponding relationship between each user category and the login authority information pre-created in the device determines the target login authority information that matches the user category of the first user.
  • the processor may further cause the processor to: receive an update request for performing an update operation on the target login authority information; the update operation includes at least one of the following: The addition operation of identification information, the deletion operation of the server identification information of the first server, the modification operation of the authority time, the modification operation of the first login password and the second login password; according to the update request, perform corresponding operations on the target login authority information. update operation.
  • the processor when the computer-executable instructions are executed, can further cause the processor to: if the user category in the user-related data is detected to change, determine the changed user category; determine that the user belongs to the changed user category The login authority information corresponding to the third user of the category; the target login authority information in the user-related data is updated to the login authority information corresponding to the third user.
  • the processor may further: determine whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the login request The receiving time is within the authority time; if it is, it is determined that the first authority authentication is passed.
  • the processor when the computer-executable instructions are executed, can further cause the processor to: based on the user identification information and the corresponding user-related data, authenticate the second authority of the target server to obtain the user-related data; If the second authority authentication is passed, the user-related data is sent to the target server, so that the target server can determine whether the first user is a legal user based on the user-related data; The first authority to authenticate the steps.
  • the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and logs the first user into the target server based on the user category of the first user.
  • the first authority is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server judges whether to allow the first user to log in according to the first login password and the second login password. target server. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server.
  • the server In the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. , thereby avoiding information redundancy and saving server storage resources.
  • the effect of authenticating and controlling the authority of the user to log in to the server according to each user category is realized, compared with the traditional way of individually managing authority information for users. , the device improves the convenience of management and control of server login permissions, and the management and control effect is better.
  • an embodiment of the present application further provides a server login device, as shown in FIG. 8 .
  • the server login device may vary greatly due to different configurations or performances, and may include one or more processors 801 and a memory 802, and the memory 802 may store one or more storage applications or data. Among them, the memory 802 may be short-term storage or persistent storage.
  • the application program stored in memory 802 may include one or more modules (not shown), each module may include a series of computer-executable instructions for logging into the device to the server. Still further, the processor 801 may be arranged to communicate with the memory 802 to execute a series of computer-executable instructions in the memory 802 on the server login device.
  • the server login device may also include one or more power supplies 803 , one or more wired or wireless network interfaces 804 , one or more input and output interfaces 805 , and one or more keyboards 806 .
  • the server login device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module
  • a series of computer-executable instructions in the device may include logging into the server, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for performing the following: receiving a target server from a first user
  • the login request includes the user identification information of the first user, the server identification information of the target server and the first login password used to log in to the target server; the login request is forwarded to the authentication center; the authentication center is used to User identification information, determine the user category of the first user, and authenticate the first authority of the first user to log in to the target server based on the user category of the first user; receive the second login password sent by the authentication center and correspond to the target server, and Determine whether the first login password and the second login password match; the second login password is sent to the target server by the authentication center after passing the first authority authentication; and whether the first
  • the computer-executable instructions when executed, can further cause the processor to: receive user-related data sent by the authentication center; the user-related data includes the user category of the first user and the second user belonging to the user category Corresponding target login authority information; the target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, the authority time corresponding to each first server, and the corresponding authorization time of each first server.
  • Based on the login request and user-related data determine whether the first user is a legal user; if the first user is a legal user, then execute the second request sent by the authentication center and corresponding to the target server. Steps to log in password.
  • the processor may further: determine whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the login request The receiving time is within the authorized time; if so, the first user is determined to be a legitimate user.
  • the target server receives the login request from the first user to the target server, forwards the login request to the authentication center, receives the second login password corresponding to the target server sent by the authentication center, and determines the first login Whether the password matches the second login password, it is determined whether the first user is allowed to log in to the target server according to the judgment result. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server.
  • An embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs include instructions, and the instructions are logged into a device by a server including multiple application programs During execution, the server login device can be made to execute each process of the foregoing server login method embodiments, and the same technical effect can be achieved. In order to avoid repetition, details are not described here.
  • An embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs include instructions, and the instructions are logged into a device by a server including multiple application programs During execution, the server login device can be made to execute each process of the foregoing server login method embodiments, and the same technical effect can be achieved. In order to avoid repetition, details are not described here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed is a server login method, system and device. The method comprises: receiving a login request, which is sent by a target server, of a first user with regard to the target server; determining a user category of the first user according to user identification information of the first user, so as to determine target login authority information corresponding to a second user that belongs to the user category, and authenticating a first authority of the first user logging into the target server; and if authentication is passed, returning, to the target server, a second login password corresponding to the target server.

Description

服务器登录方法、系统及装置Server login method, system and device
交叉引用cross reference
本申请要求在2019年08月07日提交中国专利局、申请号为202010787009.7、发明名称为“服务器登录方法、系统及装置”的中国专利申请的优先权,上述申请的全部内容通过引用结合在本发明中。This application claims the priority of the Chinese patent application with the application number 202010787009.7 and the invention titled "Server Login Method, System and Device" filed with the China Patent Office on August 7, 2019, the entire contents of the above application are incorporated herein by reference invention.
技术领域technical field
本申请涉及信息安全技术领域,尤其涉及一种服务器登录方法、系统及装置。The present application relates to the technical field of information security, and in particular, to a server login method, system and device.
背景技术Background technique
目前,在用户登录服务器的过程中,一般是由用户与服务器进行交互,根据服务器的本地文件中存储的用户的uid(user identify,用户身份证明)、gid(group identify,组身份证明)、家目录路径、登录公钥、服务器登录权限等用户相关数据,验证用户是否能够登录至服务器。但由于各服务器是相互独立的,当用户需要登录多台服务器时,则需要在每台服务器上均创建用户的上述用户相关数据。在用户想要登录某台服务器时,由该服务器根据用户相关数据验证用户是否具备登录服务器的权限,这不仅导致信息冗余,使得服务器的数据存储压力大,且不便于对用户的服务器登录权限进行管理。At present, in the process of user login to the server, the user generally interacts with the server, according to the user's uid (user identify, user identity certificate), gid (group identify, group identity certificate), home User-related data such as directory path, login public key, and server login authority to verify whether the user can log in to the server. However, since each server is independent of each other, when a user needs to log in to multiple servers, the above-mentioned user-related data of the user needs to be created on each server. When a user wants to log in to a certain server, the server verifies whether the user has the right to log in to the server according to the relevant data of the user, which not only leads to redundant information, but also makes the data storage pressure of the server great, and it is inconvenient for the user to log in to the server. to manage.
在对用户的服务器登录权限的管理方面,现有技术中,由于是针对每位用户分别创建对应的用户相关数据,因此若要更改用户对服务器的登录权限,就需要在对应服务器中存储的与该用户对应的服务器登录权限进行更改。假如需要同时更改用户对多台服务器的登录权限,则需要在多台服务器中分别更改该用户对应的服务器登录权限。显然,此种管理登录权限的方式不仅消耗人力,而且效率低下,尤其对于用户较多以及服务器较多的应用场景更加难以满足需求。Regarding the management of the user's server login authority, in the prior art, since the corresponding user-related data is created for each user, if the user's login authority to the server is to be changed, it is necessary to store the corresponding data in the corresponding server. Change the server login authority corresponding to the user. If you need to change the user's login authority to multiple servers at the same time, you need to change the server login authority corresponding to the user in the multiple servers. Obviously, this method of managing login permissions not only consumes manpower, but also has low efficiency, especially for application scenarios with many users and many servers, it is more difficult to meet the needs.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种服务器登录方法、系统及装置,用以解决现有技术中在服务器上存储及管理用户的登录权限信息导致服务器中数据存储压力大、以及登录权限信息管控效果差的问题。Embodiments of the present application provide a server login method, system, and device, which are used to solve the problems in the prior art that storing and managing user's login authority information on a server leads to high data storage pressure in the server and poor management and control effect of login authority information. .
为解决上述技术问题,本申请实施例是这样实现的。In order to solve the above technical problems, the embodiments of the present application are implemented in this way.
一方面,本说明书一个或多个实施例提供一种服务器登录方法,应用于认证中心,包括:接收目标服务器发送的、第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;所述用户类别包括用户身份、用户等级、所属用户组中的至少一项;基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证;若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码,以使所述目标服务器根据所述第一登录密码及所述第二登录密码判断是否允许所述第一用户登录所述目标服务器。On the one hand, one or more embodiments of this specification provide a server login method, applied to an authentication center, including: receiving a login request sent by a target server and directed to the target server by a first user; the login request includes the User identification information of the first user, server identification information of the target server, and first login password for logging in to the target server; according to the user identification information of the first user, determine the user category of the first user ; The user category includes at least one of user identity, user level, and belonging user group; based on the user category of the first user, determine the target login authority information corresponding to the second user belonging to the user category, and according to The target login authority information is used to authenticate the first authority of the first user to log in to the target server; if the authentication of the first authority is passed, the second authority corresponding to the target server is returned to the target server. login password, so that the target server determines whether to allow the first user to log in to the target server according to the first login password and the second login password.
另一方面,本申请实施例提供一种服务器登录方法,应用于目标服务器,包括:接收第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;将所述登录请求转发至认证中心;所述认证中心用于根据所述第一用户的用户标识信息,确定所述第一用户的用户类别,并基于所述第一用户的用户类别对所述第一用户登录所述目标服务器的第一权限进行认证;接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;所述第二登录密码由所述认证中心对所述第一权限认证通过后发送至所述目标服务器;根据判断结果确定是否允许所述第一用户登录所述目标服务器。On the other hand, an embodiment of the present application provides a server login method, which is applied to a target server and includes: receiving a login request from a first user to the target server; the login request includes user identification information of the first user, The server identification information of the target server and the first login password for logging in to the target server; forwarding the login request to the authentication center; the authentication center is used to determine the user identification information of the first user The user category of the first user, and based on the user category of the first user, the first authority of the first user to log in to the target server is authenticated; the second login password, and determine whether the first login password and the second login password match; the second login password is sent to the target by the authentication center after passing the authentication of the first authority server; determining whether to allow the first user to log in to the target server according to the judgment result.
再一方面,本申请实施例提供一种服务器登录系统,包括目标服务器和认证中心;所述目标服务器,用于接收第一用户针对所述目标服务器的登录请求;将所述登录请求转发至所述认证中心;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;所述认证中心,用于接收所述目标服务器发送的所述登录请求;根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证;若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码;所述目标服务器,还用于接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;根据判断结果确定是否允许所述第一用户登录所述目标服务器。In yet another aspect, an embodiment of the present application provides a server login system, including a target server and an authentication center; the target server is configured to receive a login request from a first user to the target server; forward the login request to all the authentication center; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; the authentication center is used to receive all the login request sent by the target server; determine the user category of the first user according to the user identification information of the first user; determine the second user belonging to the user category based on the user category of the first user The target login authority information corresponding to the user, and according to the target login authority information, the first authority of the first user to log in to the target server is authenticated; Return the second login password corresponding to the target server; the target server is further configured to receive the second login password corresponding to the target server sent by the authentication center, and determine the first login password and the whether the second login password matches; according to the judgment result, determine whether to allow the first user to log in to the target server.
再一方面,本申请实施例提供一种服务器登录装置,包括:第一接收模块,用于接收目标服务器发送的、第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;第一确定模块,用于根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;所述用户类别包括用户身份、用户等级、所属用户组中的至少一项;第一执行模块,用于基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证;返回模块,用于若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码,以使所述目标服务器根据所述第一登录密码及所述第二登录密码判断是否允许所述第一用户登录所述目标服务器。In another aspect, an embodiment of the present application provides a server login device, including: a first receiving module, configured to receive a login request sent by a target server and sent by a first user to the target server; the login request includes the first receiving module. User identification information of a user, server identification information of the target server, and a first login password for logging in to the target server; a first determining module, configured to determine the first user according to the user identification information of the first user The user category of the first user; the user category includes at least one of a user identity, a user level, and a user group to which he belongs; a first execution module, configured to determine the user category belonging to the user category based on the user category of the first user the target login authority information corresponding to the second user, and authenticate the first authority of the first user to log in to the target server according to the target login authority information; a return module is used to authenticate if the first authority If passed, return the second login password corresponding to the target server to the target server, so that the target server determines whether to allow the first user to log in according to the first login password and the second login password the target server.
再一方面,本申请实施例提供一种服务器登录装置,包括:第三接收模块,用于接收第一用户针对目标服务器的登录请求;所述登录请求包括所述 第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;转发模块,用于将所述登录请求转发至认证中心;所述认证中心用于根据所述第一用户的用户标识信息,确定所述第一用户的用户类别,并基于所述第一用户的用户类别对所述第一用户登录所述目标服务器的第一权限进行认证;第四执行模块,用于接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;所述第二登录密码由所述认证中心对所述第一权限认证通过后发送至所述目标服务器;第四确定模块,用于根据判断结果确定是否允许所述第一用户登录所述目标服务器。In another aspect, an embodiment of the present application provides a server login device, including: a third receiving module configured to receive a login request from a first user to a target server; the login request includes user identification information of the first user, The server identification information of the target server and the first login password used to log in to the target server; the forwarding module is used to forward the login request to the authentication center; the authentication center is used to User identification information, determine the user category of the first user, and authenticate the first permission of the first user to log in to the target server based on the user category of the first user; the fourth execution module is used to receive The authentication center sends the second login password corresponding to the target server, and judges whether the first login password matches the second login password; the second login password is checked by the authentication center for all users. After the first authority authentication is passed, it is sent to the target server; the fourth determination module is configured to determine whether to allow the first user to log in to the target server according to the judgment result.
再一方面,本申请实施例提供一种服务器登录设备,包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:接收目标服务器发送的、第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;所述用户类别包括用户身份、用户等级、所属用户组中的至少一项;基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证;若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码,以使所述目标服务器根据所述第一登录密码及所述第二登录密码判断是否允许所述第一用户登录所述目标服务器。In yet another aspect, an embodiment of the present application provides a server login device, comprising: a processor; and a memory arranged to store computer-executable instructions, the executable instructions, when executed, cause the processor to: receive a target server The sent login request of the first user to the target server; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login for logging in to the target server. password; determine the user category of the first user according to the user identification information of the first user; the user category includes at least one of user identity, user level, and user group to which he belongs; User category, determine the target login authority information corresponding to the second user belonging to the user category, and authenticate the first authority of the first user to log in to the target server according to the target login authority information; if the If the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server can determine whether to allow the The first user logs in to the target server.
再一方面,本申请实施例提供一种服务器登录设备,包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:接收第一用户针对目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;将所述登录请求转发至认证中心;所述认证中心用于根据所述第一用户的用户标识信息,确定所述第一用户的用户 类别,并基于所述第一用户的用户类别对所述第一用户登录所述目标服务器的第一权限进行认证;接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;所述第二登录密码由所述认证中心对所述第一权限认证通过后发送至所述目标服务器;根据判断结果确定是否允许所述第一用户登录所述目标服务器。In yet another aspect, an embodiment of the present application provides a server login device, comprising: a processor; and a memory arranged to store computer-executable instructions, the executable instructions, when executed, cause the processor to: receive a first A user's login request for the target server; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; Forwarded to the authentication center; the authentication center is configured to determine the user category of the first user according to the user identification information of the first user, and based on the user category of the first user, log in to the first user. authenticate the first authority of the target server; receive the second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match; the The second login password is sent to the target server by the authentication center after passing the authentication of the first authority; and whether the first user is allowed to log in to the target server is determined according to the judgment result.
再一方面,本申请实施例提供一种存储介质,用于存储计算机可执行指令,所述可执行指令在被执行时实现以下流程:接收目标服务器发送的、第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;所述用户类别包括用户身份、用户等级、所属用户组中的至少一项;基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证;若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码,以使所述目标服务器根据所述第一登录密码及所述第二登录密码判断是否允许所述第一用户登录所述目标服务器。In another aspect, an embodiment of the present application provides a storage medium for storing computer-executable instructions, and when the executable instructions are executed, the following process is implemented: receiving a message sent by a target server and sent by a first user for the target server A login request; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; according to the user identification information of the first user , determine the user category of the first user; the user category includes at least one item of user identity, user level, and user group to which he belongs; based on the user category of the first user, determine the second user category belonging to the user category The target login authority information corresponding to the user, and according to the target login authority information, the first authority of the first user to log in to the target server is authenticated; The second login password corresponding to the target server is returned, so that the target server determines whether to allow the first user to log in to the target server according to the first login password and the second login password.
再一方面,本申请实施例提供一种存储介质,用于存储计算机可执行指令,所述可执行指令在被执行时实现以下流程:接收第一用户针对目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所述目标服务器的第一登录密码;将所述登录请求转发至认证中心;所述认证中心用于根据所述第一用户的用户标识信息,确定所述第一用户的用户类别,并基于所述第一用户的用户类别对所述第一用户登录所述目标服务器的第一权限进行认证;接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;所述第二登录密码由所述认证中心对所述第一权限认证通过后发送至所述目标服务器;根据判断结果确定是否允许所述 第一用户登录所述目标服务器。In another aspect, an embodiment of the present application provides a storage medium for storing computer-executable instructions, and when the executable instructions are executed, the following processes are implemented: receiving a login request from a first user to a target server; the login request Including the user identification information of the first user, the server identification information of the target server and the first login password for logging in to the target server; forwarding the login request to the authentication center; the authentication center is used for The user identification information of the first user, determine the user category of the first user, and authenticate the first permission of the first user to log in to the target server based on the user category of the first user; The second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match; After the first authority authentication is passed, it is sent to the target server; according to the judgment result, it is determined whether to allow the first user to log in to the target server.
采用本申请实施例的技术方案,认证中心通过根据目标服务器发送的、第一用户针对目标服务器的登录请求,确定第一用户的用户类别,并基于第一用户的用户类别对第一用户登录目标服务器的第一权限进行认证,在第一权限认证通过时,向目标服务器返回与目标服务器对应的第二登录密码,以使目标服务器根据第一登录密码及第二登录密码判断是否允许第一用户登录目标服务器。可见,该技术方案通过目标服务器和认证中心之间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。并且,通过根据用户类别对用户登录服务器的权限进行认证,实现了按照各用户类别对用户登录服务器的权限进行认证及管控的效果,相较于传统的分别针对用户个人管理权限信息的方式而言,该技术方案提升了对服务器登录权限的管控的便捷性,管控效果更优。By adopting the technical solutions of the embodiments of the present application, the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and based on the user category of the first user, the first user logs in to the target server. The first authority of the server is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server can judge whether to allow the first user according to the first login password and the second login password. Log in to the target server. It can be seen that in this technical solution, through the interaction between the target server and the authentication center, the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center, without storing user-related data in each server. Compared with the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. data, thereby avoiding information redundancy and saving server storage resources. In addition, by authenticating the user's authority to log in to the server according to the user category, the effect of authenticating and controlling the authority of the user to log in to the server according to each user category is realized, compared with the traditional way of individually managing authority information for users. , the technical solution improves the convenience of management and control of the server login authority, and the management and control effect is better.
进一步地,该技术方案在需要更改用户登录服务器的权限信息时,只需在用户相关数据中更改用户所属的用户类别、或者只需更改用户所属的用户类别对应的权限信息即可,而无需针对每个用户分别更改用户的个人信息及权限信息,从而使得服务器登录权限的管控效果更加灵活、快捷。Further, when the user's permission information for logging in to the server needs to be changed, the technical solution only needs to change the user category to which the user belongs in the user-related data, or only needs to change the permission information corresponding to the user category to which the user belongs. Each user can change the user's personal information and authority information separately, which makes the management and control of server login authority more flexible and fast.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请实施例中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some of the embodiments described in the embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请一实施例提供的一种服务器登录系统的示意性架构图。FIG. 1 is a schematic structural diagram of a server login system provided by an embodiment of the present application.
图2是本申请一实施例提供的一种服务器登录方法的示意性流程图。FIG. 2 is a schematic flowchart of a server login method provided by an embodiment of the present application.
图3是本申请另一实施例提供的一种服务器登录方法的示意性流程图。FIG. 3 is a schematic flowchart of a server login method provided by another embodiment of the present application.
图4是本申请另一实施例提供的一种服务器登录方法的示意性流程图。FIG. 4 is a schematic flowchart of a server login method provided by another embodiment of the present application.
图5是本申请一实施例提供的一种服务器登录装置的结构示意图。FIG. 5 is a schematic structural diagram of a server login apparatus provided by an embodiment of the present application.
图6是本申请另一实施例提供的一种服务器登录装置的结构示意图。FIG. 6 is a schematic structural diagram of a server login apparatus provided by another embodiment of the present application.
图7是本申请一实施例提供的一种服务器登录设备的硬件结构示意图。FIG. 7 is a schematic diagram of a hardware structure of a server login device provided by an embodiment of the present application.
图8是本申请另一实施例提供的一种服务器登录设备的硬件结构示意图。FIG. 8 is a schematic diagram of a hardware structure of a server login device provided by another embodiment of the present application.
具体实施方式detailed description
本申请实施例提供一种服务器登录方法、系统及装置,用以解决现有技术中在服务器上存储及管理用户的登录权限信息导致服务器中数据存储压力大、以及登录权限信息管控效果差的问题。Embodiments of the present application provide a server login method, system, and device, which are used to solve the problems in the prior art that storing and managing user's login authority information on a server leads to high data storage pressure in the server and poor management and control effect of login authority information. .
为了使本技术领域的人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本申请实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请实施例保护的范围。In order to make those skilled in the art better understand the technical solutions in the embodiments of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. The described embodiments are only some of the embodiments of this specification, but not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by persons of ordinary skill in the art without creative work shall fall within the protection scope of the embodiments of the present application.
图1是根据本申请一实施例的一种服务器登录系统的示意性架构图。如图1所示,服务器登录系统包括服务器集和认证中心120;服务器集中包括多个服务器110,各服务器110分别与认证中心120之间网络连接。用户想要登录的目标服务器110可以是服务器集中的任一个服务器110。FIG. 1 is a schematic structural diagram of a server login system according to an embodiment of the present application. As shown in FIG. 1 , the server login system includes a server set and an authentication center 120 ; the server set includes a plurality of servers 110 , and each server 110 is connected to the authentication center 120 via a network. The target server 110 to which the user wants to log in may be any server 110 in the server set.
本实施例中,目标服务器110用于接收第一用户针对目标服务器110的登录请求,并将登录请求转发至认证中心120。In this embodiment, the target server 110 is configured to receive a login request from the first user to the target server 110 , and forward the login request to the authentication center 120 .
本实施例中,认证中心120用于接收目标服务器110发送的登录请求,根据第一用户的用户标识信息确定第一用户的用户类别,基于第一用户的用户类别,确定属于该用户类别的第二用户对应的目标登录权限信息,并根据 目标登录权限信息,对第一用户登录目标服务器110的第一权限进行认证,若第一权限认证通过,则向目标服务器110返回与目标服务器110对应的第二登录密码。In this embodiment, the authentication center 120 is configured to receive the login request sent by the target server 110, determine the user category of the first user according to the user identification information of the first user, and determine the first user belonging to the user category based on the user category of the first user. The target login authority information corresponding to the two users, and according to the target login authority information, the first authority of the first user to log in to the target server 110 is authenticated. Second login password.
本实施例中,目标服务器110还用于接收认证中心120发送的与目标服务器110对应的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配,根据判断结果确定是否允许第一用户登录目标服务器110。In this embodiment, the target server 110 is further configured to receive the second login password corresponding to the target server 110 sent by the authentication center 120, determine whether the first login password and the second login password match, and determine whether to allow the first login password according to the judgment result. A user logs into the target server 110 .
以下分别叙述服务器登录系统中的认证中心120和目标服务器110,在用户请求登录服务器的过程中具体执行的操作。The following describes the specific operations performed by the authentication center 120 and the target server 110 in the server login system when the user requests to log in to the server.
如图2所示,是根据本申请一实施例的服务器登录方法的示意性流程图,应用于如图1中所示的认证中心,图2的方法可包括:As shown in FIG. 2, it is a schematic flowchart of a server login method according to an embodiment of the present application, which is applied to the authentication center as shown in FIG. 1. The method in FIG. 2 may include:
S202,接收目标服务器发送的、第一用户针对目标服务器的登录请求。S202: Receive a login request of the first user for the target server sent by the target server.
其中,登录请求包括第一用户的用户标识信息、目标服务器的服务器标识信息和用于登录目标服务器的第一登录密码。The login request includes user identification information of the first user, server identification information of the target server, and a first login password used to log in to the target server.
本实施例中,第一用户的用户标识信息可为用于标识用户的信息,例如,第一用户的uid、gid、用户名称等。目标服务器的服务器标识信息可为目标服务器的服务器名称,例如,服务器X、服务器Y等。用于登录目标服务器的第一登录密码可为由认证中心下发的与目标服务器对应的唯一密码,服务器不同则对应的第一登录密码不同。In this embodiment, the user identification information of the first user may be information used to identify the user, for example, the uid, gid, and user name of the first user. The server identification information of the target server may be the server name of the target server, for example, server X, server Y, and so on. The first login password used to log in to the target server may be a unique password issued by the authentication center and corresponding to the target server, and the corresponding first login passwords are different for different servers.
S204,根据第一用户的用户标识信息,确定第一用户的用户类别。S204: Determine the user category of the first user according to the user identification information of the first user.
其中,用户类别包括用户身份、用户等级、所属用户组等。The user category includes user identity, user level, user group to which they belong, and the like.
本实施例中,用户身份可包括用户的社会身份,例如,学生、职员、老师等。用户等级可包括用户的权限等级,例如,初级、一级、高级等。所属用户组可包括所属工作组、所属学习组、所属家庭组等。In this embodiment, the user identity may include the user's social identity, for example, a student, a staff member, a teacher, and the like. The user level may include the user's authority level, eg, primary, primary, advanced, and the like. The user group to which they belong may include the work group they belong to, the study group they belong to, the family group they belong to, and so on.
S206,基于第一用户的用户类别,确定属于该用户类别的第二用户对应的目标登录权限信息,并根据目标登录权限信息,对第一用户登录目标服务器的第一权限进行认证。S206 , based on the user category of the first user, determine target login authority information corresponding to the second user belonging to the user category, and authenticate the first authority of the first user to log in to the target server according to the target login authority information.
其中,第二用户包括属于某一用户类别的所有用户,即第二用户用于标 识一类用户。The second user includes all users belonging to a certain user category, that is, the second user is used to identify a category of users.
其中,目标登录权限信息包括第二用户有权登录的至少一个第一服务器的服务器标识信息、各第一服务器分别对应的权限时间、各第一服务器分别对应的第一登录密码和第二登录密码等。The target login authority information includes server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first login password and second login password corresponding to each first server respectively Wait.
例如,第二用户有权登录的至少一个第一服务器的服务器标识信息包括服务器X、服务器Y、服务器Z等。各第一服务器分别对应的权限时间可包括服务器X对应的权限时间(如权限到期时间:2020年5月)、服务器Y对应的权限时间(如权限到期时间:2020年12月)、服务器Z对应的权限时间(如权限到期时间:2020年11月)。For example, the server identification information of at least one first server to which the second user is authorized to log in includes server X, server Y, server Z, and the like. The authorization time corresponding to each first server may include the authorization time corresponding to the server X (such as the authorization expiration time: May 2020), the authorization time corresponding to the server Y (such as the authorization expiration time: December 2020), the server The permission time corresponding to Z (such as permission expiration time: November 2020).
本实施例中,不同的用户类别对应的登录权限信息可相同或不同。例如,不同的用户身份对应的登录权限信息不同,不同的用户等级对应的登录权限信息不同,不同的用户组对应的登录权限信息相同或者不同。In this embodiment, the login authority information corresponding to different user categories may be the same or different. For example, different user identities have different login authority information, different user levels have different login authority information, and different user groups have the same or different login authority information.
其中,第二登录密码为由认证中心下发的与目标服务器对应的密码。第一登录密码和第二登录密码可以是相同的密码,也可以是相互匹配的密钥对。例如,采用非对称加密算法实现目标服务器的安全登录,则第一登录密码可为私钥,第二登录密码可为与第一登录密码相匹配的公钥。The second login password is a password issued by the authentication center and corresponding to the target server. The first login password and the second login password may be the same password, or may be a key pair that matches each other. For example, if an asymmetric encryption algorithm is used to implement secure login of the target server, the first login password may be a private key, and the second login password may be a public key matching the first login password.
S208,若第一权限认证通过,则向目标服务器返回与目标服务器对应的第二登录密码,以使目标服务器根据第一登录密码及第二登录密码判断是否允许第一用户登录目标服务器。S208, if the first authority authentication is passed, return the second login password corresponding to the target server to the target server, so that the target server determines whether to allow the first user to log in to the target server according to the first login password and the second login password.
采用本申请实施例的技术方案,认证中心通过根据目标服务器发送的、第一用户针对目标服务器的登录请求,确定第一用户的用户类别,并基于第一用户的用户类别对第一用户登录目标服务器的第一权限进行认证,在第一权限认证通过时,向目标服务器返回与目标服务器对应的第二登录密码,以使目标服务器根据第一登录密码及第二登录密码判断是否允许第一用户登录目标服务器。可见,该技术方案通过目标服务器和认证中心之间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及 存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。并且,通过根据用户类别对用户登录服务器的权限进行认证,实现了按照各用户类别对用户登录服务器的权限进行认证及管控的效果,相较于传统的分别针对用户个人管理权限信息的方式而言,该技术方案提升了对服务器登录权限的管控的便捷性,管控效果更优。By adopting the technical solutions of the embodiments of the present application, the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and based on the user category of the first user, the first user logs in to the target server. The first authority of the server is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server can judge whether to allow the first user according to the first login password and the second login password. Log in to the target server. It can be seen that in this technical solution, through the interaction between the target server and the authentication center, the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center, without storing user-related data in each server. Compared with the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. data, thereby avoiding information redundancy and saving server storage resources. In addition, by authenticating the user's authority to log in to the server according to the user category, the effect of authenticating and controlling the authority of the user to log in to the server according to each user category is realized, compared with the traditional way of individually managing authority information for users. , the technical solution improves the convenience of management and control of the server login authority, and the management and control effect is better.
认证中心在接收目标服务器发送的、第一用户针对目标服务器的登录请求之前,可预先创建及存储用户相关数据与用户标识信息之间的对应关系、以及根据实际情况对用户相关数据进行更新。具体执行方式如下所述。Before receiving the login request of the first user for the target server sent by the target server, the authentication center may pre-create and store the corresponding relationship between the user-related data and the user identification information, and update the user-related data according to the actual situation. The specific implementation is as follows.
在一个实施例中,接收目标服务器发送的、第一用户针对目标服务器的登录请求之前,认证中心可获取第一用户对应的用户相关数据,创建并存储用户相关数据与用户标识信息之间的第一对应关系,在创建第一对应关系之后,可将用户标识信息和各第一服务器分别对应的第一登录密码发送给第一用户,以使第一用户基于用户标识信息和第一登录密码向对应的服务器发起登录请求。In one embodiment, before receiving the first user's login request for the target server sent by the target server, the authentication center may obtain user-related data corresponding to the first user, and create and store the first user-related data and user identification information. A corresponding relationship. After the first corresponding relationship is created, the user identification information and the first login passwords corresponding to each first server can be sent to the first user, so that the first user can send the user identification information and the first login password to the first user based on the user identification information and the first login password. The corresponding server initiates a login request.
其中,用户相关数据可包括第一用户的用户类别和属于该用户类别的第二用户对应的目标登录权限信息。在一个实施例中,用户相关数据还可包括第一用户对应的家目录路径信息,以使目标服务器根据该家目录路径信息创建第一用户的家目录。The user-related data may include the user category of the first user and target login authority information corresponding to the second user belonging to the user category. In one embodiment, the user-related data may further include home directory path information corresponding to the first user, so that the target server creates the first user's home directory according to the home directory path information.
其中,由于第一登录密码和服务器一一对应,因此,第一用户想要登录哪一服务器,就需要基于用户标识信息和该服务器对应的第一登录密码向该服务器发起登录请求。相应的,认证中心接收到目标服务器发送的、第一用户针对目标服务器的登录请求之后,根据登录请求中携带的第一登录密码即可确定第一用户请求登录至哪一服务器。Since the first login password and the server are in one-to-one correspondence, which server the first user wants to log in to, needs to initiate a login request to the server based on the user identification information and the first login password corresponding to the server. Correspondingly, after receiving the login request of the first user for the target server sent by the target server, the authentication center can determine which server the first user requests to log in to according to the first login password carried in the login request.
本实施例中,在创建并存储用户相关数据与用户标识信息之间的第一对应关系时,认证中心可基于预设频率,主动创建并存储用户相关数据与用户 标识信息之间的对应关系,或者,基于用户发起的创建请求,在该创建请求的触发下创建并存储用户相关数据与用户标识信息之间的对应关系。In this embodiment, when creating and storing the first correspondence between the user-related data and the user identification information, the authentication center may actively create and store the corresponding relationship between the user-related data and the user identification information based on a preset frequency, Or, based on the creation request initiated by the user, the corresponding relationship between the user-related data and the user identification information is created and stored under the trigger of the creation request.
在一个实施例中,认证中心可包括多个数据接口,相应的,可在认证中心的不同数据接口中分别创建并存储部分用户相关数据与用户标识信息之间的第一对应关系,以使目标服务器通过用户标识信息调用认证中心的不同数据接口,获取数据接口中定义的用户相关数据。以下详述各个数据接口分别创建的用户相关数据。In one embodiment, the authentication center may include multiple data interfaces, and accordingly, the first correspondence between some user-related data and user identification information may be created and stored in different data interfaces of the authentication center, so that the target The server calls different data interfaces of the authentication center through the user identification information to obtain the user-related data defined in the data interface. The user-related data created by each data interface is described in detail below.
在一个实施例中,认证中心至少包括查询用户接口、查询用户属组接口、查询用户密码接口、查询用户登录公钥接口这4个数据接口。在认证中心提供的4个基于HTTPS协议访问的RESTFUL(一种软件架构风格)数据接口中,可分别创建并存储各自对应的部分用户相关数据与用户标识信息之间的第一对应关系。In one embodiment, the authentication center at least includes four data interfaces, namely, an interface for querying users, an interface for querying user groups, an interface for querying user passwords, and an interface for querying user login public keys. In the four RESTFUL (a software architecture style) data interface based on HTTPS protocol access provided by the certification center, the first correspondence between the corresponding part of the user-related data and the user identification information can be created and stored respectively.
其中,查询用户接口中可定义用户标识信息(如,name:用户名)与用户相关数据中用于标识用户的数据之间的第一对应关系。例如,用户相关数据中用于标识用户的数据包括:name:用户名/passwd:密码/uid:单调递增用户ID(Identity document,身份证明)/gid:单调递增组ID/gecos:用户描述/dir:用户家目录路径/shell:默认Shell路径。The first correspondence between user identification information (eg, name: user name) and data used to identify the user in the user-related data may be defined in the query user interface. For example, the data used to identify the user in the user-related data includes: name: username/passwd: password/uid: monotonically increasing user ID (Identity document, identity certificate)/gid: monotonically increasing group ID/gecos: user description/dir : User home directory path/shell: Default Shell path.
查询用户属组接口中可定义用户标识信息(如,name:用户名)与用户相关数据中用于标识用户属组的数据之间的第一对应关系。例如,用户相关数据中用于标识用户属组的数据包括:name:组名/passwd:组密码/gid:单调递增组ID/members:组中的用户。A first correspondence between user identification information (eg, name: user name) and data used to identify a user's group in the user-related data can be defined in the user group query interface. For example, the data used to identify the user's group in the user-related data includes: name: group name/passwd: group password/gid: monotonically increasing group ID/members: users in the group.
查询用户密码接口中可定义用户标识信息(如,name:用户名)与用户相关数据中与用户密码相关的数据之间的第一对应关系。例如,与用户密码相关的数据包括:name:用户名/passwd:加密密码/last_change:最后一次修改密码时间/change_min_days:最小修改密码时间间隔/change_max_days:密码有效期/change_warn_days:密码需要变更前的警告天数/change_inactive_days:密码过期后的宽限天数/expire_date:账号失效时间 /reserved:保留字段。A first correspondence between user identification information (eg, name: user name) and data related to the user password in the user-related data can be defined in the interface for querying the user password. For example, data related to a user's password includes: name: username/passwd: encrypted password/last_change: last password change time/change_min_days: minimum password change interval/change_max_days: password validity period/change_warn_days: number of days to warn before a password needs to be changed /change_inactive_days: The grace days after the password expires/expire_date: Account expiration time/reserved: Reserved field.
查询用户登录公钥接口中可定义用户标识信息(如,name:用户名)与用户相关数据中的用户登录公钥(如,public_key:登录公钥)之间的第一对应关系。A first correspondence between user identification information (eg, name: user name) and the user's login public key (eg, public_key: login public key) in the user-related data can be defined in the interface for querying the user login public key.
本实施例中,在从认证中心获取用户相关数据时,可通过调用认证中心的不同的数据接口,获取各数据接口中分别定义的用户相关数据。In this embodiment, when acquiring user-related data from the authentication center, the user-related data defined in each data interface can be acquired by calling different data interfaces of the authentication center.
在上述实施例中,认证中心通过在不同的数据接口中分别创建并存储部分用户相关数据与用户标识信息之间的第一对应关系,使得目标服务器通过用户标识信息调用认证中心的不同数据接口,即可获取数据接口中定义的用户相关数据,提高了目标服务器与认证中心之间数据交互的准确性。In the above embodiment, the authentication center creates and stores the first correspondence between some user-related data and user identification information in different data interfaces, so that the target server calls different data interfaces of the authentication center through the user identification information, The user-related data defined in the data interface can be obtained, and the accuracy of data interaction between the target server and the authentication center is improved.
在一个实施例中,创建并存储用户相关数据与用户标识信息之间的第一对应关系之后,可接收对用户标识信息中的目标登录权限信息执行更新操作的更新请求,根据更新请求对目标登录权限信息执行相应的更新操作。In one embodiment, after creating and storing the first correspondence between the user-related data and the user identification information, an update request for performing an update operation on the target login authority information in the user identification information can be received, and the target login information can be updated according to the update request. Permission information performs the corresponding update operation.
其中,更新操作包括对第二服务器的服务器标识信息的增添操作、对第一服务器的服务器标识信息的删除操作、对权限时间的修改操作、对第一登录密码和第二登录密码的修改操作等。Wherein, the update operation includes an operation of adding the server identification information of the second server, an operation of deleting the server identification information of the first server, an operation of modifying the authority time, an operation of modifying the first login password and the second login password, etc. .
在本实施例中,通过接收对目标登录权限信息执行更新操作的更新请求,根据更新请求对目标登录权限信息执行相应的更新操作,实现了对用户相关数据的管控,有效保证了认证中心中存储的用户相关数据的准确性。In this embodiment, by receiving an update request for performing an update operation on the target login authority information, and performing a corresponding update operation on the target login authority information according to the update request, the management and control of the user-related data is realized, and the storage in the authentication center is effectively guaranteed. accuracy of user-related data.
在一个实施例中,创建并存储用户相关数据与用户标识信息之间的第一对应关系之后,若监测到用户相关数据中的用户类别发生变化,则可确定变化后的用户类别,并确定属于变化后的用户类别的第三用户对应的登录权限信息,进而将用户相关数据中的目标登录权限信息更新为第三用户对应的登录权限信息。In one embodiment, after the first correspondence between the user-related data and the user identification information is created and stored, if a change in the user category in the user-related data is monitored, the changed user category can be determined, and it is determined that the user category belongs to the user category. The login authority information corresponding to the third user of the changed user category is updated, and the target login authority information in the user-related data is updated to the login authority information corresponding to the third user.
其中,第三用户包括属于变化后的用户类别的所有用户。Wherein, the third user includes all users belonging to the changed user category.
在本实施例中,能够实时监测到用户相关数据中的用户类别是否发生变化,并在用户类别发生变化时对用户相关数据中的目标登录权限信息进行相 应更新,从而确保对不同类别的用户所具有的登录权限信息的准确管控,防止用户类别变化后其对应的登录权限信息有误而影响用户登录服务器的情况。In this embodiment, whether the user category in the user-related data changes can be monitored in real time, and when the user category changes, the target login authority information in the user-related data is updated accordingly, so as to ensure that users of different categories are Accurate management and control of the login authority information it has to prevent users from logging into the server due to incorrect login authority information after the user category is changed.
认证中心在接收目标服务器发送的、第一用户针对目标服务器的登录请求之后,可根据登录请求携带的信息对第一用户登录目标服务器进行认证。具体执行方式如下所述。After receiving the login request of the first user for the target server sent by the target server, the authentication center may authenticate the login of the first user to the target server according to the information carried in the login request. The specific implementation is as follows.
在一个实施例中,可根据第一用户的用户标识信息,获取预先创建的与用户标识信息对应的用户相关数据,并基于用户相关数据确定第一用户的用户类别。In one embodiment, pre-created user-related data corresponding to the user identification information may be acquired according to the user identification information of the first user, and the user category of the first user may be determined based on the user-related data.
确定第一用户的用户类别之后,可基于第一用户针对目标服务器的登录请求及第一用户的用户类别对应的目标登录权限信息,对目标服务器获取用户相关数据的第二权限进行认证,若第二权限认证通过,则将用户相关数据发送至目标服务器。After the user category of the first user is determined, based on the first user's login request to the target server and the target login authority information corresponding to the user category of the first user, the second authority of the target server to obtain the user-related data may be authenticated. If the authorization authentication is passed, the user-related data will be sent to the target server.
若在第一用户的用户类别对应的目标登录权限信息中的至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内时,则确定第二权限认证通过。If the server identification information of at least one first server in the target login authority information corresponding to the user category of the first user includes the server identification information of the target server, and the reception time of the login request is within the authority time, it is determined that the second Permission authentication passed.
若监测到登录权限信息中目标服务器对应的权限时间过期,例如,目标服务器的服务器标识信息为服务器X,服务器X对应的权限到期时间为2020年5月,当前认证时间为2020年6月,则确定第二权限认证不通过。可见,通过在登录权限信息中设置权限时间,实现了自动回收用户登录服务器的权限,以及授予用户临时登录服务器的权限的功能。If it is detected that the authorization time corresponding to the target server in the login authorization information has expired, for example, the server identification information of the target server is server X, the authorization expiry time corresponding to server X is May 2020, and the current authentication time is June 2020. Then it is determined that the second authority authentication fails. It can be seen that by setting the authority time in the login authority information, the functions of automatically reclaiming the user's authority to log in to the server and granting the user the authority to temporarily log in to the server are realized.
本实施例中,认证中心将用户相关数据发送至目标服务器之后,目标服务器可基于用户相关数据判断第一用户是否为合法用户,若目标服务器判定第一用户为合法用户,则可将判定结果反馈认证中心,以使认证中心执行对第一用户登录目标服务器的第一权限进行认证的步骤。In this embodiment, after the authentication center sends the user-related data to the target server, the target server can determine whether the first user is a legal user based on the user-related data, and if the target server determines that the first user is a legal user, the determination result can be fed back an authentication center, so that the authentication center performs the step of authenticating the first authority of the first user to log in to the target server.
其中,目标服务器将判定结果反馈至认证中心的方式可包括:仅将判定结果反馈至认证中心,或者,通过认证中心预设的用于接收合法用户数据的接口,将第一用户针对目标服务器的登录请求发送至认证中心。认证中心预 设的用于接收合法用户数据的接口可为上述实施例中列举的查询用户登录公钥接口。The manner in which the target server feeds back the judgment result to the authentication center may include: feeding back only the judgment result to the authentication center, or, through an interface preset by the authentication center for receiving legal user data, sending the first user to the target server's data. The login request is sent to the authentication center. The interface preset by the authentication center for receiving legal user data may be the public key interface for querying user login listed in the above embodiment.
当认证中心的指定数据接口接收到目标服务器发送的、第一用户针对目标服务器的登录请求时,可触发认证中心对目标服务器获取用户相关数据的第二权限进行认证。When the designated data interface of the authentication center receives the first user's login request for the target server sent by the target server, the authentication center can be triggered to authenticate the second authority of the target server to obtain user-related data.
在一个实施例中,认证中心的指定数据接口可包括上述实施例中列举的查询用户接口、查询用户属组接口和查询用户密码接口。若第一用户与目标服务器采用ssh(Secure Shell,安全外壳协议)进行数据传输,则目标服务器在接收到第一用户的登录请求时,触发sshd进程调用名称解析nss服务在目标服务器的本地文件中查询第一用户的uid、gid、家目录路径等用户相关数据,在查询不到时,基于HTTPS协议、通过动态链接库(创建/usr/lib64/libnss_https.so动态链接库)分别将第一用户针对目标服务器的登录请求发送至认证中心的查询用户接口、查询用户属组接口和查询用户密码接口,以触发认证中心对目标服务器获取用户相关数据的第二权限进行认证,并在认证通过时,返回各接口中定义的用户相关数据。In one embodiment, the designated data interface of the authentication center may include the query user interface, the user group query interface, and the user password query interface listed in the above embodiment. If the first user and the target server use ssh (Secure Shell, secure shell protocol) for data transmission, the target server will trigger the sshd process to call the name resolution nss service in the local file of the target server when receiving the login request of the first user. Query the user-related data such as the uid, gid, and home directory path of the first user. If the query is not available, the first user is separated based on the HTTPS protocol through the dynamic link library (create /usr/lib64/libnss_https.so dynamic link library). The login request of the target server is sent to the query user interface, user group query interface and user password query interface of the authentication center, so as to trigger the authentication center to authenticate the second authority of the target server to obtain user-related data, and when the authentication is passed, Returns the user-related data defined in each interface.
当认证中心的另一指定数据接口接收到目标服务器发送的、第一用户针对目标服务器的登录请求时,可触发认证中心对第一用户登录目标服务器的第一权限进行认证,若第一权限认证通过,则向目标服务器返回与目标服务器对应的第二登录密码。When another designated data interface of the authentication center receives the login request of the first user for the target server sent by the target server, the authentication center can be triggered to authenticate the first authority of the first user to log in to the target server. If passed, the second login password corresponding to the target server is returned to the target server.
在一个实施例中,认证中心的另一指定数据接口可包括上述实施例中列举的查询用户登录公钥接口,第一用户与目标服务器可采用ssh协议进行数据传输。在目标服务器接收到第一用户的登录请求时,触发sshd进程通过AuthorizedKeysCommand调用shell脚本,在shell脚本中写入第一用户的登录请求,并通过HTTPS协议传递给认证中心的查询用户登录公钥接口,以触发认证中心对第一用户登录目标服务器的第一权限进行认证,并在认证通过时,返回查询用户登录公钥接口中定义的第二登录密码。In one embodiment, another designated data interface of the authentication center may include the public key interface for querying user login listed in the above embodiment, and the first user and the target server may use ssh protocol for data transmission. When the target server receives the login request of the first user, trigger the sshd process to call the shell script through AuthorizedKeysCommand, write the login request of the first user in the shell script, and pass it to the authentication center's public key interface for querying user login through the HTTPS protocol , to trigger the authentication center to authenticate the first authority of the first user to log in to the target server, and when the authentication is passed, return the second login password defined in the interface for querying the user's login public key.
其中,可预先在目标服务器的配置文件/etc/ssh/sshd_config中增加如 下配置:AuthorizedKeysCommand/bin/sh/usr/libexec/openssh/get_keys.sh%u,以使目标服务器接收到第一用户的登录请求时,触发sshd进程利用AuthorizedKeysCommand调用shell脚本,并通过shell脚本访问认证中心的查询用户登录公钥接口。Among them, the following configuration can be added to the configuration file /etc/ssh/sshd_config of the target server in advance: AuthorizedKeysCommand/bin/sh/usr/libexec/openssh/get_keys.sh%u, so that the target server receives the login of the first user When the request is made, the sshd process is triggered to use the AuthorizedKeysCommand to call the shell script, and the shell script accesses the authentication center's query user login public key interface.
在上述实施例中,认证中心根据第一用户针对目标服务器的登录请求及第一用户的用户类别对应的目标登录权限信息,对目标服务器获取用户相关数据的第二权限进行认证,并在第二权限认证通过时将用户相关数据发送至目标服务器,以使目标服务器基于用户相关数据判断第一用户是否为合法用户,若目标服务器判定第一用户为合法用户,则由认证中心执行对第一用户登录目标服务器的第一权限进行认证的步骤。可见,上述实施例能够根据用户类别对用户登录服务器的权限进行认证,实现了按照各用户类别对用户登录服务器的权限进行认证及管控的效果,相较于传统的分别针对用户个人管理权限信息的方式而言,提升了对服务器登录权限的管控的便捷性,管控效果更优。In the above embodiment, the authentication center authenticates the second authority of the target server to obtain the user-related data according to the first user's login request to the target server and the target login authority information corresponding to the user category of the first user, and in the second When the authority authentication is passed, the user-related data is sent to the target server, so that the target server can determine whether the first user is a legal user based on the user-related data. The first authority to log in to the target server is authenticated. It can be seen that the above embodiment can authenticate the user's authority to log in to the server according to the user category, and realize the effect of authenticating and managing the user's authority to log in to the server according to each user category. In terms of method, the convenience of management and control of server login permissions is improved, and the management and control effect is better.
根据上述实施例,在需要更改用户登录服务器的权限信息时,只需在用户相关数据中更改用户所属的用户类别、或者只需更改用户所属的用户类别对应的权限信息即可,而无需针对每个用户分别更改用户的个人信息及权限信息,从而使得服务器登录权限的管控效果更加灵活、快捷。According to the above embodiment, when it is necessary to change the permission information of a user to log in to the server, it is only necessary to change the user category to which the user belongs in the user-related data, or only to change the permission information corresponding to the user category to which the user belongs. Each user can change the user's personal information and authority information respectively, so that the control effect of server login authority is more flexible and fast.
在一个实施例中,基于第一用户的用户类别确定属于该用户类别的第二用户对应的目标登录权限信息时,可获取用户相关数据中的、与第一用户的用户类别相匹配的目标登录权限信息;或者可根据认证中心中预先创建的各用户类别与登录权限信息之间的第二对应关系,确定与第一用户的用户类别相匹配的目标登录权限信息。In one embodiment, when the target login authority information corresponding to the second user belonging to the user category is determined based on the user category of the first user, the target login in the user-related data that matches the user category of the first user can be obtained authority information; or the target login authority information that matches the user category of the first user may be determined according to the second correspondence between each user category and the login authority information pre-created in the authentication center.
在一个实施例中,认证中心可基于第一用户的用户类别,获取该用户类别对应的用户相关数据,从而得到用户相关数据中记录的与第一用户的用户类别相匹配的目标登录权限信息。In one embodiment, the authentication center may acquire user-related data corresponding to the user category based on the user category of the first user, thereby obtaining target login authority information recorded in the user-related data that matches the user category of the first user.
在一个实施例中,认证中心可根据第一用户的用户类别、以及认证中心 中预先创建的各用户类别与登录权限信息之间的第二对应关系,确定出与第一用户的用户类别相匹配的目标登录权限信息。In one embodiment, the authentication center may determine that the user category of the first user matches the user category of the first user according to the user category of the first user and the second correspondence between each user category and login authority information pre-created in the authentication center target login permission information.
在本实施例中,能够通过多种方式确定用户的登录权限信息,提高了确定登录权限信息的灵活性。In this embodiment, the user's login authority information can be determined in various ways, which improves the flexibility of determining the login authority information.
在一个实施例中,可根据第一用户针对目标服务器的登录请求和第一用户的用户类别对应的目标登录权限信息,判断至少一个第一服务器的服务器标识信息中是否包含目标服务器的服务器标识信息、且登录请求的接收时间是否位于权限时间内,若至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内,则确定第一权限认证通过。In one embodiment, it may be determined whether the server identification information of the at least one first server includes the server identification information of the target server according to the first user's login request for the target server and the target login authority information corresponding to the user category of the first user. , and whether the reception time of the login request is within the authority time, if the server identification information of at least one first server contains the server identification information of the target server, and the reception time of the login request is within the authority time, then it is determined that the first authority authentication passes .
在本实施例中,在对第一用户登录目标服务器的第一权限进行认证时,能够根据多种因素得到权限认证的结果,因此有效提高了认证结果的准确性。In this embodiment, when authenticating the first authority of the first user to log in to the target server, the authority authentication result can be obtained according to various factors, thus effectively improving the accuracy of the authentication result.
如图3所示,是根据本申请另一实施例的服务器登录方法的示意性流程图,应用于如图1中所示的目标服务器,图3的方法可包括:As shown in FIG. 3 , it is a schematic flowchart of a server login method according to another embodiment of the present application, which is applied to the target server as shown in FIG. 1 , and the method in FIG. 3 may include:
S302,接收第一用户针对目标服务器的登录请求。S302: Receive a login request from the first user for the target server.
其中,登录请求包括第一用户的用户标识信息、目标服务器的服务器标识信息和用于登录目标服务器的第一登录密码。The login request includes user identification information of the first user, server identification information of the target server, and a first login password used to log in to the target server.
该步骤中登录请求的具体内容已在S202中详细叙述,此处不再赘述。The specific content of the login request in this step has been described in detail in S202, and will not be repeated here.
S304,将登录请求转发至认证中心。S304, forward the login request to the authentication center.
其中,认证中心用于根据第一用户的用户标识信息,确定第一用户的用户类别,并基于第一用户的用户类别对第一用户登录目标服务器的第一权限进行认证。The authentication center is configured to determine the user category of the first user according to the user identification information of the first user, and authenticate the first permission of the first user to log in to the target server based on the user category of the first user.
S306,接收认证中心发送的与目标服务器对应的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配。S306: Receive a second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match.
其中,第二登录密码由认证中心对第一权限认证通过后发送至目标服务器。The second login password is sent to the target server by the authentication center after passing the authentication of the first authority.
S308,根据判断结果确定是否允许第一用户登录目标服务器。S308, according to the judgment result, determine whether to allow the first user to log in to the target server.
其中,若第一登录密码和第二登录密码相匹配,则允许第一用户登录目标服务器;若第一登录密码和第二登录密码不匹配,则不允许第一用户登录目标服务器。Wherein, if the first login password and the second login password match, the first user is allowed to log in to the target server; if the first login password and the second login password do not match, the first user is not allowed to log in to the target server.
若目标服务器对应的第一登录密码和第二登录密码是相同的密码,则当第一登录密码和第二登录密码相同时,确定第一登录密码和第二登录密码相匹配;当第一登录密码和第二登录密码不同时,确定第一登录密码和第二登录密码不匹配。If the first login password and the second login password corresponding to the target server are the same password, then when the first login password and the second login password are the same, it is determined that the first login password and the second login password match; When the password and the second login password are different, it is determined that the first login password and the second login password do not match.
若目标服务器对应的第一登录密码和第二登录密码是相互匹配的密钥对,则可预设密钥对的匹配关系,当第一登录密码和第二登录密码满足上述匹配关系时,确定第一登录密码和第二登录密码相匹配;当第一登录密码和第二登录密码不满足上述匹配关系时,确定第一登录密码和第二登录密码不匹配。If the first login password and the second login password corresponding to the target server are key pairs that match each other, the matching relationship of the key pair can be preset. When the first login password and the second login password satisfy the above matching relationship, determine The first login password and the second login password match; when the first login password and the second login password do not satisfy the above matching relationship, it is determined that the first login password and the second login password do not match.
在一个实施例中,目标服务器可支持ssh协议。在目标服务器确定允许第一用户登录时,可触发sshd进程调用目标服务器PAM模块的session模块,由session模块基于用户相关数据中第一用户对应的家目录路径信息,创建第一用户的家目录,以便存储第一用户的数据。In one embodiment, the target server may support the ssh protocol. When the target server determines to allow the first user to log in, the sshd process can be triggered to call the session module of the PAM module of the target server, and the session module creates the first user's home directory based on the home directory path information corresponding to the first user in the user-related data, in order to store the data of the first user.
采用本申请实施例的技术方案,目标服务器通过接收第一用户针对目标服务器的登录请求,将登录请求转发至认证中心,接收认证中心发送的与目标服务器对应的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配,根据判断结果确定是否允许第一用户登录目标服务器。可见,该技术方案通过目标服务器和认证中心之间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。By adopting the technical solutions of the embodiments of the present application, the target server receives the login request from the first user to the target server, forwards the login request to the authentication center, receives the second login password corresponding to the target server sent by the authentication center, and judges the first Whether the login password matches the second login password, it is determined whether the first user is allowed to log in to the target server according to the judgment result. It can be seen that in this technical solution, through the interaction between the target server and the authentication center, the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center, without storing user-related data in each server. Compared with the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. data, thereby avoiding information redundancy and saving server storage resources.
在一个实施例中,接收认证中心发送的与目标服务器对应的第二登录密码之前,可接收认证中心发送的用户相关数据,基于第一用户针对目标服务 器的登录请求和用户相关数据,判断第一用户是否为合法用户,若第一用户为合法用户,则执行接收认证中心发送的与目标服务器对应的第二登录密码的步骤。In one embodiment, before receiving the second login password corresponding to the target server sent by the authentication center, the user-related data sent by the authentication center may be received, and based on the first user's login request for the target server and the user-related data, determine the first Whether the user is a legal user, if the first user is a legal user, the step of receiving the second login password corresponding to the target server sent by the authentication center is performed.
在一个实施例中,目标服务器可支持ssh协议,在目标服务器接收到认证中心发送的用户相关数据时,可触发sshd进程调用目标服务器PAM模块的auth接口,验证第一用户账户的合法性,例如验证第一用户的用户标识信息和第一登录密码是否准确。并调用目标服务器PAM模块的account接口,验证第一用户有权登录的服务器和各服务器对应的权限时间。In one embodiment, the target server can support the ssh protocol, and when the target server receives the user-related data sent by the authentication center, the sshd process can be triggered to call the auth interface of the PAM module of the target server to verify the legitimacy of the first user account, for example Verify whether the user identification information of the first user and the first login password are accurate. And call the account interface of the PAM module of the target server to verify the server to which the first user has the right to log in and the authorization time corresponding to each server.
在本实施例中,通过接收认证中心发送的用户相关数据,基于第一用户针对目标服务器的登录请求和用户相关数据,判断第一用户是否为合法用户,并在确定第一用户为合法用户时,执行接收认证中心发送的与目标服务器对应的第二登录密码的步骤,由于进行了多重验证,因此有效保证了用户登录服务器过程中数据交互的安全性。In this embodiment, by receiving the user-related data sent by the authentication center, based on the first user's login request to the target server and the user-related data, it is determined whether the first user is a legal user, and when it is determined that the first user is a legal user , and execute the step of receiving the second login password corresponding to the target server sent by the authentication center. Since multiple verifications are performed, the security of data interaction in the process of user login to the server is effectively ensured.
在一个实施例中,基于第一用户针对目标服务器的登录请求和用户相关数据,判断第一用户是否为合法用户时,可判断至少一个第一服务器的服务器标识信息中是否包含目标服务器的服务器标识信息、且登录请求的接收时间是否位于权限时间内,若至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内,则确定第一用户为合法用户。In one embodiment, when determining whether the first user is a legitimate user based on the first user's login request to the target server and user-related data, it may be determined whether the server identification information of at least one first server includes the server identification of the target server. information, and whether the reception time of the login request is within the authority time, if the server identification information of at least one first server contains the server identification information of the target server, and the reception time of the login request is within the authority time, it is determined that the first user is legitimate user.
在本实施例中,根据多种因素(至少一个第一服务器的服务器标识信息中是否包含目标服务器的服务器标识信息、且登录请求的接收时间是否位于权限时间内)对用户的合法性进行判断,在至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内时,确定第一用户为合法用户,有效提高了判断结果的准确性。In this embodiment, the legitimacy of the user is judged according to various factors (whether the server identification information of the at least one first server includes the server identification information of the target server, and whether the login request is received within the authorized time period), When the server identification information of at least one first server includes the server identification information of the target server and the receiving time of the login request is within the authority time, it is determined that the first user is a legitimate user, which effectively improves the accuracy of the judgment result.
图4是根据本申请另一实施例的一种服务器登录方法的示意性流程图。本实施例中,服务器登录方法应用于图1中所示的服务器登录系统,通过认证中心与目标服务器之间的交互,实现用户安全登录至服务器的效果。图4 的方法可包括:FIG. 4 is a schematic flowchart of a server login method according to another embodiment of the present application. In this embodiment, the server login method is applied to the server login system shown in FIG. 1 , and through the interaction between the authentication center and the target server, the effect of the user safely logging in to the server is realized. The method of Figure 4 may include:
S401,认证中心获取第一用户对应的用户相关数据,并创建及存储用户相关数据与用户标识信息之间的第一对应关系。S401, an authentication center acquires user-related data corresponding to a first user, and creates and stores a first correspondence between the user-related data and user identification information.
在一个实施例中,创建并存储用户相关数据与用户标识信息之间的第一对应关系之后,可接收对目标登录权限信息执行更新操作的更新请求,根据更新请求对目标登录权限信息执行相应的更新操作。In one embodiment, after the first correspondence between the user-related data and the user identification information is created and stored, an update request for performing an update operation on the target login authority information may be received, and a corresponding update operation may be performed on the target login authority information according to the update request. update operation.
其中,更新操作包括对第二服务器的服务器标识信息的增添操作、对第一服务器的服务器标识信息的删除操作、对权限时间的修改操作、对第一登录密码和第二登录密码的修改操作等。Wherein, the update operation includes an operation of adding the server identification information of the second server, an operation of deleting the server identification information of the first server, an operation of modifying the authority time, an operation of modifying the first login password and the second login password, etc. .
在一个实施例中,创建并存储用户相关数据与用户标识信息之间的第一对应关系之后,若监测到用户相关数据中的用户类别发生变化,则可确定变化后的用户类别,并确定属于变化后的用户类别的第三用户对应的登录权限信息,将用户相关数据中的目标登录权限信息更新为第三用户对应的登录权限信息。In one embodiment, after the first correspondence between the user-related data and the user identification information is created and stored, if a change in the user category in the user-related data is monitored, the changed user category can be determined, and it is determined that the user category belongs to the user category. For the login authority information corresponding to the third user of the changed user category, the target login authority information in the user-related data is updated to the login authority information corresponding to the third user.
上述实施例在图2对应的实施例中已详细叙述,此处不再赘述。The above embodiments have been described in detail in the embodiment corresponding to FIG. 2 , and are not repeated here.
S402,认证中心将用户标识信息和各第一服务器分别对应的第一登录密码发送给第一用户,以使第一用户基于用户标识信息和第一登录密码向对应的服务器发起登录请求。S402, the authentication center sends the user identification information and the first login password corresponding to each first server to the first user, so that the first user initiates a login request to the corresponding server based on the user identification information and the first login password.
S403,目标服务器接收第一用户针对目标服务器的登录请求,并将登录请求转发至认证中心。S403, the target server receives a login request from the first user to the target server, and forwards the login request to the authentication center.
其中,登录请求包括第一用户的用户标识信息、目标服务器的服务器标识信息和用于登录目标服务器的第一登录密码。The login request includes user identification information of the first user, server identification information of the target server, and a first login password for logging in to the target server.
S404,认证中心根据接收到的登录请求中的第一用户的用户标识信息,获取预先创建的与用户标识信息对应的用户相关数据,并基于用户相关数据确定第一用户的用户类别。S404, the authentication center obtains pre-created user-related data corresponding to the user identification information according to the user identification information of the first user in the received login request, and determines the user category of the first user based on the user-related data.
其中,用户类别包括用户身份、用户等级、所属用户组等。The user category includes user identity, user level, user group to which they belong, and the like.
S405,认证中心基于第一用户的用户类别,确定属于该用户类别的第二 用户对应的目标登录权限信息。S405, the authentication center determines, based on the user category of the first user, target login authority information corresponding to the second user belonging to the user category.
在一个实施例中,认证中心可基于第一用户的用户类别,获取该用户类别对应的用户相关数据,从而得到用户相关数据中记录的与第一用户的用户类别相匹配的目标登录权限信息。In one embodiment, the authentication center may acquire user-related data corresponding to the user category based on the user category of the first user, thereby obtaining target login authority information recorded in the user-related data that matches the user category of the first user.
在一个实施例中,认证中心可根据第一用户的用户类别、以及认证中心中预先创建的各用户类别与登录权限信息之间的第二对应关系,确定出与第一用户的用户类别相匹配的目标登录权限信息。In one embodiment, the authentication center may determine that the user category of the first user matches the user category of the first user according to the user category of the first user and the second correspondence between each user category and login authority information pre-created in the authentication center target login permission information.
其中,目标登录权限信息包括第二用户有权登录的至少一个第一服务器的服务器标识信息、各第一服务器分别对应的权限时间、各第一服务器分别对应的第一登录密码和第二登录密码等。The target login authority information includes server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first login password and second login password corresponding to each first server respectively Wait.
S406,认证中心根据第一用户所属用户类别对应的目标登录权限信息,对目标服务器获取用户相关数据的第二权限进行认证;若第二权限认证通过,则执行S407;若第二权限认证不通过,则执行S414。S406, the authentication center authenticates the second authority of the target server to obtain the user-related data according to the target login authority information corresponding to the user category to which the first user belongs; if the second authority authentication passes, execute S407; if the second authority authentication fails , then execute S414.
S407,认证中心将用户相关数据发送至目标服务器。S407, the authentication center sends the user-related data to the target server.
S408,目标服务器根据接收到的用户相关数据,确定第一用户是否为合法用户;若是,则执行S409;若否,则执行S415。S408, the target server determines whether the first user is a legitimate user according to the received user-related data; if yes, executes S409; if not, executes S415.
其中,目标服务器通过判断至少一个第一服务器的服务器标识信息中是否包含目标服务器的服务器标识信息、且登录请求的接收时间是否位于权限时间内,来确定第一用户是否为合法用户。The target server determines whether the first user is a legal user by judging whether the server identification information of the at least one first server includes the server identification information of the target server and whether the login request is received within the authority time.
若至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内,则目标服务器确定第一用户为合法用户;若至少一个第一服务器的服务器标识信息中不包含目标服务器的服务器标识信息、且登录请求的接收时间不位于权限时间内,则目标服务器确定第一用户为不合法用户。If the server identification information of the at least one first server includes the server identification information of the target server, and the receiving time of the login request is within the authority time, the target server determines that the first user is a legitimate user; if the server identification information of the at least one first server If the information does not include the server identification information of the target server, and the receiving time of the login request is not within the authority time, the target server determines that the first user is an illegal user.
S409,目标服务器确定第一用户为合法用户。S409, the target server determines that the first user is a legitimate user.
S410,认证中心根据第一用户所属用户类别对应的目标登录权限信息,对第一用户登录目标服务器的第一权限进行认证;若第一权限认证通过,则 执行S411;若第一权限认证不通过,则执行S414。S410, the authentication center authenticates the first authority of the first user to log in to the target server according to the target login authority information corresponding to the user category to which the first user belongs; if the first authority authentication passes, execute S411; if the first authority authentication fails , then execute S414.
S411,认证中心向目标服务器返回与目标服务器对应的第二登录密码。S411, the authentication center returns the second login password corresponding to the target server to the target server.
S412,目标服务器接收认证中心发送的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配;若相匹配,则执行S413;若不匹配,则执行S416。S412, the target server receives the second login password sent by the authentication center, and judges whether the first login password and the second login password match; if they match, execute S413; if they do not match, execute S416.
该步骤中,判断第一登录密码和第二登录密码是否相匹配的方法与S308中说明的判断方法相同,此处不再赘述。In this step, the method of judging whether the first login password and the second login password match is the same as the determination method described in S308, and will not be repeated here.
S413,目标服务器允许第一用户登录目标服务器。S413, the target server allows the first user to log in to the target server.
S414,认证中心向目标服务器发送空数据,之后执行S416。S414, the authentication center sends empty data to the target server, and then executes S416.
S415,目标服务器确定第一用户为不合法用户,之后执行S416。S415, the target server determines that the first user is an illegal user, and then executes S416.
S416,目标服务器不允许第一用户登录目标服务器。S416, the target server does not allow the first user to log in to the target server.
本申请实施例提供的服务器登录方法可应用于多种场景下,如学校中的师生请求登录至服务器、公司中的普通职员和管理员请求登录至服务器等。下面以公司中的职员A使用用户标识信息a请求登录至服务器X的场景为例,说明服务器登录方法的具体过程。The server login method provided by the embodiments of the present application can be applied in various scenarios, such as requests from teachers and students in schools to log in to the server, and requests from ordinary staff and administrators in companies to log in to the server. The following describes the specific process of the server login method by taking the scenario where employee A in the company requests to log in to server X using user identification information a as an example.
在某公司中,假设服务器登录系统采用非对称加密算法实现目标服务器的安全登录,第一登录密码为私钥,第二登录密码为与第一登录密码相匹配的公钥,并预设公司中的用户类别包括普通职员和管理员,普通职员和管理员分别对应各自的登录权限信息。例如,普通职员对应的登录权限信息包括普通职员有权登录的服务器的服务器标识信息,如服务器X、服务器Y。各服务器分别对应的权限时间可包括服务器X对应的权限时间(如权限到期时间:2020年5月)和服务器Y对应的权限时间(如权限到期时间:2020年12月)。各服务器分别对应的第一登录密码和第二登录密码可包括服务器X对应的公钥和私钥、服务器Y对应的公钥和私钥。In a company, it is assumed that the server login system adopts an asymmetric encryption algorithm to realize the secure login of the target server, the first login password is the private key, and the second login password is the public key matching the first login password. The user categories include ordinary staff and administrators, and ordinary staff and administrators correspond to their respective login authority information. For example, the login authority information corresponding to an ordinary employee includes server identification information of a server to which the ordinary employee has the right to log in, such as server X and server Y. The permission time corresponding to each server may include the permission time corresponding to server X (eg, permission expiration time: May 2020) and the permission time corresponding to server Y (eg, permission expiration time: December 2020). The first login password and the second login password corresponding to each server may include the public key and private key corresponding to server X, and the public key and private key corresponding to server Y.
再例如,管理员对应的登录权限信息包括管理员有权登录的服务器的服务器标识信息,如服务器X、服务器Y、服务器Z等。各服务器分别对应的权限时间可包括服务器X对应的权限时间(如权限到期时间:2020年5月)、 服务器Y对应的权限时间(如权限到期时间:2020年12月)、服务器Z对应的权限时间(如权限到期时间:2020年11月)。各服务器分别对应的第一登录密码和第二登录密码可包括服务器X对应的公钥和私钥、服务器Y对应的公钥和私钥、服务器Z对应的公钥和私钥。For another example, the login authority information corresponding to the administrator includes server identification information of servers to which the administrator has the right to log in, such as server X, server Y, server Z, and the like. The permission time corresponding to each server may include the permission time corresponding to server X (such as permission expiration time: May 2020), the permission time corresponding to server Y (such as permission expiration time: December 2020), and the corresponding permission time of server Z. Permission time (such as permission expiration time: November 2020). The first login password and the second login password corresponding to each server may include the public key and private key corresponding to server X, the public key and private key corresponding to server Y, and the public key and private key corresponding to server Z.
本实施例中,假设职员A对应的用户类别为普通职员。若在创建并存储用户相关数据与用户标识信息a之间的第一对应关系之后,监测到用户相关数据中的用户类别变化为管理员,则可确定管理员对应的登录权限信息,并将用户相关数据中的登录权限信息更新为管理员对应的登录权限信息。In this embodiment, it is assumed that the user category corresponding to employee A is an ordinary employee. If after the first correspondence between the user-related data and the user identification information a is created and stored, it is detected that the user category in the user-related data is changed to an administrator, the login authority information corresponding to the administrator can be determined, and the user The login permission information in the related data is updated to the login permission information corresponding to the administrator.
由于认证中心按照各用户类别对用户登录服务器的权限进行认证及管控,因此,若要更改职员A登录服务器的权限信息,可只在职员A的用户相关数据中更改职员A所属的用户类别、或者只更改职员A所属的用户类别对应的权限信息。Since the authentication center authenticates and controls the permissions of users to log in to the server according to each user category, if you want to change the permission information of employee A to log in to the server, you can only change the user category to which employee A belongs in the user-related data of employee A, or Only the permission information corresponding to the user category to which employee A belongs is changed.
在职员A使用用户标识信息a和第一登录密码请求登录至服务器X时,由服务器X接收职员A针对服务器X的登录请求,并将登录请求转发至认证中心。认证中心接收到职员A针对服务器X的登录请求,根据登录请求中携带的用户标识信息a确定职员A所属的用户类别。假设认证中心确定出用户类别为普通职员,则可进一步确定普通职员对应的登录权限信息,并根据普通职员对应的登录权限信息确定职员A是否有登录服务器X的权限。若有,则认证中心将服务器X对应的第二登录密码发送至服务器X。若服务器X判定第一登录密码和第二登录密码相匹配,则允许职员A登录。此外,对于公司中的职员依权限登录服务器,还可按照职员所属部门来划分用户类别,例如职员A属于XX部门,职员B属于YY部门。并且,认证中心预先配置不同部门下的职员分别对应的登录权限信息,用于约束各职员对公司内服务器的登录权限。当某职员想要登录某一服务器时,认证中心会根据该职员所属部门去确定其是否有权限登录服务器。具体的权限判断方法已在上述实施例中详述,此处不再重复。When employee A requests to log in to server X using the user identification information a and the first login password, server X receives the login request from employee A to server X, and forwards the login request to the authentication center. The authentication center receives the login request of the employee A to the server X, and determines the user category to which the employee A belongs according to the user identification information a carried in the login request. Assuming that the authentication center determines that the user category is an ordinary employee, it can further determine the login authority information corresponding to the ordinary employee, and determine whether employee A has the right to log in to the server X according to the login authority information corresponding to the ordinary employee. If so, the authentication center sends the second login password corresponding to the server X to the server X. If the server X determines that the first login password and the second login password match, the employee A is allowed to log in. In addition, for employees in the company to log in to the server according to their authority, the user category can also be divided according to the department to which the employee belongs. For example, employee A belongs to the XX department, and employee B belongs to the YY department. In addition, the authentication center preconfigures the login authority information corresponding to the employees in different departments, so as to restrict the login authority of each employee to the server in the company. When an employee wants to log in to a server, the authentication center will determine whether the employee has the right to log in to the server according to the department to which the employee belongs. The specific authority judgment method has been described in detail in the above embodiments, and will not be repeated here.
可见,采用上述实施例的技术方案,能够通过目标服务器和认证中心之 间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。并且,通过根据用户类别对用户登录服务器的权限进行认证,实现了按照各用户类别对用户登录服务器的权限进行认证及管控的效果,相较于传统的分别针对用户个人管理权限信息的方式而言,该技术方案提升了对服务器登录权限的管控的便捷性,管控效果更优。It can be seen that by adopting the technical solutions of the above-mentioned embodiments, the login of the target server can be realized by obtaining the second login password corresponding to the target server from the authentication center through the interaction between the target server and the authentication center, without needing to log in to each server. Compared with the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, it does not need to be repeated in each server. Create user-related data of the same user, thereby avoiding information redundancy and saving server storage resources. In addition, by authenticating the user's authority to log in to the server according to the user category, the effect of authenticating and controlling the authority of the user to log in to the server according to each user category is realized, compared with the traditional way of individually managing authority information for users. , the technical solution improves the convenience of management and control of the server login authority, and the management and control effect is better.
综上,已经对本主题的特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作可以按照不同的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序,以实现期望的结果。在某些实施方式中,多任务处理和并行处理可以是有利的。In conclusion, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain embodiments, multitasking and parallel processing may be advantageous.
以上为本申请实施例提供的服务器登录方法,基于同样的思路,本申请实施例还提供一种服务器登录装置。The server login method provided by the embodiment of the present application is described above. Based on the same idea, the embodiment of the present application also provides a server login device.
图5是根据本申请一实施例的一种服务器登录装置的结构示意图,如图5所示,服务器登录装置包括:第一接收模块510,用于接收目标服务器发送的、第一用户针对目标服务器的登录请求;登录请求包括第一用户的用户标识信息、目标服务器的服务器标识信息和用于登录目标服务器的第一登录密码;第一确定模块520,用于根据第一用户的用户标识信息,确定第一用户的用户类别;用户类别包括用户身份、用户等级、所属用户组中的至少一项;第一执行模块530,用于基于第一用户的用户类别,确定属于用户类别的第二用户对应的目标登录权限信息,并根据目标登录权限信息,对第一用户登录目标服务器的第一权限进行认证;返回模块540,用于若第一权限认证通过,则向目标服务器返回与目标服务器对应的第二登录密码,以使目标服务器根据第一登录密码及第二登录密码判断是否允许第一用户登录目标服务器。FIG. 5 is a schematic structural diagram of a server login device according to an embodiment of the present application. As shown in FIG. 5 , the server login device includes: a first receiving module 510, configured to receive a message sent by a target server and sent by the first user to the target server The login request includes the user identification information of the first user, the server identification information of the target server and the first login password used to log in to the target server; the first determination module 520 is used for, according to the user identification information of the first user, Determine the user category of the first user; the user category includes at least one of user identity, user level, and user group to which he belongs; the first execution module 530 is configured to determine, based on the user category of the first user, a second user belonging to the user category The corresponding target login authority information, and according to the target login authority information, the first authority of the first user to log in to the target server is authenticated; the return module 540 is used to return the target server corresponding to the target server if the first authority authentication is passed. The second login password, so that the target server determines whether to allow the first user to log in to the target server according to the first login password and the second login password.
在一个实施例中,第一确定模块520包括:获取单元,用于根据第一用户的用户标识信息,获取预先创建的与用户标识信息对应的用户相关数据;用户相关数据至少包括用户类别和目标登录权限信息;目标登录权限信息包括以下至少一项:第二用户有权登录的至少一个第一服务器的服务器标识信息、各第一服务器分别对应的权限时间、各第一服务器分别对应的第一登录密码和第二登录密码;第一确定单元,用于基于用户相关数据,确定第一用户的用户类别。In one embodiment, the first determining module 520 includes: an acquiring unit, configured to acquire pre-created user-related data corresponding to the user identification information according to the user identification information of the first user; the user-related data at least include a user category and a target Login authority information; target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first server corresponding to each first server a login password and a second login password; and a first determination unit, configured to determine the user category of the first user based on user-related data.
在一个实施例中,服务器登录装置还包括:获取模块,用于获取第一用户对应的用户相关数据;创建及存储模块,用于创建并存储用户相关数据与用户标识信息之间的第一对应关系;第一发送模块,用于将用户标识信息和各第一服务器分别对应的第一登录密码发送给第一用户,以使第一用户基于用户标识信息和第一登录密码向对应的服务器发起登录请求。In one embodiment, the server login apparatus further includes: an acquisition module for acquiring user-related data corresponding to the first user; a creation and storage module for creating and storing the first correspondence between the user-related data and the user identification information relationship; the first sending module is used to send the user identification information and the first login password corresponding to each first server to the first user, so that the first user initiates the corresponding server based on the user identification information and the first login password. Login request.
在一个实施例中,第一执行模块530包括:执行单元,用于获取用户相关数据中的、与第一用户的用户类别相匹配的目标登录权限信息;或者,In one embodiment, the first execution module 530 includes: an execution unit configured to acquire target login permission information in the user-related data that matches the user category of the first user; or,
根据认证中心中预先创建的各用户类别与登录权限信息之间的第二对应关系,确定与第一用户的用户类别相匹配的目标登录权限信息。According to the second correspondence between each user category and the login authority information pre-created in the authentication center, the target login authority information matching the user category of the first user is determined.
在一个实施例中,服务器登录装置还包括:第二接收模块,用于接收对目标登录权限信息执行更新操作的更新请求;更新操作包括以下至少一项:对第二服务器的服务器标识信息的增添操作、对第一服务器的服务器标识信息的删除操作、对权限时间的修改操作、对第一登录密码和第二登录密码的修改操作;第二执行模块,用于根据更新请求,对目标登录权限信息执行相应的更新操作。In one embodiment, the server login apparatus further includes: a second receiving module configured to receive an update request for performing an update operation on the target login authority information; the update operation includes at least one of the following: adding server identification information of the second server operation, deletion operation of the server identification information of the first server, modification operation of the authority time, modification operation of the first login password and the second login password; the second execution module is used for the target login authority according to the update request. The information is updated accordingly.
在一个实施例中,服务器登录装置还包括:第二确定模块,用于若监测到用户相关数据中的用户类别发生变化,则确定变化后的用户类别;第三确定模块,用于确定属于变化后的用户类别的第三用户对应的登录权限信息;In one embodiment, the server login device further includes: a second determining module, configured to determine the changed user category if the user category in the user-related data is monitored; The login authority information corresponding to the third user of the latter user category;
更新模块,用于将用户相关数据中的目标登录权限信息更新为第三用户对应的登录权限信息。The updating module is used for updating the target login authority information in the user-related data to the login authority information corresponding to the third user.
在一个实施例中,第一执行模块530包括:第一判断单元,用于判断是否满足以下条件:至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内;第二确定单元,用于若是,则确定第一权限认证通过。In one embodiment, the first execution module 530 includes: a first judging unit, configured to judge whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the time when the login request is received within the authority time; the second determining unit is configured to, if yes, determine that the first authority authentication is passed.
在一个实施例中,服务器登录装置还包括:认证模块,用于基于用户标识信息及对应的用户相关数据,对目标服务器获取用户相关数据的第二权限进行认证;第二发送模块,用于若第二权限认证通过,则将用户相关数据发送至目标服务器,以使目标服务器基于用户相关数据判断第一用户是否为合法用户;第三执行模块,用于若判定第一用户为合法用户,则执行对第一用户登录目标服务器的第一权限进行认证的步骤。In one embodiment, the server login device further includes: an authentication module, configured to authenticate the second authority of the target server to obtain the user-related data based on the user identification information and the corresponding user-related data; a second sending module, used for if After the second authority authentication is passed, the user-related data is sent to the target server, so that the target server can determine whether the first user is a legal user based on the user-related data; the third execution module is used for determining whether the first user is a legal user, then The step of authenticating the first authority of the first user to log in to the target server is performed.
采用本申请实施例的装置,认证中心通过根据目标服务器发送的、第一用户针对目标服务器的登录请求,确定第一用户的用户类别,并基于第一用户的用户类别对第一用户登录目标服务器的第一权限进行认证,在第一权限认证通过时,向目标服务器返回与目标服务器对应的第二登录密码,以使目标服务器根据第一登录密码及第二登录密码判断是否允许第一用户登录目标服务器。可见,该装置通过目标服务器和认证中心之间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。并且,通过根据用户类别对用户登录服务器的权限进行认证,实现了按照各用户类别对用户登录服务器的权限进行认证及管控的效果,相较于传统的分别针对用户个人管理权限信息的方式而言,该装置提升了对服务器登录权限的管控的便捷性,管控效果更优。Using the device of the embodiment of the present application, the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and logs the first user into the target server based on the user category of the first user. The first authority is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server judges whether to allow the first user to log in according to the first login password and the second login password. target server. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server. In the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. , thereby avoiding information redundancy and saving server storage resources. In addition, by authenticating the user's authority to log in to the server according to the user category, the effect of authenticating and controlling the authority of the user to log in to the server according to each user category is realized, compared with the traditional way of individually managing authority information for users. , the device improves the convenience of management and control of the server login authority, and the management and control effect is better.
本领域的技术人员应可理解,上述服务器登录装置能够用来实现上述认证中心执行的服务器登录方法,其中的细节描述应与前文方法部分描述类似, 为避免繁琐,此处不另赘述。Those skilled in the art should understand that the above server login device can be used to implement the server login method performed by the above authentication center, and the detailed description thereof should be similar to that described in the foregoing method part, and will not be repeated here to avoid tediousness.
图6是根据本申请一实施例的一种服务器登录装置的结构示意图,如图6所示,服务器登录装置包括:第三接收模块610,用于接收第一用户针对目标服务器的登录请求;登录请求包括第一用户的用户标识信息、目标服务器的服务器标识信息和用于登录目标服务器的第一登录密码;转发模块620,用于将登录请求转发至认证中心;认证中心用于根据第一用户的用户标识信息,确定第一用户的用户类别,并基于第一用户的用户类别对第一用户登录目标服务器的第一权限进行认证;第四执行模块630,用于接收认证中心发送的与目标服务器对应的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配;第二登录密码由认证中心对第一权限认证通过后发送至目标服务器;第四确定模块640,用于根据判断结果确定是否允许第一用户登录目标服务器。FIG. 6 is a schematic structural diagram of a server login device according to an embodiment of the present application. As shown in FIG. 6 , the server login device includes: a third receiving module 610 for receiving a login request from a first user to a target server; login The request includes the user identification information of the first user, the server identification information of the target server and the first login password used to log in to the target server; the forwarding module 620 is used to forward the login request to the authentication center; the authentication center is used for according to the first user The user identification information of the first user is determined, and based on the user category of the first user, the first authority of the first user to log in to the target server is authenticated; the fourth execution module 630 is used for receiving the information sent by the authentication center and the target server. The second login password corresponding to the server, and determine whether the first login password and the second login password match; the second login password is sent to the target server by the authentication center after passing the first authority authentication; the fourth determination module 640 is used for Whether to allow the first user to log in to the target server is determined according to the judgment result.
在一个实施例中,服务器登录装置还包括:第四接收模块,用于接收认证中心发送的用户相关数据;用户相关数据包括第一用户的用户类别和属于用户类别的第二用户对应的目标登录权限信息;目标登录权限信息包括以下至少一项:第二用户有权登录的至少一个第一服务器的服务器标识信息、各第一服务器分别对应的权限时间、各第一服务器分别对应的第一登录密码和第二登录密码;判断模块,用于基于登录请求和用户相关数据,判断第一用户是否为合法用户;第五执行模块,用于若第一用户为合法用户,则执行接收认证中心发送的与目标服务器对应的第二登录密码的步骤。In one embodiment, the server login apparatus further includes: a fourth receiving module, configured to receive user-related data sent by the authentication center; the user-related data includes the user category of the first user and the target login corresponding to the second user belonging to the user category Authority information; target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, first login corresponding to each first server password and the second login password; the judgment module is used to judge whether the first user is a legal user based on the login request and user-related data; the fifth execution module is used to receive the authentication center sending if the first user is a legal user the second login password corresponding to the target server.
在一个实施例中,判断模块包括:第二判断单元,用于判断是否满足以下条件:至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内;第三确定单元,用于若是,则确定第一用户为合法用户。In one embodiment, the judging module includes: a second judging unit for judging whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the receiving time of the login request is within the authority time inside; a third determining unit, configured to determine if the first user is a legitimate user.
采用本申请实施例的装置,目标服务器通过接收第一用户针对目标服务器的登录请求,将登录请求转发至认证中心,接收认证中心发送的与目标服务器对应的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配, 根据判断结果确定是否允许第一用户登录目标服务器。可见,该装置通过目标服务器和认证中心之间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。Using the device of the embodiment of the present application, the target server receives the login request from the first user to the target server, forwards the login request to the authentication center, receives the second login password corresponding to the target server sent by the authentication center, and determines the first login request. Whether the password matches the second login password, it is determined whether the first user is allowed to log in to the target server according to the judgment result. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server. In the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. , thereby avoiding information redundancy and saving server storage resources.
本领域的技术人员应可理解,上述服务器登录装置能够用来实现上述目标服务器执行的服务器登录方法,其中的细节描述应与前文方法部分描述类似,为避免繁琐,此处不另赘述。Those skilled in the art should understand that the above server login device can be used to implement the server login method executed by the above target server, and the detailed description thereof should be similar to that described in the foregoing method section, and will not be repeated here to avoid tediousness.
基于同样的思路,本申请实施例还提供一种服务器登录设备,如图7所示。服务器登录设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器701和存储器702,存储器702中可以存储有一个或一个以上存储应用程序或数据。其中,存储器702可以是短暂存储或持久存储。存储在存储器702的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对服务器登录设备中的一系列计算机可执行指令。更进一步地,处理器701可以设置为与存储器702通信,在服务器登录设备上执行存储器702中的一系列计算机可执行指令。服务器登录设备还可以包括一个或一个以上电源703,一个或一个以上有线或无线网络接口704,一个或一个以上输入输出接口705,一个或一个以上键盘706。Based on the same idea, an embodiment of the present application further provides a server login device, as shown in FIG. 7 . The server login device may vary greatly due to different configurations or performances, and may include one or more processors 701 and a memory 702, and the memory 702 may store one or more storage applications or data. Among them, the memory 702 may be short-lived storage or persistent storage. The application program stored in memory 702 may include one or more modules (not shown), each module may include a series of computer-executable instructions for logging into the device to the server. Still further, the processor 701 may be arranged to communicate with the memory 702 to execute a series of computer-executable instructions in the memory 702 on the server login device. The server login device may also include one or more power supplies 703 , one or more wired or wireless network interfaces 704 , one or more input and output interfaces 705 , and one or more keyboards 706 .
在本实施例中,服务器登录设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对服务器登录设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:接收目标服务器发送的、第一用户针对目标服务器的登录请求;登录请求包括第一用户的用户标识信息、目标服务器的服务器标识信息和用于登录目标服务器的第一 登录密码;根据第一用户的用户标识信息,确定第一用户的用户类别;用户类别包括用户身份、用户等级、所属用户组中的至少一项;基于第一用户的用户类别,确定属于用户类别的第二用户对应的目标登录权限信息,并根据目标登录权限信息,对第一用户登录目标服务器的第一权限进行认证;若第一权限认证通过,则向目标服务器返回与目标服务器对应的第二登录密码,以使目标服务器根据第一登录密码及第二登录密码判断是否允许第一用户登录目标服务器。In this embodiment, the server login device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module A series of computer-executable instructions in the device may include logging into the server, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for performing the following: A user's login request for the target server; the login request includes the user identification information of the first user, the server identification information of the target server, and the first login password used to log in to the target server; according to the user identification information of the first user, determine the first login User category of the user; the user category includes at least one of user identity, user level, and user group to which he belongs; based on the user category of the first user, determine the target login authority information corresponding to the second user belonging to the user category, and log in according to the target Authority information, to authenticate the first authority of the first user to log in to the target server; if the first authority authentication is passed, return the second login password corresponding to the target server to the target server, so that the target server can log in to the target server according to the first login password and the second login password. 2. The login password determines whether the first user is allowed to log in to the target server.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:根据第一用户的用户标识信息,获取预先创建的与用户标识信息对应的用户相关数据;用户相关数据至少包括用户类别和目标登录权限信息;目标登录权限信息包括以下至少一项:第二用户有权登录的至少一个第一服务器的服务器标识信息、各第一服务器分别对应的权限时间、各第一服务器分别对应的第一登录密码和第二登录密码;基于用户相关数据,确定第一用户的用户类别。In one embodiment, when the computer-executable instructions are executed, the processor may further: obtain pre-created user-related data corresponding to the user identification information according to the user identification information of the first user; the user-related data at least Including user category and target login authority information; target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, authority time corresponding to each first server, each first server The corresponding first login password and the second login password respectively; based on the user-related data, the user category of the first user is determined.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:获取第一用户对应的用户相关数据;创建并存储用户相关数据与用户标识信息之间的第一对应关系;将用户标识信息和各第一服务器分别对应的第一登录密码发送给第一用户,以使第一用户基于用户标识信息和第一登录密码向对应的服务器发起登录请求。In one embodiment, when the computer-executable instructions are executed, the processor may further: acquire user-related data corresponding to the first user; create and store a first correspondence between the user-related data and the user identification information ; Send the user identification information and the first login password corresponding to each first server to the first user, so that the first user initiates a login request to the corresponding server based on the user identification information and the first login password.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:获取用户相关数据中的、与第一用户的用户类别相匹配的目标登录权限信息;或者,根据认证中心中预先创建的各用户类别与登录权限信息之间的第二对应关系,确定与第一用户的用户类别相匹配的目标登录权限信息。In one embodiment, when the computer-executable instructions are executed, the processor may further: acquire target login authority information in the user-related data that matches the user category of the first user; or, according to the authentication center The second corresponding relationship between each user category and the login authority information pre-created in the device determines the target login authority information that matches the user category of the first user.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:接收对目标登录权限信息执行更新操作的更新请求;更新操作包括以下至少一项:对第二服务器的服务器标识信息的增添操作、对第一服务器的服务器标识信息的删除操作、对权限时间的修改操作、对第一登录密码和第二登录密码的修改操作;根据更新请求,对目标登录权限信息执行相应的更新操作。In one embodiment, when the computer-executable instructions are executed, the processor may further cause the processor to: receive an update request for performing an update operation on the target login authority information; the update operation includes at least one of the following: The addition operation of identification information, the deletion operation of the server identification information of the first server, the modification operation of the authority time, the modification operation of the first login password and the second login password; according to the update request, perform corresponding operations on the target login authority information. update operation.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:若监测到用户相关数据中的用户类别发生变化,则确定变化后的用户类别;确定属于变化后的用户类别的第三用户对应的登录权限信息;将用户相关数据中的目标登录权限信息更新为第三用户对应的登录权限信息。In one embodiment, when the computer-executable instructions are executed, the processor can further cause the processor to: if the user category in the user-related data is detected to change, determine the changed user category; determine that the user belongs to the changed user category The login authority information corresponding to the third user of the category; the target login authority information in the user-related data is updated to the login authority information corresponding to the third user.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:判断是否满足以下条件:至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内;若是,则确定第一权限认证通过。In one embodiment, when the computer-executable instructions are executed, the processor may further: determine whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the login request The receiving time is within the authority time; if it is, it is determined that the first authority authentication is passed.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:基于用户标识信息及对应的用户相关数据,对目标服务器获取用户相关数据的第二权限进行认证;若第二权限认证通过,则将用户相关数据发送至目标服务器,以使目标服务器基于用户相关数据判断第一用户是否为合法用户;若判定第一用户为合法用户,则执行对第一用户登录目标服务器的第一权限进行认证的步骤。In one embodiment, when the computer-executable instructions are executed, the processor can further cause the processor to: based on the user identification information and the corresponding user-related data, authenticate the second authority of the target server to obtain the user-related data; If the second authority authentication is passed, the user-related data is sent to the target server, so that the target server can determine whether the first user is a legal user based on the user-related data; The first authority to authenticate the steps.
采用本申请实施例的设备,认证中心通过根据目标服务器发送的、第一用户针对目标服务器的登录请求,确定第一用户的用户类别,并基于第一用户的用户类别对第一用户登录目标服务器的第一权限进行认证,在第一权限认证通过时,向目标服务器返回与目标服务器对应的第二登录密码,以使目标服务器根据第一登录密码及第二登录密码判断是否允许第一用户登录目标服务器。可见,该设备通过目标服务器和认证中心之间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。并且,通过根据用户类别对用户登录服务器的权限进行认证,实现了按照各用户类别对用户登录服务器的权限进行认证及管控的效果,相较于传统的分别针对用户个人管理 权限信息的方式而言,该设备提升了对服务器登录权限的管控的便捷性,管控效果更优。Using the device of the embodiment of the present application, the authentication center determines the user category of the first user according to the login request of the first user to the target server sent by the target server, and logs the first user into the target server based on the user category of the first user. The first authority is authenticated, and when the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server judges whether to allow the first user to log in according to the first login password and the second login password. target server. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server. In the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. , thereby avoiding information redundancy and saving server storage resources. In addition, by authenticating the user's authority to log in to the server according to the user category, the effect of authenticating and controlling the authority of the user to log in to the server according to each user category is realized, compared with the traditional way of individually managing authority information for users. , the device improves the convenience of management and control of server login permissions, and the management and control effect is better.
基于同样的思路,本申请实施例还提供一种服务器登录设备,如图8所示。服务器登录设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器801和存储器802,存储器802中可以存储有一个或一个以上存储应用程序或数据。其中,存储器802可以是短暂存储或持久存储。存储在存储器802的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对服务器登录设备中的一系列计算机可执行指令。更进一步地,处理器801可以设置为与存储器802通信,在服务器登录设备上执行存储器802中的一系列计算机可执行指令。服务器登录设备还可以包括一个或一个以上电源803,一个或一个以上有线或无线网络接口804,一个或一个以上输入输出接口805,一个或一个以上键盘806。Based on the same idea, an embodiment of the present application further provides a server login device, as shown in FIG. 8 . The server login device may vary greatly due to different configurations or performances, and may include one or more processors 801 and a memory 802, and the memory 802 may store one or more storage applications or data. Among them, the memory 802 may be short-term storage or persistent storage. The application program stored in memory 802 may include one or more modules (not shown), each module may include a series of computer-executable instructions for logging into the device to the server. Still further, the processor 801 may be arranged to communicate with the memory 802 to execute a series of computer-executable instructions in the memory 802 on the server login device. The server login device may also include one or more power supplies 803 , one or more wired or wireless network interfaces 804 , one or more input and output interfaces 805 , and one or more keyboards 806 .
在本实施例中,服务器登录设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对服务器登录设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:接收第一用户针对目标服务器的登录请求;登录请求包括第一用户的用户标识信息、目标服务器的服务器标识信息和用于登录目标服务器的第一登录密码;将登录请求转发至认证中心;认证中心用于根据第一用户的用户标识信息,确定第一用户的用户类别,并基于第一用户的用户类别对第一用户登录目标服务器的第一权限进行认证;接收认证中心发送的与目标服务器对应的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配;第二登录密码由认证中心对第一权限认证通过后发送至目标服务器;根据判断结果确定是否允许第一用户登录目标服务器。In this embodiment, the server login device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module A series of computer-executable instructions in the device may include logging into the server, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for performing the following: receiving a target server from a first user The login request includes the user identification information of the first user, the server identification information of the target server and the first login password used to log in to the target server; the login request is forwarded to the authentication center; the authentication center is used to User identification information, determine the user category of the first user, and authenticate the first authority of the first user to log in to the target server based on the user category of the first user; receive the second login password sent by the authentication center and correspond to the target server, and Determine whether the first login password and the second login password match; the second login password is sent to the target server by the authentication center after passing the first authority authentication; and whether the first user is allowed to log in to the target server is determined according to the judgment result.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:接收认证中心发送的用户相关数据;用户相关数据包括第一用户的用户类别和属于用户类别的第二用户对应的目标登录权限信息;目标登录权限信息包 括以下至少一项:第二用户有权登录的至少一个第一服务器的服务器标识信息、各第一服务器分别对应的权限时间、各第一服务器分别对应的第一登录密码和第二登录密码;基于登录请求和用户相关数据,判断第一用户是否为合法用户;若第一用户为合法用户,则执行接收认证中心发送的与目标服务器对应的第二登录密码的步骤。In one embodiment, the computer-executable instructions, when executed, can further cause the processor to: receive user-related data sent by the authentication center; the user-related data includes the user category of the first user and the second user belonging to the user category Corresponding target login authority information; the target login authority information includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, the authority time corresponding to each first server, and the corresponding authorization time of each first server. Based on the login request and user-related data, determine whether the first user is a legal user; if the first user is a legal user, then execute the second request sent by the authentication center and corresponding to the target server. Steps to log in password.
在一个实施例中,计算机可执行指令在被执行时,还可以使所述处理器:判断是否满足以下条件:至少一个第一服务器的服务器标识信息中包含目标服务器的服务器标识信息、且登录请求的接收时间位于权限时间内;若是,则确定第一用户为合法用户。In one embodiment, when the computer-executable instructions are executed, the processor may further: determine whether the following conditions are met: the server identification information of at least one first server includes the server identification information of the target server, and the login request The receiving time is within the authorized time; if so, the first user is determined to be a legitimate user.
采用本申请实施例的设备,目标服务器通过接收第一用户针对目标服务器的登录请求,将登录请求转发至认证中心,接收认证中心发送的与目标服务器对应的第二登录密码,并判断第一登录密码和第二登录密码是否相匹配,根据判断结果确定是否允许第一用户登录目标服务器。可见,该设备通过目标服务器和认证中心之间的交互,从认证中心处获取与目标服务器对应的第二登录密码即可实现目标服务器的登录,而无需在各服务器中存储用户相关数据,相较于传统的由服务器创建及存储用户相关数据的方式而言,能够有效缓解服务器的数据存储压力,尤其是在用户需登录多台服务器时,也无需在各服务器中重复创建同一用户的用户相关数据,从而避免了信息冗余,节约了服务器的存储资源。Using the device of the embodiment of the present application, the target server receives the login request from the first user to the target server, forwards the login request to the authentication center, receives the second login password corresponding to the target server sent by the authentication center, and determines the first login Whether the password matches the second login password, it is determined whether the first user is allowed to log in to the target server according to the judgment result. It can be seen that through the interaction between the target server and the authentication center, the device can obtain the second login password corresponding to the target server from the authentication center to log in to the target server without storing user-related data in each server. In the traditional way of creating and storing user-related data by the server, it can effectively relieve the data storage pressure of the server, especially when the user needs to log in to multiple servers, and there is no need to repeatedly create the user-related data of the same user in each server. , thereby avoiding information redundancy and saving server storage resources.
本申请实施例还提出了一种计算机可读存储介质,该计算机可读存储介质存储一个或多个程序,该一个或多个程序包括指令,该指令当被包括多个应用程序的服务器登录设备执行时,能够使该服务器登录设备执行上述服务器登录方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs include instructions, and the instructions are logged into a device by a server including multiple application programs During execution, the server login device can be made to execute each process of the foregoing server login method embodiments, and the same technical effect can be achieved. In order to avoid repetition, details are not described here.
本申请实施例还提出了一种计算机可读存储介质,该计算机可读存储介质存储一个或多个程序,该一个或多个程序包括指令,该指令当被包括多个应用程序的服务器登录设备执行时,能够使该服务器登录设备执行上述服务 器登录方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs include instructions, and the instructions are logged into a device by a server including multiple application programs During execution, the server login device can be made to execute each process of the foregoing server login method embodiments, and the same technical effect can be achieved. In order to avoid repetition, details are not described here.
以上所述仅为本申请实施例而已,并不用于限制本说明书。对于本领域技术人员来说,本申请实施例可以有各种更改和变化。凡在本申请实施例的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请实施例的权利要求范围之内。The above descriptions are merely embodiments of the present application, and are not intended to limit the present specification. For those skilled in the art, various modifications and changes may be made to the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the scope of the claims of the embodiments of the present application.

Claims (19)

  1. 一种服务器登录方法,其特征在于,应用于认证中心,所述方法包括:A server login method, characterized in that it is applied to an authentication center, the method comprising:
    接收目标服务器发送的、第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息和用于登录所述目标服务器的第一登录密码;receiving a login request from a first user for the target server sent by a target server; the login request includes the user identification information of the first user and a first login password for logging in to the target server;
    根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;determining the user category of the first user according to the user identification information of the first user;
    基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证;Based on the user category of the first user, target login authority information corresponding to a second user belonging to the user category is determined, and according to the target login authority information, the first user logging in to the target server is performed. Permission to authenticate;
    若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码,以使所述目标服务器根据所述第一登录密码及所述第二登录密码判断是否允许所述第一用户登录所述目标服务器。If the first authority authentication is passed, the second login password corresponding to the target server is returned to the target server, so that the target server can determine whether or not to use the first login password and the second login password. The first user is allowed to log in to the target server.
  2. 根据权利要求1所述的方法,其特征在于,所述登录请求还包括所述目标服务器的服务器标识信息,所述根据所述第一用户的用户标识信息,确定所述第一用户的用户类别,包括:The method according to claim 1, wherein the login request further includes server identification information of the target server, and the user category of the first user is determined according to the user identification information of the first user ,include:
    根据所述第一用户的用户标识信息,获取预先创建的与所述用户标识信息对应的用户相关数据;所述用户相关数据至少包括所述用户类别和所述目标登录权限信息;Acquire pre-created user-related data corresponding to the user identification information according to the user identification information of the first user; the user-related data at least include the user category and the target login authority information;
    基于所述用户相关数据,确定所述第一用户的用户类别。Based on the user-related data, a user category of the first user is determined.
  3. 根据权利要求2所述的方法,其特征在于,所述目标登录权限信息包括以下至少一项:所述第二用户有权登录的至少一个第一服务器的服务器标识信息、各所述第一服务器分别对应的权限时间、各所述第一服务器分别对应的所述第一登录密码和所述第二登录密码。The method according to claim 2, wherein the target login authority information includes at least one of the following: server identification information of at least one first server to which the second user is authorized to log in, each of the first servers The corresponding authorization time, the first login password and the second login password respectively corresponding to each of the first servers.
  4. 根据权利要求3所述的方法,其特征在于,所述接收目标服务器发送 的、第一用户针对所述目标服务器的登录请求之前,所述方法还包括:The method according to claim 3, characterized in that, before the first user's login request to the target server sent by the receiving target server, the method further comprises:
    获取所述第一用户对应的用户相关数据;obtaining user-related data corresponding to the first user;
    创建并存储所述用户相关数据与所述用户标识信息之间的第一对应关系;creating and storing a first correspondence between the user-related data and the user identification information;
    将所述用户标识信息和各所述第一服务器分别对应的所述第一登录密码发送给所述第一用户。Sending the user identification information and the first login password corresponding to each of the first servers to the first user.
  5. 根据权利要求2所述的方法,其特征在于,所述基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,包括:The method according to claim 2, wherein the determining, based on the user category of the first user, the target login authority information corresponding to the second user belonging to the user category comprises:
    获取所述用户相关数据中的、与所述第一用户的用户类别相匹配的目标登录权限信息;acquiring target login authority information in the user-related data that matches the user category of the first user;
    或者,or,
    根据所述认证中心中预先创建的各用户类别与登录权限信息之间的第二对应关系,确定与所述第一用户的用户类别相匹配的目标登录权限信息。According to the second correspondence between each user category and login authority information pre-created in the authentication center, target login authority information matching the user category of the first user is determined.
  6. 根据权利要求4所述的方法,其特征在于,所述创建并存储所述用户相关数据与所述用户标识信息之间的第一对应关系之后,所述方法还包括:The method according to claim 4, wherein after the creating and storing the first correspondence between the user-related data and the user identification information, the method further comprises:
    接收对所述目标登录权限信息执行更新操作的更新请求;receiving an update request for performing an update operation on the target login authority information;
    根据所述更新请求,对所述目标登录权限信息执行相应的更新操作。According to the update request, a corresponding update operation is performed on the target login authority information.
  7. 根据权利要求6所述的方法,其特征在于,所述更新操作包括以下至少一项:对第二服务器的服务器标识信息的增添操作、对所述第一服务器的服务器标识信息的删除操作、对所述权限时间的修改操作、对所述第一登录密码和所述第二登录密码的修改操作。The method according to claim 6, wherein the update operation comprises at least one of the following: an operation of adding server identification information of the second server, an operation of deleting server identification information of the first server, The modification operation of the permission time, and the modification operation of the first login password and the second login password.
  8. 根据权利要求4所述的方法,其特征在于,所述创建并存储所述用户相关数据与所述用户标识信息之间的第一对应关系之后,所述方法还包括:The method according to claim 4, wherein after the creating and storing the first correspondence between the user-related data and the user identification information, the method further comprises:
    若监测到所述用户相关数据中的所述用户类别发生变化,则确定变化后的所述用户类别;If it is detected that the user category in the user-related data changes, determining the changed user category;
    确定属于所述变化后的所述用户类别的第三用户对应的登录权限信息;determining the login authority information corresponding to the third user belonging to the changed user category;
    将所述用户相关数据中的所述目标登录权限信息更新为所述第三用户对应的登录权限信息。The target login authority information in the user-related data is updated to the login authority information corresponding to the third user.
  9. 根据权利要求3所述的方法,其特征在于,所述根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证,包括:The method according to claim 3, wherein the authenticating the first authority of the first user to log in to the target server according to the target login authority information comprises:
    判断是否满足:所述至少一个第一服务器的服务器标识信息中包含所述目标服务器的服务器标识信息、且所述登录请求的接收时间位于所述权限时间内;Judging whether it is satisfied: the server identification information of the at least one first server includes the server identification information of the target server, and the reception time of the login request is within the authority time;
    若是,则确定所述第一权限认证通过。If yes, it is determined that the first authority authentication is passed.
  10. 根据权利要求2所述的方法,其特征在于,所述根据所述第一用户的用户标识信息,确定所述第一用户的用户类别之后,所述方法还包括:The method according to claim 2, wherein after determining the user category of the first user according to the user identification information of the first user, the method further comprises:
    基于所述用户标识信息及对应的所述用户相关数据,对所述目标服务器获取所述用户相关数据的第二权限进行认证;Authenticating, based on the user identification information and the corresponding user-related data, the second authority of the target server to obtain the user-related data;
    若所述第二权限认证通过,则将所述用户相关数据发送至所述目标服务器,以使所述目标服务器基于所述用户相关数据判断所述第一用户是否为合法用户;If the second authority authentication is passed, sending the user-related data to the target server, so that the target server determines whether the first user is a legitimate user based on the user-related data;
    若判定所述第一用户为合法用户,则执行对所述第一用户登录所述目标服务器的第一权限进行认证的步骤。If it is determined that the first user is a legitimate user, the step of authenticating the first authority of the first user to log in to the target server is performed.
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,所述用户类别包括用户身份、用户等级、所属用户组中的至少一项。The method according to any one of claims 1-10, wherein the user category includes at least one of a user identity, a user level, and a user group to which they belong.
  12. 一种服务器登录方法,其特征在于,应用于目标服务器,包括:A server login method, characterized in that, applied to a target server, comprising:
    接收第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息、所述目标服务器的服务器标识信息和用于登录所 述目标服务器的第一登录密码;Receive a login request for the target server from the first user; the login request includes the user identification information of the first user, the server identification information of the target server and the first login password for logging in to the target server;
    将所述登录请求转发至认证中心;所述认证中心用于根据所述第一用户的用户标识信息,确定所述第一用户的用户类别,并基于所述第一用户的用户类别对所述第一用户登录所述目标服务器的第一权限进行认证;Forward the login request to an authentication center; the authentication center is configured to determine the user category of the first user according to the user identification information of the first user, and based on the user category of the first user The first authority of the first user to log in to the target server is authenticated;
    接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;所述第二登录密码由所述认证中心对所述第一权限认证通过后发送至所述目标服务器;Receive the second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match; the second login password is verified by the authentication center. After the first authority authentication is passed, it is sent to the target server;
    根据判断结果确定是否允许所述第一用户登录所述目标服务器。Whether to allow the first user to log in to the target server is determined according to the judgment result.
  13. 根据权利要求12所述的方法,其特征在于,所述登录请求还包括所述目标服务器的服务器标识信息,所述接收所述认证中心发送的与所述目标服务器对应的第二登录密码之前,所述方法还包括:The method according to claim 12, wherein the login request further includes server identification information of the target server, and before receiving the second login password corresponding to the target server sent by the authentication center, The method also includes:
    接收所述认证中心发送的用户相关数据;receiving user-related data sent by the authentication center;
    基于所述登录请求和所述用户相关数据,判断所述第一用户是否为合法用户;Determine whether the first user is a legitimate user based on the login request and the user-related data;
    若所述第一用户为所述合法用户,则执行接收所述认证中心发送的与所述目标服务器对应的第二登录密码的步骤。If the first user is the legal user, the step of receiving the second login password corresponding to the target server sent by the authentication center is performed.
  14. 根据权利要求13所述的方法,其特征在于,所述用户相关数据包括所述第一用户的用户类别和属于所述用户类别的第二用户对应的目标登录权限信息;所述目标登录权限信息包括以下至少一项:所述第二用户有权登录的至少一个第一服务器的服务器标识信息、各所述第一服务器分别对应的权限时间、各所述第一服务器分别对应的所述第一登录密码和所述第二登录密码。The method according to claim 13, wherein the user-related data comprises a user category of the first user and target login authority information corresponding to a second user belonging to the user category; the target login authority information It includes at least one of the following: server identification information of at least one first server to which the second user has the right to log in, authorization time corresponding to each of the first servers, and the first server corresponding to each of the first servers. The login password and the second login password.
  15. 根据权利要求14所述的方法,其特征在于,所述基于所述登录请求和所述用户相关数据,判断所述第一用户是否为合法用户,包括:The method according to claim 14, wherein the determining whether the first user is a legitimate user based on the login request and the user-related data comprises:
    判断是否满足:所述至少一个第一服务器的服务器标识信息中包含所述 目标服务器的服务器标识信息、且所述登录请求的接收时间位于所述权限时间内;Judging whether it is satisfied: the server identification information of the at least one first server includes the server identification information of the target server, and the reception time of the login request is within the authority time;
    若是,则确定所述第一用户为所述合法用户。If yes, then it is determined that the first user is the legal user.
  16. 一种服务器登录系统,其特征在于,包括目标服务器和认证中心;A server login system, characterized in that it includes a target server and an authentication center;
    所述目标服务器,用于接收第一用户针对所述目标服务器的登录请求;将所述登录请求转发至所述认证中心;所述登录请求包括所述第一用户的用户标识信息和用于登录所述目标服务器的第一登录密码;The target server is configured to receive a login request from a first user to the target server; forward the login request to the authentication center; the login request includes the user identification information of the first user and the information used for login the first login password of the target server;
    所述认证中心,用于接收所述目标服务器发送的所述登录请求;根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息,对所述第一用户登录所述目标服务器的第一权限进行认证;若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码;The authentication center is configured to receive the login request sent by the target server; determine the user category of the first user according to the user identification information of the first user; based on the user category of the first user, Determine the target login authority information corresponding to the second user belonging to the user category, and authenticate the first authority of the first user to log in to the target server according to the target login authority information; if the first authority If the authentication is passed, return the second login password corresponding to the target server to the target server;
    所述目标服务器,还用于接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;根据判断结果确定是否允许所述第一用户登录所述目标服务器。The target server is further configured to receive the second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match; determine according to the judgment result Whether to allow the first user to log in to the target server.
  17. 一种服务器登录装置,其特征在于,包括:A server login device, characterized in that it includes:
    第一接收模块,用于接收目标服务器发送的、第一用户针对所述目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息和用于登录所述目标服务器的第一登录密码;The first receiving module is configured to receive a login request from a first user for the target server sent by the target server; the login request includes the user identification information of the first user and the first user ID used to log in to the target server. login password;
    第一确定模块,用于根据所述第一用户的用户标识信息,确定所述第一用户的用户类别;所述用户类别包括用户身份、用户等级、所属用户组中的至少一项;a first determining module, configured to determine the user category of the first user according to the user identification information of the first user; the user category includes at least one of a user identity, a user level, and a user group to which he belongs;
    第一执行模块,用于基于所述第一用户的用户类别,确定属于所述用户类别的第二用户对应的目标登录权限信息,并根据所述目标登录权限信息, 对所述第一用户登录所述目标服务器的第一权限进行认证;A first execution module, configured to determine target login authority information corresponding to a second user belonging to the user category based on the user category of the first user, and log in to the first user according to the target login authority information The first authority of the target server is authenticated;
    返回模块,用于若所述第一权限认证通过,则向所述目标服务器返回与所述目标服务器对应的第二登录密码,以使所述目标服务器根据所述第一登录密码及所述第二登录密码判断是否允许所述第一用户登录所述目标服务器。A return module, configured to return a second login password corresponding to the target server to the target server if the first authority authentication is passed, so that the target server can make the first login password and the first login password according to the The second login password determines whether the first user is allowed to log in to the target server.
  18. 一种服务器登录装置,其特征在于,包括:A server login device, characterized in that it includes:
    第三接收模块,用于接收第一用户针对目标服务器的登录请求;所述登录请求包括所述第一用户的用户标识信息和用于登录所述目标服务器的第一登录密码;a third receiving module, configured to receive a login request from a first user to a target server; the login request includes the user identification information of the first user and a first login password for logging in to the target server;
    转发模块,用于将所述登录请求转发至认证中心;所述认证中心用于根据所述第一用户的用户标识信息,确定所述第一用户的用户类别,并基于所述第一用户的用户类别对所述第一用户登录所述目标服务器的第一权限进行认证;A forwarding module, configured to forward the login request to an authentication center; the authentication center is configured to determine the user category of the first user according to the user identification information of the first user, and based on the user identification information of the first user The user category authenticates the first authority of the first user to log in to the target server;
    第四执行模块,用于接收所述认证中心发送的与所述目标服务器对应的第二登录密码,并判断所述第一登录密码和所述第二登录密码是否相匹配;所述第二登录密码由所述认证中心对所述第一权限认证通过后发送至所述目标服务器;a fourth execution module, configured to receive a second login password corresponding to the target server sent by the authentication center, and determine whether the first login password and the second login password match; the second login password The password is sent to the target server by the authentication center after passing the authentication of the first authority;
    第四确定模块,用于根据判断结果确定是否允许所述第一用户登录所述目标服务器。The fourth determination module is configured to determine whether to allow the first user to log in to the target server according to the determination result.
  19. 一种存储介质,用于存储计算机可执行指令,所述可执行指令在被执行时,实现权利要求1-15中任一项所述的方法的步骤。A storage medium for storing computer-executable instructions that, when executed, implement the steps of the method of any one of claims 1-15.
PCT/CN2020/138588 2020-08-07 2020-12-23 Server login method, system and device WO2022027904A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010787009.7 2020-08-07
CN202010787009.7A CN112039851B (en) 2020-08-07 2020-08-07 Server login method, system and device

Publications (1)

Publication Number Publication Date
WO2022027904A1 true WO2022027904A1 (en) 2022-02-10

Family

ID=73582669

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/138588 WO2022027904A1 (en) 2020-08-07 2020-12-23 Server login method, system and device

Country Status (2)

Country Link
CN (1) CN112039851B (en)
WO (1) WO2022027904A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112039851B (en) * 2020-08-07 2021-09-21 郑州阿帕斯数云信息科技有限公司 Server login method, system and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018155A (en) * 2007-02-08 2007-08-15 华为技术有限公司 Network element management method, system and network element
CN104243154A (en) * 2013-06-07 2014-12-24 腾讯科技(深圳)有限公司 Server user authority centralized control system and server use authority centralized control method
CN107196914A (en) * 2017-04-25 2017-09-22 北京潘达互娱科技有限公司 Identity identifying method and device
WO2020019420A1 (en) * 2018-07-26 2020-01-30 平安科技(深圳)有限公司 Login management system and method, server, and computer-readable storage medium
CN112039851A (en) * 2020-08-07 2020-12-04 郑州阿帕斯数云信息科技有限公司 Server login method, system and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MY167516A (en) * 2012-12-11 2018-09-04 Mimos Berhad A system and method for peer-to-peer entity authentication with nearest neighbours credential delegation
CN104753677B (en) * 2013-12-31 2019-02-01 腾讯科技(深圳)有限公司 Password hierarchical control method and system
CN104240351B (en) * 2014-09-18 2015-07-15 广东建邦计算机软件有限公司 User interaction method and device based on access control system
US9929859B2 (en) * 2015-10-07 2018-03-27 Go Daddy Operating Company, LLC Account asset protection via an encoded physical mechanism

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018155A (en) * 2007-02-08 2007-08-15 华为技术有限公司 Network element management method, system and network element
CN104243154A (en) * 2013-06-07 2014-12-24 腾讯科技(深圳)有限公司 Server user authority centralized control system and server use authority centralized control method
CN107196914A (en) * 2017-04-25 2017-09-22 北京潘达互娱科技有限公司 Identity identifying method and device
WO2020019420A1 (en) * 2018-07-26 2020-01-30 平安科技(深圳)有限公司 Login management system and method, server, and computer-readable storage medium
CN112039851A (en) * 2020-08-07 2020-12-04 郑州阿帕斯数云信息科技有限公司 Server login method, system and device

Also Published As

Publication number Publication date
CN112039851B (en) 2021-09-21
CN112039851A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
US11606352B2 (en) Time-based one time password (TOTP) for network authentication
US11711219B1 (en) PKI-based user authentication for web services using blockchain
CN109417553B (en) Detecting attacks using leaked credentials via internal network monitoring
US10841316B2 (en) Dynamic access control to network resources using federated full domain logon
US11711222B1 (en) Systems and methods for providing authentication to a plurality of devices
CN108293045B (en) Single sign-on identity management between local and remote systems
US8387136B2 (en) Role-based access control utilizing token profiles
US8387137B2 (en) Role-based access control utilizing token profiles having predefined roles
US10122703B2 (en) Federated full domain logon
CN108964885B (en) Authentication method, device, system and storage medium
US20080320566A1 (en) Device provisioning and domain join emulation over non-secured networks
US20140109179A1 (en) Multiple server access management
US7987357B2 (en) Disabling remote logins without passwords
US20140143847A1 (en) System for and method of providing single sign-on (sso) capability in an application publishing environment
KR102189554B1 (en) Teriminal apparatus, server apparatus, blockchain and method for fido universal authentication using the same
US8387130B2 (en) Authenticated service virtualization
Sharma et al. Identity and access management-a comprehensive study
US11218317B1 (en) Secure enclave implementation of proxied cryptographic keys
US11804957B2 (en) Exporting remote cryptographic keys
CA3160111A1 (en) Shared secret implementation of proxied cryptographic keys
WO2022027904A1 (en) Server login method, system and device
CN114254289A (en) Cloud platform access method and device
US10756899B2 (en) Access to software applications
JP2019128858A (en) Apparatus approval system
Basu et al. Strengthening Authentication within OpenStack Cloud Computing System through Federation with ADDS System

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20948640

Country of ref document: EP

Kind code of ref document: A1