forked from hyperledger/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hyperledger#1704 from pSchlarb/master
LF Endings
- Loading branch information
Showing
2 changed files
with
268 additions
and
268 deletions.
There are no files selected for viewing
264 changes: 132 additions & 132 deletions
264
acceptance/indy-cli-batches/AS-03-01-identity-owner-anyone-can-write.batch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,133 +1,133 @@ | ||
# setup environment | ||
- pool create AS-0301-owner gen_txn_file=./pool_transactions_genesis | ||
pool connect AS-0301-owner | ||
- wallet create AS-03-wallet-owner key=testkey storage_config={"pool":"AS-0301-owner"} | ||
wallet open AS-03-wallet-owner key=testkey | ||
################# | ||
# setup section # | ||
################# | ||
did new seed=000000000000000000000000Trustee1 metadata="Default Trustee" | ||
did new seed=TestTrustee100000000000000000003 metadata="test trustee 1" | ||
did new seed=TestTrustee200000000000000000003 metadata="test trustee 2" | ||
did new seed=TestSteward100000000000000000003 metadata="test steward 1" | ||
# did new seed=TestSteward300000000000000000003 metadata="test steward 3" | ||
did new seed=TestSteward200000000000000000003 metadata="test steward 2" | ||
did new seed=TestEndorser10000000000000000003 metadata="test endorser 1" | ||
did new seed=TestEndorser20000000000000000003 metadata="test endorser 2" | ||
did new seed=TestEndorser30000000000000000003 metadata="test endorser 3" | ||
did new seed=RandomUser1000000000000000000003 metadata="test identity 1" | ||
did new seed=RandomUser2000000000000000000003 metadata="test identity 2" | ||
did new seed=RandomUser3000000000000000000003 metadata="test identity 3" | ||
did new seed=NetworkMonitor000000000000000001 metadata="network monitor 1" | ||
did new seed=NetworkMonitor000000000000000002 metadata="network monitor 2" | ||
did new seed=NetworkMonitor000000000000000003 metadata="network monitor 3" | ||
# AS Trustee CREATE Steward (steward1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=AhqUV2zHYdNaWLFCCe7xCn role=STEWARD verkey=~YUY2ChUGWJovtU6XTn61D8 | ||
- ledger get-nym did=AhqUV2zHYdNaWLFCCe7xCn | ||
# AS Trustee CREATE NetworkMonitor (network monitor 1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=GSoagH52cX69hnn7npUTWy role=NETWORK_MONITOR verkey=~5JEp1pUJbzD1YqimvA6hk6 | ||
- ledger get-nym did=GSoagH52cX69hnn7npUTWy | ||
# AS Trustee CREATE NetworkMonitor (network monitor 2) and blacklist it | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role=NETWORK_MONITOR verkey=~MnEdozF43zQFRdZLN25mya | ||
ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role= | ||
- ledger get-nym did=CjPA39BhAVG5d3mV2ZEAYE | ||
# AS Trustee CREATE Endorser (endorser1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=DriVwCMbtEgkmoEHKin6Ah role=ENDORSER verkey=~YPZot1kM4DLwvsX6mtcKd9 | ||
- ledger get-nym did=DriVwCMbtEgkmoEHKin6Ah | ||
# AS Trustee CREATE IdentityOwner (user1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=LBbKEeczA9iL21p4Kgxcuf verkey=~3ZvjdaYs4cdFYXAwNGR85p | ||
- ledger get-nym did=LBbKEeczA9iL21p4Kgxcuf | ||
################ | ||
# test section # | ||
################ | ||
### Actions with NYMs ### | ||
# #1.1 AS IdentityOwner REMOVE Trustee (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=V4SGRU86Z58d6TV7PBUe6f role= | ||
# #1.2 CHECK Trustee IS VALID | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=CYdQe2tmSwhv2XdicegoAn role=TRUSTEE verkey=~E7MjQHm14YnmZD9RErTBsi | ||
- ledger get-nym did=CYdQe2tmSwhv2XdicegoAn | ||
# #2 AS IdentityOwner CREATE Trustee (trustee1) (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=FiAsNdcWnpB2L22ZUGyKHa role=TRUSTEE verkey=~BZHjLX8NYwJXPTE746hn6Y | ||
- ledger get-nym did=FiAsNdcWnpB2L22ZUGyKHa | ||
# #3.1 AS IdentityOwner REMOVE Steward (steward1) (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=AhqUV2zHYdNaWLFCCe7xCn role= | ||
# #3.2 CHECK Steward IS VALID | ||
did use AhqUV2zHYdNaWLFCCe7xCn | ||
ledger nym did=4xuWDwsQSqzQmYSheSWFyg role=ENDORSER verkey=~BmnEpJMi6kJHUcxcVJa2R4 | ||
- ledger get-nym did=4xuWDwsQSqzQmYSheSWFyg | ||
# #4 AS IdentityOwner CREATE Steward (steward2) (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=CbPwHxKEibPhV4pgXWpu26 role=STEWARD verkey=~MviYa49QADQXAM68WSiLPD | ||
- ledger get-nym did=CbPwHxKEibPhV4pgXWpu26 | ||
# #5.1 AS IdentityOwner REMOVE Endorser (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=DriVwCMbtEgkmoEHKin6Ah role= | ||
# #5.2 CHECK Endorser IS VALID | ||
did use DriVwCMbtEgkmoEHKin6Ah | ||
ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG verkey=~UpRqa9gQ1jsbUBvKYPtWSo | ||
- ledger get-nym did=Q8uxmCGdXgLHHtaTwYtVJG | ||
# #6 AS IdentityOwner CREATE Endorser (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=2b6xTx2HniDU77nxHm6zWB role=ENDORSER verkey=~HF34ymwfTJngb8zFDmCyvX | ||
- ledger get-nym did=2b6xTx2HniDU77nxHm6zWB | ||
# #7.1 AS IdentityOwner CREATE IdentityOwner (PASS with ANYONE_CAN_WRITE=True) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
ledger nym did=Fk9ENxnz1ztDgdivQBJTCZ verkey=~NT9ANFeDhCLKDg5PNKZXKK | ||
- ledger get-nym did=Fk9ENxnz1ztDgdivQBJTCZ | ||
# #8 AS IdentityOwner CREATE NetworkMonitor (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=Nd4dUF85aa1JmDFScLfk7o role=NETWORK_MONITOR verkey=~5aJLqtphR3tqymWUwg98Sz | ||
# #9.1 AS IdentityOwner REMOVE NetworkMonitor (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=GSoagH52cX69hnn7npUTWy role= | ||
# #9.2 CHECK NetworkMonitor IS VALID | ||
did use GSoagH52cX69hnn7npUTWy | ||
ledger get-validator-info nodes=Node1 | ||
# #10 check that can't add roles back when don't have necessary permissions | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=ENDORSER | ||
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=STEWARD | ||
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=TRUSTEE | ||
- ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role=NETWORK_MONITOR | ||
### Additional cases ### | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
did new seed=RandomAttribOwner000000000000003 | ||
ledger nym did=UffJCJngTXc1o84dQ7aEUb verkey=~J4HtnGz2wW2nE7VuMeg39M | ||
did new seed=RandomUserForRotateKey0000000003 | ||
ledger nym did=X3zYajU7gbz9Pu8k6E7Ppf verkey=~3ZDo6g4ZDRKGauKrR452xU | ||
# Only owner can edit existing NYMs | ||
did use X3zYajU7gbz9Pu8k6E7Ppf | ||
did rotate-key seed=RandomUserForRotateKey0NewKey003 | ||
# Not owner can't edit existing NYMs (FAIL) | ||
did use UffJCJngTXc1o84dQ7aEUb | ||
- ledger nym did=X3zYajU7gbz9Pu8k6E7Ppf verkey=~3ZDo6g4ZDRKGauKrR452xU | ||
# Only owners can create ATTRIBs | ||
did use X3zYajU7gbz9Pu8k6E7Ppf | ||
ledger attrib did=X3zYajU7gbz9Pu8k6E7Ppf raw={"endpoint":{"ha":"127.0.0.1:5555"}} | ||
# Only owners can edit ATTRIBs | ||
ledger attrib did=X3zYajU7gbz9Pu8k6E7Ppf raw={"endpoint":{"ha":"127.0.0.1:6666"}} | ||
# Not owner can't create attrib (FAIL) | ||
did use X3zYajU7gbz9Pu8k6E7Ppf | ||
- ledger attrib did=UffJCJngTXc1o84dQ7aEUb raw={"endpoint":{"ha":"127.0.0.1:5555"}} | ||
# Not owner can't edit attrib (FAIL) | ||
did use UffJCJngTXc1o84dQ7aEUb | ||
- ledger attrib did=X3zYajU7gbz9Pu8k6E7Ppf raw={"endpoint":{"ha":"127.0.0.1:5555"}} | ||
# Identity Owner can create SCHEMA: (PASS with ANYONE_CAN_WRITE=True) | ||
ledger schema name=IdentityOwnerSchema version=1.0 attr_names=name,age | ||
# Identity Owner can create CLAIM_DEF: (PASS with ANYONE_CAN_WRITE=True, but will fail because of wrong schema id) | ||
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=3 | ||
# Identity Owner can't RESTART POOL | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger pool-restart action=start datetime=2020-01-25T12:49:05.258870+00:00 nodes=Node4 | ||
# Identity Owner can't get validator-info | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
# setup environment | ||
- pool create AS-0301-owner gen_txn_file=./pool_transactions_genesis | ||
pool connect AS-0301-owner | ||
- wallet create AS-03-wallet-owner key=testkey storage_config={"pool":"AS-0301-owner"} | ||
wallet open AS-03-wallet-owner key=testkey | ||
################# | ||
# setup section # | ||
################# | ||
did new seed=000000000000000000000000Trustee1 metadata="Default Trustee" | ||
did new seed=TestTrustee100000000000000000003 metadata="test trustee 1" | ||
did new seed=TestTrustee200000000000000000003 metadata="test trustee 2" | ||
did new seed=TestSteward100000000000000000003 metadata="test steward 1" | ||
# did new seed=TestSteward300000000000000000003 metadata="test steward 3" | ||
did new seed=TestSteward200000000000000000003 metadata="test steward 2" | ||
did new seed=TestEndorser10000000000000000003 metadata="test endorser 1" | ||
did new seed=TestEndorser20000000000000000003 metadata="test endorser 2" | ||
did new seed=TestEndorser30000000000000000003 metadata="test endorser 3" | ||
did new seed=RandomUser1000000000000000000003 metadata="test identity 1" | ||
did new seed=RandomUser2000000000000000000003 metadata="test identity 2" | ||
did new seed=RandomUser3000000000000000000003 metadata="test identity 3" | ||
did new seed=NetworkMonitor000000000000000001 metadata="network monitor 1" | ||
did new seed=NetworkMonitor000000000000000002 metadata="network monitor 2" | ||
did new seed=NetworkMonitor000000000000000003 metadata="network monitor 3" | ||
# AS Trustee CREATE Steward (steward1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=AhqUV2zHYdNaWLFCCe7xCn role=STEWARD verkey=~YUY2ChUGWJovtU6XTn61D8 | ||
- ledger get-nym did=AhqUV2zHYdNaWLFCCe7xCn | ||
# AS Trustee CREATE NetworkMonitor (network monitor 1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=GSoagH52cX69hnn7npUTWy role=NETWORK_MONITOR verkey=~5JEp1pUJbzD1YqimvA6hk6 | ||
- ledger get-nym did=GSoagH52cX69hnn7npUTWy | ||
# AS Trustee CREATE NetworkMonitor (network monitor 2) and blacklist it | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role=NETWORK_MONITOR verkey=~MnEdozF43zQFRdZLN25mya | ||
ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role= | ||
- ledger get-nym did=CjPA39BhAVG5d3mV2ZEAYE | ||
# AS Trustee CREATE Endorser (endorser1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=DriVwCMbtEgkmoEHKin6Ah role=ENDORSER verkey=~YPZot1kM4DLwvsX6mtcKd9 | ||
- ledger get-nym did=DriVwCMbtEgkmoEHKin6Ah | ||
# AS Trustee CREATE IdentityOwner (user1) | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=LBbKEeczA9iL21p4Kgxcuf verkey=~3ZvjdaYs4cdFYXAwNGR85p | ||
- ledger get-nym did=LBbKEeczA9iL21p4Kgxcuf | ||
################ | ||
# test section # | ||
################ | ||
### Actions with NYMs ### | ||
# #1.1 AS IdentityOwner REMOVE Trustee (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=V4SGRU86Z58d6TV7PBUe6f role= | ||
# #1.2 CHECK Trustee IS VALID | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
ledger nym did=CYdQe2tmSwhv2XdicegoAn role=TRUSTEE verkey=~E7MjQHm14YnmZD9RErTBsi | ||
- ledger get-nym did=CYdQe2tmSwhv2XdicegoAn | ||
# #2 AS IdentityOwner CREATE Trustee (trustee1) (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=FiAsNdcWnpB2L22ZUGyKHa role=TRUSTEE verkey=~BZHjLX8NYwJXPTE746hn6Y | ||
- ledger get-nym did=FiAsNdcWnpB2L22ZUGyKHa | ||
# #3.1 AS IdentityOwner REMOVE Steward (steward1) (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=AhqUV2zHYdNaWLFCCe7xCn role= | ||
# #3.2 CHECK Steward IS VALID | ||
did use AhqUV2zHYdNaWLFCCe7xCn | ||
ledger nym did=4xuWDwsQSqzQmYSheSWFyg role=ENDORSER verkey=~BmnEpJMi6kJHUcxcVJa2R4 | ||
- ledger get-nym did=4xuWDwsQSqzQmYSheSWFyg | ||
# #4 AS IdentityOwner CREATE Steward (steward2) (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=CbPwHxKEibPhV4pgXWpu26 role=STEWARD verkey=~MviYa49QADQXAM68WSiLPD | ||
- ledger get-nym did=CbPwHxKEibPhV4pgXWpu26 | ||
# #5.1 AS IdentityOwner REMOVE Endorser (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=DriVwCMbtEgkmoEHKin6Ah role= | ||
# #5.2 CHECK Endorser IS VALID | ||
did use DriVwCMbtEgkmoEHKin6Ah | ||
ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG verkey=~UpRqa9gQ1jsbUBvKYPtWSo | ||
- ledger get-nym did=Q8uxmCGdXgLHHtaTwYtVJG | ||
# #6 AS IdentityOwner CREATE Endorser (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=2b6xTx2HniDU77nxHm6zWB role=ENDORSER verkey=~HF34ymwfTJngb8zFDmCyvX | ||
- ledger get-nym did=2b6xTx2HniDU77nxHm6zWB | ||
# #7.1 AS IdentityOwner CREATE IdentityOwner (PASS with ANYONE_CAN_WRITE=True) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
ledger nym did=Fk9ENxnz1ztDgdivQBJTCZ verkey=~NT9ANFeDhCLKDg5PNKZXKK | ||
- ledger get-nym did=Fk9ENxnz1ztDgdivQBJTCZ | ||
# #8 AS IdentityOwner CREATE NetworkMonitor (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=Nd4dUF85aa1JmDFScLfk7o role=NETWORK_MONITOR verkey=~5aJLqtphR3tqymWUwg98Sz | ||
# #9.1 AS IdentityOwner REMOVE NetworkMonitor (FAIL) | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=GSoagH52cX69hnn7npUTWy role= | ||
# #9.2 CHECK NetworkMonitor IS VALID | ||
did use GSoagH52cX69hnn7npUTWy | ||
ledger get-validator-info nodes=Node1 | ||
# #10 check that can't add roles back when don't have necessary permissions | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=ENDORSER | ||
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=STEWARD | ||
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=TRUSTEE | ||
- ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role=NETWORK_MONITOR | ||
### Additional cases ### | ||
did use V4SGRU86Z58d6TV7PBUe6f | ||
did new seed=RandomAttribOwner000000000000003 | ||
ledger nym did=UffJCJngTXc1o84dQ7aEUb verkey=~J4HtnGz2wW2nE7VuMeg39M | ||
did new seed=RandomUserForRotateKey0000000003 | ||
ledger nym did=X3zYajU7gbz9Pu8k6E7Ppf verkey=~3ZDo6g4ZDRKGauKrR452xU | ||
# Only owner can edit existing NYMs | ||
did use X3zYajU7gbz9Pu8k6E7Ppf | ||
did rotate-key seed=RandomUserForRotateKey0NewKey003 | ||
# Not owner can't edit existing NYMs (FAIL) | ||
did use UffJCJngTXc1o84dQ7aEUb | ||
- ledger nym did=X3zYajU7gbz9Pu8k6E7Ppf verkey=~3ZDo6g4ZDRKGauKrR452xU | ||
# Only owners can create ATTRIBs | ||
did use X3zYajU7gbz9Pu8k6E7Ppf | ||
ledger attrib did=X3zYajU7gbz9Pu8k6E7Ppf raw={"endpoint":{"ha":"127.0.0.1:5555"}} | ||
# Only owners can edit ATTRIBs | ||
ledger attrib did=X3zYajU7gbz9Pu8k6E7Ppf raw={"endpoint":{"ha":"127.0.0.1:6666"}} | ||
# Not owner can't create attrib (FAIL) | ||
did use X3zYajU7gbz9Pu8k6E7Ppf | ||
- ledger attrib did=UffJCJngTXc1o84dQ7aEUb raw={"endpoint":{"ha":"127.0.0.1:5555"}} | ||
# Not owner can't edit attrib (FAIL) | ||
did use UffJCJngTXc1o84dQ7aEUb | ||
- ledger attrib did=X3zYajU7gbz9Pu8k6E7Ppf raw={"endpoint":{"ha":"127.0.0.1:5555"}} | ||
# Identity Owner can create SCHEMA: (PASS with ANYONE_CAN_WRITE=True) | ||
ledger schema name=IdentityOwnerSchema version=1.0 attr_names=name,age | ||
# Identity Owner can create CLAIM_DEF: (PASS with ANYONE_CAN_WRITE=True, but will fail because of wrong schema id) | ||
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=3 | ||
# Identity Owner can't RESTART POOL | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger pool-restart action=start datetime=2020-01-25T12:49:05.258870+00:00 nodes=Node4 | ||
# Identity Owner can't get validator-info | ||
did use LBbKEeczA9iL21p4Kgxcuf | ||
- ledger get-validator-info nodes=Node1 |
Oops, something went wrong.