A blockchain and risk assessment based access control method, system, device and storage medium

By building a blockchain-based BR-ABAC model and risk assessment algorithm in a zero-trust network, the problems of single point of failure and insufficient risk assessment in traditional access control models are solved, achieving more secure and efficient access control.

CN116633615BActive Publication Date: 2025-12-12ZHEJIANG LAB +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310580816.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2025-12-12
Estimated Expiration
2043-05-23

AI Technical Summary

Technical Problem

Traditional access control models rely on third-party entities to manage permissions and policies in zero-trust networks, which makes them prone to single points of failure like centralized models. They also lack risk assessment capabilities and cannot dynamically adjust access control policies.

Method used

We employ a blockchain-based BR-ABAC model to construct smart contracts and risk assessment algorithms. Through optimization using the LightGBM model and combined with Bayesian optimization algorithms, we build an access risk assessment model for user access control.

Benefits of technology

It enhances the security and dynamism of access control, enabling continuous assessment of user access risks and improving the security and efficiency of zero-trust networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116633615B_ABST
    Figure CN116633615B_ABST
Patent Text Reader

Abstract

The application discloses a kind of access control methods based on blockchain and risk assessment, comprising: constructing smart contract in BR-ABAC, and data collection is carried out;Risk assessment algorithm is constructed in BR-ABAC, access risk assessment model is constructed and optimized;Evaluation model performance, determine evaluation index and score function;The effect of model is verified using K-fold cross validation method;According to risk level division, the control to user access resource is realized.The access control method based on blockchain and risk assessment proposed in the application, compared with prior art, the access control method based on blockchain and risk assessment, according to the access control strategy set in the chain smart contract to determine whether the user has corresponding authority, effectively improve the security and dynamic advantage of access control;For the historical access behavior of user in zero trust network, the access risk of access subject is continuously evaluated every time access, which can effectively improve the security and efficiency of zero trust network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of zero trust network and the field of blockchain technology, and in particular to an access control method based on blockchain and risk assessment. BACKGROUND

[0002] With the development of new generation information technologies such as Internet, cloud computing and big data, the network structure becomes more and more complex, the traditional network security model mainly manages identity and access control for network boundary, and its defense means mainly relies on intercepting attacks outside the trusted internal network. Network infrastructure is increasingly complex, and security boundaries are gradually blurred. The traditional network security architecture and solution based on boundaries are difficult to adapt to modern enterprise network infrastructure. A new network security architecture is needed to cope with modern complex enterprise network infrastructure and increasingly severe network threat situation. The zero trust network security architecture is born in this background and is the inevitable evolution of security thinking and security architecture.

[0003] The essence of zero trust network is a new requirement for access control, and identity management is the basis of access control. Without identity management, zero trust network cannot be successfully implemented, and it is believed that network location should not be used to determine whether the access subject is trusted. Therefore, more accurate access risk assessment methods are needed in the access control process, regardless of the network location of the access subject, and the access behavior of the access subject is continuously assessed, so as to build an access control mechanism that meets the requirements of zero trust network.

[0004] In the zero trust network, the traditional access control model mainly relies on third-party entities to manage permissions and policies, which is prone to single point of failure inherent in centralized models and other problems. At the same time, dynamic access control strategies and trust evaluation strategies need to be set in the security model, regardless of the location of the access subject, and the access subject's access is judged and risk assessed each time. The traditional access control strategy does not have risk assessment capability. SUMMARY

[0005] This section is intended to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of the specification of the present application to avoid obscuring the purpose of this section, abstract and title, and such simplifications or omissions cannot be used to limit the scope of the present application.

[0006] In view of the above problems, the present application is proposed.

[0007] Therefore, the present application solves the technical problem: for the zero trust network, the traditional access control model mainly relies on the third party entity to manage the permission and policy, which is easy to appear the single point failure inherent in the centralized model and other problems, and the dynamic access control policy and trust evaluation policy need to be set in the security model, ignoring the location of the access subject, judging the permission and evaluating the risk of the access subject each time, and the traditional access control policy does not have the risk evaluation capability.

[0008] To solve the above technical problems, the present application provides the following technical solutions: an access control method based on blockchain and risk assessment, comprising:

[0009] An intelligent contract is constructed in BR-ABAC, and data collection is performed;

[0010] A risk assessment algorithm is constructed in BR-ABAC, an access risk assessment model is constructed and optimized;

[0011] The performance of the evaluation model is evaluated to determine the evaluation index and scoring function;

[0012] The K-fold cross-validation method is used to verify the model effect;

[0013] According to the risk level division, the control of the user access resource is realized.

[0014] As a preferred scheme of the access control method based on blockchain and risk assessment, the construction of the intelligent contract comprises,

[0015] A policy information contract is constructed, and the policy information contract is composed of three functions, namely, a getSAttr() function for obtaining attribute information of a subject, a getOAttr() function for obtaining attribute information of an object, and a getEAttr() function for obtaining attribute information of a current access environment;

[0016] A policy management contract is constructed, and the policy management contract is composed of a getPolicy() function for managing access policies of resources;

[0017] A policy execution contract is constructed, and the policy execution contract is composed of a processRequest() function for receiving an access request of a user and a decision() function;

[0018] A policy decision contract is constructed, and the policy decision contract is composed of a receive() function for receiving an access request of the policy execution contract;

[0019] As a preferred scheme of the access control method based on blockchain and risk assessment, the step of constructing the access risk assessment model and optimizing comprises,

[0020] The risk characteristics are defined, and the risk characteristics are composed of three parts, namely subject attribute characteristics, environment attribute characteristics and resource attribute characteristics;

[0021] The data is preprocessed;

[0022] The access risk assessment model is constructed based on the LightGBM model;

[0023] The LightGBM model is optimized by using the Bayesian optimization algorithm.

[0024] As a preferred scheme of the access control method based on the blockchain and risk assessment, the step of constructing the access risk assessment model comprises,

[0025] The optimization space is set for important parameters in the LightGBM model, an initial sample point is randomly generated according to the optimization space, the sample point is input into the Gaussian process, the LightGBM model is trained by using the training data, the inverse value of the root mean square error is taken as the final objective function value, and the Gaussian surrogate model is continuously corrected by using the objective function value;

[0026] The next set of parameters is selected from the corrected Gaussian surrogate model by using the acquisition function, and the corresponding objective function value is calculated, if the objective function value obtained by the current parameter combination is better than that of the last round, the data set and the Gaussian surrogate model are updated by using the parameter combination;

[0027] When the objective function value corresponding to a set of parameters meets the requirement, or the algorithm reaches the maximum number of iterations, the execution of the algorithm is terminated, and the current optimal parameter combination and the corresponding objective function value are output;

[0028] An optimal parameter is obtained after the Bayesian optimization, and the optimal parameter is used as the parameter of the LightGBM model, so as to construct the LightGBM access risk assessment model based on the Bayesian optimization.

[0029] As a preferred scheme of the access control method based on the blockchain and risk assessment, the performance of the evaluation model is measured by a determination coefficient R 2 The performance effect of the model is measured by a determination coefficient R

[0030] The calculation formula of the determination coefficient is:

[0031]

[0032] Wherein y i represents the real risk value of user access, represents the risk value predicted by the model, The average value of the user access risk value, n represents the sample number; the determination coefficient is an important index for measuring the overall fitting degree of the model, 0 2 <1, R 2 The closer to 1, the better the model fitting degree;

[0033] The calculation formula of the root mean square error is:

[0034]

[0035] Where y i The real risk value of the user access, The risk value predicted by the model, The average value of the user access risk value, n represents the sample number; the root mean square error reflects the overall error of the model, and the smaller the RMSE, the higher the accuracy of the model;

[0036] In combination with the specific problem of evaluating the user access risk value, the determination coefficient and the root mean square error are comprehensively evaluated, and the scoring function of the model is defined as,

[0037]

[0038] When the RMSE of the model is smaller, R 2 The closer to 1, the higher the accuracy of the model, the better the fitting degree, and the higher the score of the model. Through the score, the model most suitable for user access risk evaluation can be selected.

[0039] As a preferred scheme of the access control method based on blockchain and risk assessment provided by the application, wherein the process of controlling the user access resource according to the risk level division comprises,

[0040] The risk value is divided into four levels, 0-0.4 is R1 level, 0.4-0.6 is R2 level, 0.6-0.8 is R3 level, and 0.8-1.0 is R4 level;

[0041] Different levels of risk values correspond to different operations, R1 is the lowest level, and R4 is the highest level;

[0042] If the risk level is R1, the user is allowed to access this time; if the risk level is R2, the user is denied to access this time, and the user needs to re-authenticate; if the risk level is R3, all the user's access requests to the resource on the same day will be rejected; and if the risk level is R4, the user's access permission to the resource is cancelled.

[0043] As a preferred scheme of the access control method based on blockchain and risk assessment provided by the application, wherein the control flow of the access control method comprises,

