Uploaded image for project: 'Indy Node'
  1. Indy Node
  2. INDY-1969

It is possible to repeat the removal of a role from an Identity Owner

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Documentation Impact:
      Unset

      Description

      If a role is removed multiple times, the request is accepted and in case of repeated actions leads to "duplicates" (only reqId differs) of NYM txns in domain ledger.

      Steps to Reproduce

      • Add a steward role to a DID
      • Remove the steward role from the DID (set the DID role to None)
      • Remove the steward role from the DID again

      Actual Behavior

      • One transaction is written to the ledger setting the DID role to Steward
      • One transaction is written to the ledger setting the DID role to None
      • A second transaction is written to the ledger setting the DID role to None

      Expected Behavior

      • One transaction should be written to the ledger setting the DID role to Steward
      • One transaction should be written to the ledger setting the DID role to None
      • The second attempt to remove the Steward role should generate an error "The specified DID does not have the role"

      Example cases:

      • trustee creates steward without verkey - demotes it - demotes it again
      • trustee creates identity owner without verkey - demotes it (trustee here can be replaced with steward or trust_anchor)

      As a special case:

      • cidentity owner (with verkey) demotes themselves

      Notes:

      • This was found while working on implementation of new authentication rules in INDY-1730
      • In general, it should not be possible to write a transaction that does not modify the current state.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              andkononykhin Andrey Kononykhin
              Watchers:
              Andrey Kononykhin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: