## 4 Blockchain-Assisted Cloud Frameworks: Security Perspective
### Decentralized IDM Approaches  
IDM plays a crucial role in the case where users as well as providers are concerned about security. By virtue of IDM, unauthorized users can not obtain access to protected resources. In the case of a cloud environment, the service provider is responsible for the issuance of a user's requested resources. The resource-requesting user needs to be properly authenticated by an entity known as an IDP [67]. There are different cloud IDM models such as isolated IDM, centralized IDM, federated IDM, and anonymous IDM [34,68]. The problems with all of these models are defined below. * In isolated IDM, the service provider is responsible for providing service and identity as well. Hence, a single point of failure/centralization issue may be possible [69]. * Centralized IDM is also based on the centralization concept. Here, the service provider is responsible for providing service and all the identity credentials, which are stored in IDP. Due to this, privacy protection issues can arise here [70]. * The centralized problem is solved in federated IDM. Here, the identity information is stored in multiple locations, so security is the main problem with this type of IDM [71,72]. * Anonymous IDM keeps the entities' identities secret from others. In this scenario, trust issues can arise [73]. To avoid the above-listed issues, researchers have proposed several blockchain-based IDM models for cloud environments, which are discussed below. To avoid the problems in centralized IDM systems and overcome the issues in federated IDM, [PERSON] et al. have proposed a blockchain-enabled trust model for IDM in the cloud [74]. In this model, three entities are involved: cloud users, CSPs, and the Trust Management Platform (TMP). The TMP is nothing but a blockchain network and CSPs are the nodes of this network. Here, the authentication and access depend upon two kinds of CSPs, one is the home CSP and the other, with which the resource-requesting user is not registered, is the foreign CSP. An access token is generated by the home CSP for a specific user request. Once the token is validated and stored in blockchain then the foreign CSP will send the requested resource to the user. The workflow of this model is illustrated in Figure 9, which consists of the following steps:  
* The cloud user requests protected data from the CSP. * If the CSP is a foreign CSP for the requested user, then it send the user to its home CSP for authentication purposes. * The home CSP generates an access token for the user and keeps it in a blockchain. * The foreign CSP allows the user to access the data, after verifying the access token stored in the blockchain. In 2019, an Ethereum-based cloud user IDM protocol was proposed [75] to resolve the single point failure in third-party IDM systems. A user, CSP, Ethereum wallet, and Ethereum blockchain are the entities of this model. Users and the cloud need to register first in an Ethereum wallet. After registration, they will receive their public and private key pair. The user will enter their details in a smart contract and by gathering user details the cloud will generate a JSON Web Token (JWT). Then, it is encrypted by key \"k\" and the encrypted JWT is passed to Base64 (X = Base64(encrypted JWT)). The \"k\" is encrypted by using the user's public key and the cloud uploads the X and \"k\" in smart contracts. The user will receive the X and \"k\" from the Ethereum blockchain. After decryption, the user will then encrypt the JWT and a random value \"r\" with the cloud's public key and send it to the cloud. The cloud will match the received JWT with its previously generated JWT, if matched, and then calculate the hash of the JWT and \"r\". Then, it will upload it in a smart contract and send a verification request to the user. The user will also calculate the hash of the JWT and \"r\" then upload it into the smart contract. The Ethereum blockchain will verify both the hashes; if both are equal, then it permits further communication.