[0044] The user sends an identity authentication request, and the request carries a uniform identity UID of the user and a digest value of identity information. Any access subject in the zero trust network needs to be authenticated before accessing any resource;

[0045] After the main chain agent node receives the user identity authentication request, the identity of the user in the slave chain is queried according to the UID of the user, and the authentication request is forwarded to the corresponding slave chain through the cross-chain communication layer; after the slave chain agent node receives the authentication request, the identity of the user is authenticated according to the UID of the user and the digest value of the identity information, and the authentication result is finally returned to the user;

[0046] After the user is authenticated, the user sends a request for accessing a resource, triggers a policy execution contract and a policy information contract, wherein the policy information contract obtains user access environment information this time by analyzing the request and saves the user access environment information this time;

[0047] The policy execution contract first calls the policy information contract, converts the user access control request into an attribute-based access request, and then calls the policy decision contract to determine whether the user has the permission to access the corresponding resource after the request conversion is completed;

[0048] The policy decision contract first calls the policy management contract to obtain resource policy information according to the resource ID, and then executes a decision process according to the attribute-based access request and the resource policy information, wherein if the user has the corresponding permission, the request is forwarded to the risk assessment layer; if the user does not have the permission, the user this time is directly rejected.

[0049] The risk assessment layer takes the user subject attribute information, the environment attribute information and the resource attribute information as inputs, calls a risk assessment algorithm, calculates a risk value of the user this time for accessing the resource, obtains a risk level of the user this time for accessing the resource, and performs a corresponding operation.

[0050] If the risk value of the user for accessing the resource is less than a specific value, the user this time is allowed to access; if the risk level of the user is higher than a specific value, the user this time is rejected.

[0051] To solve the above technical problems, the application further provides the following technical solutions: an access control system based on a block chain and risk assessment, comprising:

[0052] An identity authentication module is configured to authenticate the identity of the user, including a block chain-based identity authentication and a traditional password authentication mode;

[0053] A data collection and preprocessing module is configured to collect and preprocess access information of the user, including user identity information, access environment information and resource attribute information, so as to facilitate subsequent risk assessment and access control;

[0054] A risk assessment module uses the BR-ABAC policy as the basis for access control to build a smart contract, uses a machine learning algorithm to build an access risk assessment model, and controls the user's access according to the assessment results.

[0055] A blockchain management system is used to manage user identity information, permission information, and access record data, ensuring the security and integrity of the data.

[0056] An intelligent contract execution system is used to execute the access control policy in the intelligent contract and perform corresponding access control according to the user's access information and risk assessment results.

[0057] A risk assessment algorithm optimization system uses a Bayesian optimization algorithm to optimize the access risk assessment model, improving the accuracy and reliability of the model.

[0058] A monitoring and alarm system is used to monitor user access behavior in real time, detect abnormal behavior, and promptly alarm and handle it.

[0059] An access control log management system is used to record user access behavior, risk assessment results, and access control policy information for subsequent audit and management.

[0060] A user interface system is used to display access control results and prompt information to the user, allowing the user to understand their access permissions and access risks.

[0061] A computer device includes a memory and a processor, the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the method described in any one of the present invention.

[0062] A computer-readable storage medium stores a computer program, characterized in that the computer program is executed by a processor to implement the steps of the method described in the present invention.

[0063] The present invention has the following advantages: The access control method based on blockchain and risk assessment proposed in the present invention has the following advantages compared to the prior art. 1. The access control method based on blockchain and risk assessment determines whether the user has the corresponding permission according to the access control policy set in the smart contract on the chain, effectively improving the security and dynamics of access control. 2. The historical access behavior of users in the zero-trust network is continuously evaluated for access risk when each access is performed, effectively improving the security and efficiency of the zero-trust network. BRIEF DESCRIPTION OF DRAWINGS

