MEC environment-oriented OAuth 2.0-based single sign-on mechanism
Technical Field
The invention belongs to the field of network space security, and particularly relates to a unified authentication and authorization mechanism.
Background
At present, the rapid development of 5G brings new requirements in the aspects of data transmission bandwidth, time delay, third-party application and service performance, and the like, different from the traditional cloud computing which centralizes the processing of computing capacity, storage capacity and network management, the MEC provides an IT service environment and cloud computing capacity for the edge of a mobile network, partial caching and computing are executed at the edge of the mobile network to reduce the transmission time delay, and finally millisecond-level application can be realized. However, with the continuous introduction of MEC technology, the computing power of the cloud data center is sunk to the edge of the network, which also means that a third-party application service deployed in the MEC environment is exposed in an insecure environment, and user sensitive data existing in the MEC face a great challenge of security and privacy. In addition, due to the requirement of the user for various applications, the repeated registration process is not only unfavorable for the user experience and reduces the service providing efficiency, but also increases the management cost of the MEC system for the user authentication information. Therefore, security of MEC and unified authentication technology for users are increasingly receiving attention.
When the MEC provides various application services, the security of service provision should be ensured first, where authentication management of user identity and third-party application, and privacy protection of user sensitive information are very important security requirements.
Firstly, each user accessing the third-party application service through the MEC system needs to be authenticated, so that the correctness of the declaration information of the user is ensured, and the access right is determined. In addition, in order to ensure the security of the user privacy data, the third-party application is realized to acquire the resource data in the MEC system by using an authorization mode, and the secure sharing of the protected resources is realized on the premise of not exposing the user privacy information.
Secondly, in the MEC system, different MEC hosts may be deployed by multiple vendors, and third party application services existing on the MEC application are diverse, so that the validity of the application needs to be authenticated. Moreover, the user registers different applications for accessing the resource service, and the process is repeated and tedious. Therefore, in order to simplify account information management and improve user experience, the MEC system needs to perform unified authentication on users, and single sign-on is realized.
Based on the above requirements, the identity authentication technology for realizing single sign-on can be divided into the following technologies. They are respectively: the Kerberos protocol utilizes an authorization server to verify the identity of a user and issue a bill to complete user authentication, but is not suitable for key management of massive users at present; the SAML2.0 protocol is suitable for user identity authentication and authorization in a multi-trust domain, and has strong functions, but the protocol is complex; the OpenID protocol realizes single sign-on by requesting a token and accessing the token, has a small application range at present, and is easy to realize by tracking user access by an identity provider; the OAuth2.0 protocol allows a third-party application to apply for acquiring resources from a user resource owner by using an access token, and is widely applied. Therefore, the OAuth2.0 protocol is selected to be used for expansion, and single sign-on facing the MEC environment is realized on the premise of ensuring the application security.
The method aims to verify the authenticity of the identity of a user when the user accesses the resource service in the MEC system, ensure the confidentiality and integrity of sensitive information of the user and realize unified identity authentication and authorization of the user in the MEC environment.
Disclosure of Invention
The invention aims to provide a unified identity authentication and authorization mechanism based on OAuth2.0 for an MEC system, and on the premise of verifying the authenticity and effectiveness of the user identity, the invention realizes that a third party application acquires resource data in an MEC host in a user authorization mode, avoids the leakage of account information and protects the privacy of user data.
The invention also aims to provide a unified identity authentication and authorization mechanism based on OAuth2.0 for the MEC system, realize single sign-on, avoid repeated registration and verification processes when a user accesses the MEC resource service through the trust application, and reduce the maintenance cost of a service provider on the trust application system.
In order to achieve the purpose, the invention adopts the following technical means:
an MEC environment-oriented OAuth 2.0-based single sign-on mechanism, a system model comprises the following entity information:
the system mainly comprises five types of entities, namely an operation Support system OSS (operations Support System), a mobile Edge Platform manager MEPM (Mobile Edge Platform manager), an MEC Host (MEC Host), a third-party application and an LDAP server.
Operation Support system oss (operations Support system): the OSS will check the access request and authorization information of the third party application deployed in the MEC environment. The request data authorized by the OSS authentication is forwarded to the MEPM for processing.
Mobile Edge Platform manager mepm (mobile Edge Platform manager): the MEPM includes functions of creating, terminating, and managing authentication of the MEC application.
MEC Host (MEC Host): the MEC host comprises three parts of a Mobile Edge Platform (MEP), an MEC Application (MEC Application) and a virtualization infrastructure. The MEP provides a running environment for the MEC application; the MEC application is a virtualization application program and is in butt joint with a third party application through an open application programming interface, so that various services are provided for a user; the virtualization infrastructure provides the underlying hardware computation and storage to run multiple MEC applications.
A third party application: the third party service provider designs an application program according to business requirements, and the third party application requests the MEC system to acquire protected resources so as to provide application service for a legal user;
LDAP server: the system is used for sending lightweight directory access protocol requests, processing queries and updating access control lists, and returning user information.
An MEC environment-oriented OAuth 2.0-based single sign-on implementation mechanism comprises the following steps:
third party application registration
In the registration stage, the third party application and the MEC host negotiate a session key, an SSL encryption channel is provided for the subsequent uniform authentication and authorization process of the user, the security of data transmission is ensured, and the following operations are mainly executed:
the certificate authority encrypts information such as an encryption algorithm, a public key, a certificate expiration time and the like of the third-party application client and the MEC host by using a private key of the certificate authority, so as to generate digital certificates which are respectively sent to the client and the MEC host;
the third-party application client selects the SSL version, the encryption algorithm, the MAC algorithm and the like which are supported by the third-party application client, and simultaneously adds a client random number to send the client random number to the MEC host;
the MEC host confirms the supported encryption algorithm and sends the digital certificate containing the information of its own public key, the issuing authority, etc. to the client together with the MEC host random number;
-the client, upon completion of the verification of the authenticity of the digital certificate, generating a string of random number passwords, followed by encrypting the newly generated random number passwords using the MEC host public key and sending to the MEC host;
-the MEC host decrypting the secret using the private key, the client and the MEC host computing the previously generated random numbers and the newly derived secret using a negotiated encryption algorithm, thereby generating a session key, whereby the subsequent communication content is encrypted.
Authentication and authorization
The authentication and authorization stage comprises two parts, namely, the user accesses the resource service in the MEC system through the third-party application for the first time and accesses the MEC system service through the authorization application for the second time.
The authentication part, namely the first login process of the user, executes the following operations:
when a user logs in a third-party application for the first time and provides a resource access request to the MEC system, the third-party application finds that the third-party application is in a non-login state, and then sends an authentication request carrying a user name/password to the OSS;
an OSS deploys an LDAP server for centralized user management and authentication, and the OSS queries an access control list ACL (Access control List) from the LDAP server according to user information;
the OSS checks the user identity by acquiring a user name and a password, and saves the login state after the user identity is successfully verified;
the OSS sends authorization information to the user, and after the user agrees to authorization, the OSS sends parameters such as a third-party application identity identifier App _ id, a redirection address, a response type, an access right, a state random number state, a timestamp and the like to the MEPM;
-the MEPM confirms that the application is a trusted entity, and then sends an authorization code to a third party application, and the authorization code carries a random number and a timestamp parameter;
the third party application sends the authorization code, App _ id, the application own key App _ secret, the random number and the timestamp to the MEPM together to apply for exchanging the access token;
the MEPM encrypts the access token by using App _ secret and returns the access token to the third-party application, and meanwhile, the access token with the access token is used for a subsequent updating process;
the third party application stores the token locally, and then each resource request for the MEC system carries an access token, and the MEPM checks the validity of the token, and returns the user resource data when the token is valid.
The authorization part, namely the second login process of the user, executes the following operations:
-the trusted application will send the access token to the OSS with it when accessing the trusted application, unlike the user that first logged in to the third party application;
the OSS determines whether re-authentication is required by checking the user login status in the database. If the login state of the user is confirmed to be valid, jumping to an MEPM to check the validity of the access token;
after the MEPM confirms that the access token is valid, user information data in the MEC are directly returned;
if the MEPM judges that the access token is invalid, an authorization page is returned to the user, and the user needs to confirm the authorization again but does not need to log in the authentication again;
after the user confirms the authorization, the trusted application sends parameters such as App _ id, a refresh token encrypted by App _ secret, a random number, a timestamp and the like to the MEPM;
-the MEPM updates the access token according to the refresh token and returns;
-the trusted application requesting acquisition of resource data in the MEC host using the new access token.
The invention has the beneficial effects that:
(1) the invention provides a unified authentication and authorization mechanism based on OAuth2.0 for the MEC environment, which ensures the security of the resource data stored in the MEC system;
(2) by implementing the method, single sign-on can be realized, when a user accesses a plurality of third-party services deployed on the MEC application, other trusted applications can be accessed only by authenticating once, and unnecessary repeated registration and authentication processes are reduced;
(3) by implementing the method, the privacy information of the user can be protected, the trust application acquires the resource data in the MEC system in an authorization mode, the transmission of sensitive information such as an account is reduced, and the data leakage is avoided;
(4) the method of the invention simplifies the management of all suppliers to the user account information by adopting a uniform authentication mechanism, and reduces the maintenance cost of the third-party application system.
Drawings
FIG. 1 is a schematic diagram of a system architecture;
FIG. 2 is a schematic diagram of a user first login during a system authentication and authorization phase;
fig. 3 is a schematic diagram of the second login of the user in the authentication and authorization phase of the system.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the single sign-on system of the embodiment of the present invention includes the following entities:
the user terminal is used for accessing the third-party application through the terminal equipment, so that the corresponding service requirements are met;
the third-party application deploys the service provider in the MEC platform through the open interface to provide business service for the user, receive identity information such as an account name and a password of the user and help the user to complete login and authorization operations;
the operation support system OSS checks the access request and the authorization information of the third-party application deployed in the MEC environment, and sends a request for applying the token to the MEPM after the verification is passed;
the LDAP server is used for quickly inquiring user information, acquiring access control authority and helping to complete user identity authentication;
the MEC host is used for providing bottom layer protected resource data and comprises a Mobile Edge Platform (MEP), an MEC application and a virtualization infrastructure, the MEP provides an operating environment for the MEC application, the MEC application is a virtualization application program and is in butt joint with a third party application through an open application programming interface, so that various services are provided for a user, and the virtualization infrastructure provides bottom layer hardware calculation and storage, so that a plurality of MEC applications are operated;
and the MEPM is used for managing the creating, terminating and authenticating processes of the MEC application, verifying the validity of the third-party application, and completing the operations of creating and updating the token and the like.
The single sign-on mechanism of the embodiment of the invention comprises the following steps:
A. performing a registration process for a third-party application which is in butt joint with the MEC application by utilizing MEC platform resources, negotiating a session key between a third-party application client and an MEC host, and establishing an SSL encryption channel;
B. the user completes login operation through the account name and password information, the MEPM generates and returns a token according to the user access authority, and a third-party application is allowed to access resource service in the MEC system;
C. when a user accesses the trust application, the trust application carries an access token, and the MEPM authorizes the trust application to acquire resource data in the MEC by verifying the validity of the token.
In step a, the specific process of constructing the SSL communication channel is as follows:
step 1, a certificate authority encrypts information such as an encryption algorithm, a public key, certificate expiration time and the like of a third-party application client and an MEC host respectively by using a private key of the certificate authority, so that digital certificates are generated and sent to the client and the MEC host respectively;
step 2, the third-party application client selects an SSL version, an encryption algorithm, an MAC algorithm and the like which are supported by the third-party application client, and meanwhile, adds a random number of the third-party application client and sends the random number to the MEC host;
step 3, the MEC host confirms the supported encryption algorithm and sends the digital certificate containing the information of the public key, the issuing organization and the like of the MEC host and the random number of the MEC host to the client;
step 4, the client verifies the reliability of the digital certificate, generates a string of random number passwords after the verification is successful, encrypts the newly generated random number passwords by using the public key of the MEC host, and sends the random number passwords to the MEC host;
and 5, the MEC host decrypts the password by using the private key, and the client and the MEC host calculate the random numbers generated respectively before and the newly obtained password by using a negotiated encryption algorithm so as to generate a session key until the encryption channel is constructed.
Step B is shown in fig. 2, and the embodiment of the present invention specifically describes a single sign-on mechanism by taking a login where a user first accesses a third-party application as an example. The User information corresponding to a certain User comprises a User name User and a Password, and the self information corresponding to a certain application comprises an application identifier App _ id, an application key App _ secret, a redirection address redirect _ uri, a response type response _ type, an authorization range scope, an application state random number state, a timestamp, an authorization code, a credential type grant _ type, an access token _ token, an update token _ token and a token expiration time expires _ in. The method comprises the following specific steps:
step 1, a User logs in a third-party application by using a User name User and a Password, and an authentication request is sent to an OSS (open service system) through the third-party application;
step 2, an LDAP server is deployed on the OSS side, the OSS acquires a user name and a password to check the identity of the user through inquiring the access control list, the login state is saved after the authentication is successful, and the step 3 is executed, otherwise, the login fails;
step 3, the OSS sends authorization information to the user, and after the user agrees to authorization, the OSS sends information parameters carrying third-party application to the MEPM;
step 4, the MEPM verifies that the third-party application is a trusted entity, generates an authorization code according to the information of the user and the third-party application and returns the authorization code, and meanwhile, the MEPM carries a random number and a timestamp parameter to ensure the confidentiality and the integrity of the authorization code;
step 5, the third party application sends the authorization code and the first parameter to the MEPM to apply for exchanging the access token;
step 6, the MEPM encrypts and returns the access token and the refresh token by using the third-party application key;
and 7, the third party applies the local storage token, then each resource request aiming at the MEC system carries an access token, and the MEPM returns the protected data after the authentication token is valid.
Step C is shown in fig. 3, where a user accesses the MEC system service through the trust application, and the specific steps are as follows:
step 1, when a user requests a credit application service, the credit application carries an access token and sends the access token to an OSS;
step 2, the OSS verifies the login state of the user by checking the database, if the login state of the user is confirmed to be valid, the step 3 is executed, otherwise, the login is carried out again;
step 3, the OSS sends the access token to the MEPM, the MEPM directly returns the user information data in the MEC after confirming that the token is valid, otherwise, step 4 is executed;
step 4, the MEPM returns an authorization page to the user, after the user checks the authorization page, the user needs to confirm the authorization again but does not need to log in the authentication again, if the authorization is agreed, the step 5 is executed, otherwise, the authorization fails;
step 5, the credit granting application sends parameters such as the refresh token, self information, random number, timestamp and the like encrypted by the App _ secret to the MEPM;
step 6, the MEPM updates the access token according to the refresh token and returns the access token;
and 7, the trust application requests to acquire the resource data in the MEC host by using the new access token until the authorization process is finished.
It should be noted that the present invention is not limited to the above-mentioned embodiments, the protection scope of the present invention is determined by the appended claims, and the technical solutions and modifications based on the spirit and scope of the present invention should be covered by the claims of the present invention.