Tools, FAQ, Tutorials:
Hyperledger Composer Access Control File
What Is Hyperledger Composer Access Control (*.acl)?
✍: FYIcenter.com
A Hyperledger Composer Access Control file
is a source code file that define access control rules of
which participant can access which assets and execute which transactions.
A access control file uses the Access Control Language (ACL) and the .acl file extension. Here is an example of an access control file from the Basic Sample Business Network, permissions.acl:
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Sample access control list.
*/
rule EverybodyCanReadEverything {
description: "Allow all participants read access to all resources"
participant: "org.example.basic.SampleParticipant"
operation: READ
resource: "org.example.basic.*"
action: ALLOW
}
rule EverybodyCanSubmitTransactions {
description: "Allow all participants to submit transactions"
participant: "org.example.basic.SampleParticipant"
operation: CREATE
resource: "org.example.basic.SampleTransaction"
action: ALLOW
}
rule OwnerHasFullAccessToTheirAssets {
description: "Allow all participants full access to their assets"
participant(p): "org.example.basic.SampleParticipant"
operation: ALL
resource(r): "org.example.basic.SampleAsset"
condition: (r.owner.getIdentifier() === p.getIdentifier())
action: ALLOW
}
rule SystemACL {
description: "System ACL to permit all access"
participant: "org.hyperledger.composer.system.Participant"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
Â
⇒ Hyperledger Composer Access Query File
⇠Hyperledger Composer Script File
2020-11-22, ∼1231🔥, 0💬
Popular Posts:
How To Read Data from Keyboard (Standard Input) in PHP? If you want to read data from the standard i...
Where to find tutorials on Using Azure API Management Publisher Dashboard? Here is a list of tutoria...
How to use the JSON to XML Conversion Tool at utilities-online.info? If you want to try the JSON to ...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
How To Set session.gc_divisor Properly in PHP? As you know that session.gc_divisor is the frequency ...