[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only represent some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings. Among them:

[0065] Fig. 1 A workflow diagram of an access control method based on a blockchain and risk assessment provided for the first embodiment of the present application;

[0066] Fig. 2 An access control model architecture diagram of an access control method based on a blockchain and risk assessment provided for the first embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to make the above objectives, features and advantages of the present application more apparent and understandable, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should fall within the scope of protection of the present application.

[0068] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details, other than those described herein, and it is understood that the present application is not limited to the embodiments described herein and can be practiced with or without the other embodiments. Embodiments of the present application can be implemented using various computer hardware, software, firmware, and / or microcoding. Embodiments of the present application can be implemented using computer-readable media for carrying or having computer-executable instructions or data structures stored thereon. Some embodiments of the present application can be implemented using computer-readable media, such as storage media.

[0069] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.

[0070] The present application is described in detail in conjunction with the schematic diagram. In the detailed description of the embodiments of the present application, the cross-sectional view of the device structure is locally enlarged without the general proportion for the convenience of description, and the schematic diagram is only an example, which should not limit the scope of protection of the present application herein. In addition, three-dimensional spatial dimensions of length, width and depth should be included in actual manufacture.

[0071] Meanwhile, in the description of the present application, it should be noted that the terms "upper, lower, inner and outer" and the like indicate the orientation or positional relationship shown in the drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first, second or third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0072] Unless otherwise expressly specified and limited, the terms "mounting, connecting, connecting" in the present application should be understood broadly, for example: it can be fixed connection, detachable connection or integral connection; it can also be mechanical connection, electrical connection or direct connection, it can also be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0073] Embodiment 1

[0074] Reference Figs. 1-2 For an embodiment of the present application, a blockchain and risk assessment based access control method is provided, comprising:

[0075] S1: Constructing a smart contract in BR-ABAC and collecting data;

[0076] It should be noted that BR-ABAC is a role-based attribute access control model, and the purpose of constructing a smart contract in BR-ABAC is to manage the attribute information of the principal, object and access environment and the access policy of the resource, accept and execute the access request of the user.

[0077] Further, the construction steps of the smart contract in BR-ABAC include:

[0078] Step 1: Constructing a policy information contract, which is mainly used to manage the attribute information of the access principal, object and access environment. It is mainly composed of 3 functions, namely getting the attribute information of the principal getSAttr(), getting the attribute information of the object getOAttr() and getting the attribute information of the current access environment getEAttr().

[0079] It should be noted that the getSAttr() function is used to obtain the attribute information of the principal. When the BR-ABAC user initiates a resource access request, the user will carry his own UID, the getSAttr() function first queries the FID of the user according to the UID, then initiates a request to the master chain agent node to obtain the attribute information of the user, the master chain agent node sends the request to the cross-chain network layer, and finally forwards to the corresponding slave chain according to the FID to obtain the attribute information of the user.

[0080] It should be noted that the getOAttr() function is used to obtain the attribute information of the object, that is, to obtain the attribute information of the resource. When the resource owner publishes the resource, the attributes and ID of the resource are stored in the blockchain. Through the getOAttr() function, the attribute information of the resource can be obtained according to the resource ID.

[0081] It should be noted that the getEAttr() function is used to obtain the attribute information of the current access environment of the access subject. The access subject sends an access request to the blockchain through the https protocol, and obtains the environment context information of the access request by parsing the access request.

[0082] Step two: build a policy management contract, which is mainly used to manage the access policy of the resource, mainly composed of the getPolicy() function.

[0083] It should be noted that the getPolicy() function is used to store the access policy of the resource and the resource ID in the blockchain when the resource owner publishes the resource. Through the getPolicy() function, the access policy of the resource can be obtained according to the resource ID.

[0084] Step three: build a policy execution contract, and the core function of the policy execution contract is processRequest(). The processRequest() function is used to receive the access request of the user, and the parameters in the request include the UID of the user and the ID of the accessed resource. By calling the getSAttr() function in the policy information contract, the attributes of the user are obtained according to the UID of the user; the getOAttr() function is called to obtain the attributes of the accessed resource according to the resource ID; the getEAttr() function is called to obtain the attribute information of the current access environment of the access subject. According to the obtained attribute set, the user access request is converted into an attribute-based access request, and then the decision() function in the policy decision contract is called for judgment, and the judgment result is returned to the user.

[0085] Step four: build a policy decision contract, and the core function of the policy decision contract is decision(). The decision() function is used to receive the access request of the policy execution contract, which has been processed into an attribute-based access request by the policy execution contract. Then the getPolicy() function in the policy management contract is called to obtain the access policy information of the resource according to the resource ID, and the access request is judged with the access policy information. If the access request meets the resource access policy, the user is allowed to access. Otherwise, the user's access is denied. And this access decision process is recorded in the form of an event on the blockchain, and other nodes on the blockchain can listen to the occurrence of the event.

[0086] S2: Constructing a risk assessment algorithm in BR-ABAC, constructing an access risk assessment model and optimizing;

[0087] It should be noted that the purpose of the risk assessment algorithm in BR-ABAC is to prevent malicious users in a zero-trust network from illegally obtaining target resources.

[0088] Further, define risk features, which consist of three parts: subject attribute features, environment attribute features, and resource attribute features.

