Research Article
[Retracted] Enabling Decentralized and Auditable Access Control for IoT through Blockchain and Smart Contracts
| contract policy: | | register(domainID, XACMLfile): | | // verify if the policy exists | | if ! exist(hash(XACMLfile)) then | | put(domainID, hash(XACMLfile)) | | store(XACMLfile) | | return true | | else | | return false | | end if | | query(domainID): | | policy = get(domainID) | | if error != nil then | | return error | | //error occurred | | else | | return policy | | // hash value of policy returned | | end if | | evaluate(domainID, XACMLrequest): | | policy = get(domainID) | | if error != nil then | | return error | | //error occurred | | else | | response = match(policy, XACMLrequest) | | return response | | end if |
|