[0089] It should be noted that subject attributes are a description of user identity information, consisting of user account information and department affiliation. Different access subjects have different access habits, and subject attributes can uniquely determine an access subject.

[0090] It should be noted that environment attributes are a description of the network environment information when a user accesses a resource, consisting of request terminal IP, port number, virtual network domain number, switch IP, and access resource time. In a zero-trust network, all users are assumed to be untrusted, and regardless of where the user is in the network, identity authentication and risk assessment are required. Therefore, environment attributes are important feature indicators for building a risk assessment model.

[0091] It should be noted that resource attributes are a description of resource information, consisting of resource paths. If a normal user's historical access record does not include access to a certain resource, but a large number of requests to access that resource are made at a certain time, the user may be in an abnormal environment.

[0092] Based on the above attributes, a risk assessment model can be built to analyze the abnormal access behavior of an access subject, calculate the risk value of user access control, and ultimately allow or deny the user's access request based on the risk value.

[0093] Further, pre-process the data. The quality of the data used during training is related to the quality of the risk assessment model, so data preprocessing is an essential part of the model building process. The data preprocessing steps include:

[0094] Data cleaning: duplicate data and incomplete data may appear in the original data. Data cleaning is to eliminate these "dirty data" to improve the training effect of the model.

[0095] Data conversion: Most feature vectors in the original data are of string type and cannot be directly used for model training. Data conversion is to convert the string in the original data into a numerical type through label encoding. Label encoding converts the original string features into numbers between 0 and (N-1) (N is the number of all different values of the feature).

[0096] Further, a LightGBM (Light Gradient Boosting Decision Tree) model is used to build the access risk assessment model.

[0097] Further, the LightGBM model is optimized using a Bayesian optimization algorithm, and a LightGBM model based on Bayesian optimization is improved, and the construction process of the model is:

[0098] (1) Set the optimization space for important parameters in the LightGBM model, randomly generate an initial sample point according to the optimization space, input the sample point into the Gaussian process, and train the LightGBM model using the training data. In order to build an access risk assessment model with higher precision, the root mean square error value of the model is selected as the objective function value. Since the Bayesian optimization algorithm defaults to the parameter being optimal in the iteration process when the objective function value is larger, and the lower the root mean square error value indicates that the model prediction result is more accurate, therefore, the opposite value of the root mean square error is taken as the final objective function value, and the objective function value is used to continuously correct the Gaussian surrogate model.

[0099] (2) The next set of parameters is selected from the corrected Gaussian surrogate model through the acquisition function. The corresponding objective function value is calculated, and if the objective function value obtained by the current parameter combination is better than the last round, the parameter combination is used to update the data set and the Gaussian surrogate model.

[0100] (3) When the objective function value corresponding to a set of parameters meets the requirements, or the algorithm reaches the maximum number of iterations, the execution of the algorithm is terminated, and the current optimal parameter combination and the corresponding objective function value are output.

[0101] (4) After Bayesian optimization, a set of optimal parameters is obtained, which is used as the parameter of the LightGBM model, and a LightGBM access risk assessment model based on Bayesian optimization is constructed.

[0102] S3: Evaluate the performance of the model, determine the evaluation index and scoring function

[0103] Further, in order to compare and analyze the effects of access risk assessment models constructed by different machine learning algorithms, the present application uses the determination coefficient (R 2 ), the root mean square error (RMSE) index to measure the performance of the model.

[0104] The calculation formula of the determination coefficient is:

[0105]

[0106] Where y i represents the true risk value of user access, represents the risk value predicted by the model, This represents the average risk value for user access, where n represents the sample size. The coefficient of determination is an important indicator for measuring the overall goodness of fit of the model, 0. <R 2 <1,R 2 The closer the value is to 1, the better the model fit.

[0107] The formula for calculating the root mean square error is:

[0108]

[0109] Where y i This indicates the actual risk value of the user's access. This represents the risk value predicted by the model. This represents the average risk value for user visits, where n represents the number of samples. The root mean square error (RMSE) reflects the overall error of the model. A smaller RMSE indicates higher model accuracy.

[0110] To address the specific issue of assessing user access risk, this study comprehensively evaluates two indicators: the coefficient of determination and the root mean square error. The scoring function for the model is defined as follows:

[0111]

[0112] The smaller the RMSE of the model, the better the R 2 The closer the score is to 1, the higher the accuracy and the better the fit of the model, resulting in a higher model score. The score allows for the selection of the model most suitable for user access risk assessment.

[0113] S4: Use K-fold cross-validation to verify the model's effectiveness;

[0114] Furthermore, K-fold cross-validation is used to evaluate the model. K-fold cross-validation divides all training data into K parts, using K-1 parts as the training set and the remaining part as the validation set for model evaluation and validation, calculating the model's score for each validation. This process is repeated K times, and the average score after K validations is calculated. Finally, the model is evaluated and validated based on this average score. In this invention, K is set to 5, and 5-fold cross-validation is used to evaluate the model's true performance.

[0115] S5: Control over user access to resources based on risk level classification.

[0116] It should be noted that the risk assessment algorithm calculates the risk value of a user's access to resources based on attribute information, and the risk value is between 0 and 1.

[0117] Further, the risk value is divided into 4 levels, 0-0.4 is R1 level, 0.4-0.6 is R2 level, 0.6-0.8 is R3 level, and 0.8-1.0 is R4 level. Different levels of risk values correspond to different operations. R1 is the lowest level, and R4 is the highest level. If the risk level is R1, the user is allowed to access this time. If the risk level is R2, the user is denied access this time and needs to re-authenticate. If the risk level is R3, all the user's requests to access the resource on the same day will be rejected. If the risk level is R4, the user's access permission to the resource is canceled.

[0118] It should be noted that the user needs to authenticate his identity before accessing the resource each time. In the process of access control, the user's access risk value is calculated according to the different network environments he is in, which can better ensure the security of the resource. The BR-ABAC model follows the principle of least privilege on the basis of the ABAC model. Compared with the traditional access control model, the BR-ABAC model has better security and dynamics, and the BR-ABAC completely meets the requirements of access control in the zero trust network and is suitable for solving the problem of access control in the zero trust network.

[0119] Further, according to the user's historical access behavior, the access risk of the access subject each time is continuously evaluated to realize the secure access of the resource in the zero trust network. The main process includes:

[0120] The user sends an identity authentication request, which carries the user's unified identity (UID) and the digest value of the identity information. Any access subject in the zero trust network needs to authenticate his identity before accessing any resource.

[0121] After receiving the user identity authentication request, the main chain agent node queries the user's identity in the from chain (FID) according to the user's UID, and forwards the authentication request to the corresponding from chain through the cross-chain communication layer. After receiving the authentication request, the from chain agent node authenticates the user's identity according to the user UID and the digest value of the identity information, and finally returns the authentication result to the user.

[0122] After the user authenticates his identity, he issues a request to access the resource, triggering the policy execution contract and the policy information contract. The policy information contract saves the user's access environment information by analyzing the request.

[0123] The policy execution contract first calls the policy information contract to convert the user's access control request into an attribute-based access request. After the request conversion is completed, the policy decision contract is called to determine whether the user has the right to access the corresponding resource.

[0124] The policy decision contract first calls the policy management contract to obtain resource policy information according to the resource ID, and then performs a decision process according to the attribute-based access request and the policy information of the resource. If the user has the corresponding permission, the request is forwarded to the risk assessment layer. If the user does not have the permission, the user's access request is directly rejected.

[0125] The risk assessment layer takes the user subject attribute information, environment attribute information and resource attribute information as input, calls the risk assessment algorithm, calculates the risk value of the user's access to the resource, obtains the risk level of the user's access, and performs corresponding operations.

[0126] If the user access risk value is less than a certain value, the user's access is allowed. If the user risk level is higher than a certain value, the user's access is rejected.

[0127] The method uses a LightGBM model based on Bayesian optimization for risk assessment, compares it with four traditional methods based on decision tree, random forest, XGBoost and LightGBM risk assessment, verifies the stability of each model through five-fold cross-validation, and verifies the performance of each model on the test set. According to the evaluation index of the model, comparative analysis is carried out.

[0128] The embodiment also provides a computing device, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the access control method based on the blockchain and the risk assessment.

[0129] The embodiment also provides a storage medium having a computer program stored thereon, the program being executed by a processor to realize the access control method based on the blockchain and the risk assessment.

[0130] The storage medium proposed in the embodiment belongs to the same inventive concept as the access control method based on the blockchain and the risk assessment proposed in the above embodiment, and the technical details not described in detail in the embodiment can be referred to the above embodiment, and the embodiment has the same beneficial effects as the above embodiment.

[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments of each method. Any reference to memory, database or other medium used in each embodiment provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory, magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory, magnetic memory, ferroelectric memory, phase change memory, graphene memory, etc. Volatile memory can include random access memory or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory or dynamic random access memory, etc. The database involved in each embodiment provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in each embodiment provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0132] Embodiment 2

[0133] The following is a second embodiment of the present application, in order to verify the beneficial effects of the present application, scientific demonstration is carried out through simulation experiment.

[0134] 1. Experimental conditions: Intel(R) Xeon(R) CPU E3-1275 v5 @ 3.60GHz (3600MHz) memory 32GB WINDOWS 10 system is used for implementation using Pycharm.

[0135] 2. Experimental content: The data is derived from the data leakage prevention product log library of a certain company, mainly including user access behavior control log and audit log, all data has been desensitized and screened for security operation, and can be publicly used. The data is more meaningful for research than the simulation data, and the model and conclusion obtained are more in line with the actual situation. After data cleaning, there are a total of 528690 data, all data are divided into training set and test set according to the ratio of 4:1. Among them, the training set has a total of 422952 data, and the test set has a total of 105738 data. First, train five kinds of models through the training set, and then verify through the validation set,

[0136] 3. Experimental results: The average index of the model on different validation sets is obtained by five-fold cross-validation method, as shown in Table 1:

[0137] Table 1 Model five-fold cross-validation results

[0138]

[0139] From Table 1, after five cross-validations, the average scores of the decision tree model, the random forest model and the XGBoost model are stable below 4, and the score of the LightGBM model is stable around 4.5. Among them, the R 2 is stable around 0.858, and the RMSE is stable around 0.076, indicating that the LightGBM model performs well on the validation set. The average score of the LightGBM model based on Bayesian optimization is stable around 5, which is improved by about 0.4 compared with before optimization, among which the determination coefficient is improved by 0.026, and the root mean square error is reduced by 0.004. The optimized LightGBM model has better fitting degree and higher accuracy on the validation set.

[0140] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, which should be covered in the scope of the claims of the present application.

Claims

1. A blockchain and risk assessment based access control method, characterized in that, The application relates to a method for constructing a risk assessment model for user access risk assessment. The method comprises the following steps: In the BR-ABAC, a smart contract is constructed, and data collection is performed; In the BR-ABAC, a risk assessment algorithm is constructed, an access risk assessment model is constructed, and optimization is performed; The performance of the model is evaluated, evaluation indexes and a scoring function are determined; The model effect is verified by using a K-fold cross-validation method; According to the risk grade division, control over user access to resources is realized; The construction of the smart contract comprises the following steps: A policy information contract is constructed, the policy information contract is composed of three functions, namely a getSAttr function for acquiring attribute information of a subject, a getOAttr function for acquiring attribute information of an object and a getEAttr function for acquiring attribute information of a current access environment; A policy management contract is constructed, the policy management contract is composed of a getPolicy function for managing an access policy of a resource; A policy execution contract is constructed, the policy execution contract is composed of a processRequest function for receiving an access request of a user and a decision function; A policy decision contract is constructed, the policy decision contract is composed of a decision function for receiving an access request of the policy execution contract; The step of constructing the access risk assessment model and optimization comprises the following steps: Risk features are defined, the risk features are composed of three parts, namely subject attribute features, environment attribute features and resource attribute features; Data is preprocessed; An access risk assessment model is constructed based on a LightGBM model; The LightGBM model is optimized by using a Bayesian optimization algorithm; The step of constructing the access risk assessment model comprises the following steps: An initialization sample point is randomly generated in an optimization space of important parameters in the LightGBM model, the sample point is input into a Gaussian process, the LightGBM model is trained by using training data, the inverse value of a root mean square error is taken as a final objective function value, and the Gaussian surrogate model is continuously corrected by using the objective function value; The next parameter combination is selected from the corrected Gaussian surrogate model by using a collection function, and a corresponding objective function value is calculated; if the objective function value obtained by the current parameter combination is better than that of the last round, the parameter combination is used to update a data set and the Gaussian surrogate model; When the objective function value corresponding to a certain parameter combination meets a requirement or the algorithm reaches a maximum iteration number, the execution of the algorithm is terminated, and the current optimal parameter combination and the corresponding objective function value are output; 2. The blockchain and risk assessment based access control method of claim 1, wherein: The evaluation model performance is measured by the coefficient of determination R 2 The performance of the model is measured by the index, the root mean square error RMSE index An optimal parameter combination is obtained after the Bayesian optimization, the optimal parameter combination is used as a parameter of the LightGBM model, and a LightGBM access risk assessment model based on the Bayesian optimization is constructed. Wherein y i The real risk value of user access, The risk value predicted by the model, The average value of user access risk value, n represents the sample number; the determination coefficient is an important index to measure the overall fitting degree of the model, 0 2 <1, R 2 The closer to 1, the better the model fitting degree; The calculation formula of the coefficient of determination is: where y i the real risk value of user access, the risk value predicted by the model, the average value of the risk value of user access, n represents the number of samples; the root mean square error reflects the overall error of the model, and the smaller the RMSE, the higher the accuracy of the model; The calculation formula of the root mean square error is: The smaller the RMSE of the model is, the closer the R 2 The closer to 1, the higher the accuracy of the model, the better the fitting degree, and the higher the score of the model. In combination with the specific problem of evaluating the user access risk value, two indexes of the coefficient of determination and the root mean square error are comprehensively evaluated, and a scoring function of the model is defined as 3.The blockchain and risk assessment based access control method of claim 1, wherein: The scoring function can be used to select the most suitable model for user access risk assessment. The process of realizing control over user access to resources according to the risk grade division comprises the following steps: The risk value is divided into 4 levels, 0-0.4 is R1 level, 0.4-0.6 is R2 level, 0.6-0.8 is R3 level, and 0.8-1.0 is R4 level; Different levels of risk values correspond to different operations, R1 is the lowest level, and R4 is the highest level; If the risk level is R1, the user is allowed to access this time; if the risk level is R2, the user is denied access this time and needs to re-authenticate; if the risk level is R3, all resource access requests of the user on the same day will be rejected; and if the risk level is R4, the user's access permission to the resource is canceled.

4. The blockchain and risk assessment based access control method of claim 1, wherein: The flow of the access control method comprises, The user sends an identity authentication request, which carries the user's uniform identity UID and the digest value of the identity information; Any access subject in the zero trust network needs to authenticate the identity before accessing any resource; After receiving the user identity authentication request, the main chain agent node queries the user's identity in the slave chain FID according to the user's UID, and forwards the authentication request to the corresponding slave chain through the cross-chain communication layer; After receiving the authentication request, the slave chain agent node authenticates the user's identity according to the user UID and the digest value of the identity information, and finally returns the authentication result to the user; After the user passes the identity authentication, the user sends a request to access the resource, triggering the policy execution contract and the policy information contract, wherein the policy information contract obtains the user's access environment information this time by analyzing the request and saves it; The policy execution contract first calls the policy information contract to convert the user access control request into an attribute-based access request, and then calls the policy decision contract to determine whether the user has the right to access the corresponding resource after the request conversion is completed; The policy decision contract first calls the policy management contract to obtain the resource policy information according to the resource ID, and then executes the decision process according to the attribute-based access request and the resource policy information, and if the user has the corresponding right, the request is forwarded to the risk assessment layer; If the user does not have the right, the user's access request this time is directly rejected; The risk assessment layer takes the user subject attribute information, environment attribute information and resource attribute information as input, calls the risk assessment algorithm, calculates the risk value of the user accessing the resource this time, obtains the risk level of the user accessing this time, and performs the corresponding operation; If the user access risk value is less than a certain value, the user is allowed to access this time; If the user risk level is higher than a certain value, the user is denied access this time.

5. A blockchain and risk assessment based access control system, characterized in that, It comprises: An identity authentication module for authenticating the user's identity, including blockchain-based identity verification and traditional password verification methods; A data collection and preprocessing module for collecting and preprocessing user access information, including user identity information, access environment information and resource attribute information, to facilitate subsequent risk assessment and access control; A risk assessment module that uses BR-ABAC policy as the basis for access control to build smart contracts, uses machine learning algorithms to build an access risk assessment model, and controls the user's access according to the assessment results; A blockchain management system for managing user identity information, permission information and access record data to ensure data security and integrity. The smart contract execution system is used for executing access control policies in the smart contract and performing corresponding access control according to user access information and risk assessment results. The risk assessment algorithm optimization system uses a Bayesian optimization algorithm to optimize the access risk assessment model, improving the accuracy and reliability of the model. The monitoring and alarm system is used for real-time monitoring of user access behavior, discovering abnormal behavior and timely alarm and processing. The access control log management system is used for recording user access behavior, risk assessment results and access control policy information for subsequent audit and management. The user interface system is used to show the user access control results and prompt information, so that the user can understand his access rights and access risks.

6. A computer device comprising: Memory and processor The memory stores a computer program, and the processor executes the computer program to implement the steps of the method of any one of claims 1 to 4.

7. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Distributed access control method based on block chain

    CN112688927A