Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade IDIM Issuers to ACA-Py v0.10.2 and Askar only images. #109

Closed
8 tasks done
WadeBarnes opened this issue Aug 31, 2023 · 83 comments
Closed
8 tasks done

Upgrade IDIM Issuers to ACA-Py v0.10.2 and Askar only images. #109

WadeBarnes opened this issue Aug 31, 2023 · 83 comments
Assignees

Comments

@WadeBarnes
Copy link
Member

WadeBarnes commented Aug 31, 2023

  • DEV
    • Rotate RevReg: cred_def_id XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV
  • SIT - Before September 6th
    • Rotate RevReg: cred_def_id 7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT
  • QA - Before September 6th
    • Rotate RevReg: cred_def_id KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA
  • Prod - September 28th
    • Rotate RevReg: cred_def_id RGjWbW1eycP7FrMf4QJvX8:3:CL:13:Person

Related task:

@WadeBarnes WadeBarnes self-assigned this Aug 31, 2023
@WadeBarnes
Copy link
Member Author

Response from /revocation/active-registry/XpgeQa93eZvGSZBZef3PHn%3A3%3ACL%3A28075%3APersonDEV/rotate for dev:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:d3f96e1c-951a-4a9b-9d31-6a6d921ee0c8",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1b6373a4-3200-4cbd-89c2-0984283e50f9"
  ]
}

@WadeBarnes
Copy link
Member Author

Response from /revocation/active-registry/XpgeQa93eZvGSZBZef3PHn%3A3%3ACL%3A28075%3APersonDEV/rotate for sit:

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:50205010-00ae-4e47-b513-4ded5df05727",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:6b8710bb-79c8-4846-b257-378853336abf"
  ]
}

@WadeBarnes
Copy link
Member Author

Response from /revocation/active-registry/XpgeQa93eZvGSZBZef3PHn%3A3%3ACL%3A28075%3APersonDEV/rotate for qa:

{
  "rev_reg_ids": [
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:b8ada6b0-c3c6-4e26-bb52-3b1aa9bef1b8",
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:921ca010-04e7-4667-b613-5037e0459551"
  ]
}

@usingtechnology
Copy link

do we know the states of the registries (that are failing)?

if they are state=="init" nothing happens, and if they are not "active", then a new registry isn't created.

@WadeBarnes
Copy link
Member Author

Where would I get that info?

@usingtechnology
Copy link

Try: GET /revocation/registry/{rev_reg_id}

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 6, 2023

dev - both "state": "decommissioned":

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:d3f96e1c-951a-4a9b-9d31-6a6d921ee0c8",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1b6373a4-3200-4cbd-89c2-0984283e50f9"
  ]
}

sit - both "state": "decommissioned":

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:50205010-00ae-4e47-b513-4ded5df05727",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:6b8710bb-79c8-4846-b257-378853336abf"
  ]
}

qa - both "state": "decommissioned":

{
  "rev_reg_ids": [
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:b8ada6b0-c3c6-4e26-bb52-3b1aa9bef1b8",
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:921ca010-04e7-4667-b613-5037e0459551"
  ]
}

@usingtechnology
Copy link

Sigh, ok so they can get set to decommissioned and not kick off an init new registry. What we really need to know is (and I don't know how we could now...) is the state before the rotate call. It has to be "active" when you call rotate to kick off the init process.

@WadeBarnes
Copy link
Member Author

They were active before the rotate call. All were being actively used to issue and revoke credentials.

@swcurran
Copy link
Contributor

swcurran commented Sep 6, 2023

Looks to me like the RevReg rotation didn’t work. I don’t see any new RevRegDefs on CandyScan Dev, where the DIDs seem to be — not on Dev or SIT. It looks like the RevRegs were decommissioned, but the new RevRegDefs were not created.

@swcurran
Copy link
Contributor

swcurran commented Sep 6, 2023

They were active before the rotate call. All were being actively used to issue and revoke credentials.

That is the purpose of the rotate — to decommission the ones that were active, and to create new ones that become the active one. However, it looks like the creation step didn’t work in this execution.

@usingtechnology
Copy link

Well, someone put in a PATCH /revocation/registry/{rev_reg_id}/set-state?state=active API... it;s either that or create a new registry but don't think that's what you want?

I suppose if it doesn't get back to issuing then it will be POST /revocation/create-registry but that seems heavy handed.

@usingtechnology
Copy link

They were active before the rotate call. All were being actively used to issue and revoke credentials.

That is the purpose of the rotate — to decommission the ones that were active, and to create new ones that become the active one. However, it looks like the creation step didn’t work in this execution.

Yeah, the only thing I can see is that kicking off the "init" process is dependent on notifications on the event bus... which is the same no matter when it's created but any chance of a message being missed? 🤷

@usingtechnology
Copy link

They were active before the rotate call. All were being actively used to issue and revoke credentials.

That is the purpose of the rotate — to decommission the ones that were active, and to create new ones that become the active one. However, it looks like the creation step didn’t work in this execution.

Just to be clear, it will mark other registries as "decommissioned" but will only create/init a new one if the current state is active. So just because it is marked decommissioned after the call doesn't mean that it was active before the call.

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 6, 2023

I confirmed the state by looking at the state in the prod environment, which has not been rotated yet. All of the environments were identical, and the state in prod is active. So I'd expect that new RevRegs would have been created.

@swcurran
Copy link
Contributor

swcurran commented Sep 6, 2023

Agree — they must have been active.

@WadeBarnes
Copy link
Member Author

So the fix in this case is to create new registries manually using /revocation/create-registry; correct?

@usingtechnology
Copy link

I confirmed the state by looking at the state in the prod environment, which has not been rotated yet. All of the environments were identical, and the state in prod is active. SO I'd expect that new RevRegs would have been created.

OK, that sounds good and narrows it down... so more along the lines of what i put above and a hiccup on the notification...?

            init = IssuerRevRegRecord.STATE_ACTIVE == rec.state
            await self._set_registry_status(
                rec.revoc_reg_id, IssuerRevRegRecord.STATE_DECOMMISSIONED, init
            )
        if (state in IssuerRevRegRecord.TERMINAL_STATES) and init:
            return await self.init_issuer_registry(
                registry.cred_def_id,
                registry.max_cred_num,
                registry.revoc_def_type,
            )

terminal states are full and decommissioned, so if you pass in either of those AND that you want to init (prev state was active) then kick off the init process - which uses notifications and event bus.

@WadeBarnes
Copy link
Member Author

Sorry, not sure what all that means.

@usingtechnology
Copy link

So the fix in this case is to create new registries manually using /revocation/create-registry; correct?

I think so. POST body is something like this:

{
  "credential_definition_id": cred_def_id, 
  "max_cred_num": 1000
}

@usingtechnology
Copy link

Sorry, not sure what all that means.

just showing the key parts of the logic on rotate... if they were active then init was true and it should have kicked off the init_issuer_registry... since they were active and we didn't get a new registry was just looking at points of failure. first thing I would think of is the notification didn't get pushed or received that does the work.

@WadeBarnes
Copy link
Member Author

Ok, that covers the fix for our current situation. Do you want a ticket in ACA-Py for tracking the permanent fix? Would the fact that these agents are using an endorser service have anything to do with the new RevRegs not being created? i.e. messages not getting to the endorser?

@swcurran
Copy link
Contributor

swcurran commented Sep 6, 2023

I hate to add more work, but can we back up DEV so we (might) have another try if this doesn’t work the first time? I think this is the right thing as well.

I think so. POST body is something like this:

{
  "credential_definition_id": cred_def_id, 
  "max_cred_num": 1000
}

@swcurran
Copy link
Contributor

swcurran commented Sep 6, 2023

Ok, that covers the fix for our current situation. Do you want a ticket in ACA-Py for tracking the permanent fix? Would the fact that these agents are using an endorser service have anything to do with the new RevRegs not being created? i.e. messages not getting to the endorser?

Yes — we need an ACA-Py ticket. Nice to try it in the demo as the easiest way to verify the simple process works. We can even try with an Endorser there, I think.

@WadeBarnes
Copy link
Member Author

I'll create a ticket and link to this ticket for the details.

@usingtechnology
Copy link

can we issue a few then rotate again? see if it repeatedly fails on dev?

so can you tell if the call didn't get to the endorser? or if the call didn't get back from the endorser? A lot of workflow creating the registry.

@WadeBarnes
Copy link
Member Author

I hate to add more work, but can we back up DEV so we (might) have another try if this doesn’t work the first time? I think this is the right thing as well.

I think so. POST body is something like this:

{
  "credential_definition_id": cred_def_id, 
  "max_cred_num": 1000
}

A backup is not going to help much if things get written tot he ledger.

@usingtechnology
Copy link

active record is oldest published but not full.
there should be 2 active so we have an immediate fallover when we the working active is full.

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 8, 2023

Best way to decommission an unnecessary RevReg with /revocation/registry/{rev_reg_id}/set-state not understanding decommissioned would be to mark it as full; correct?

@usingtechnology
Copy link

that would be the way. just to be clear set-state does no additional processing.

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 8, 2023

OK, the idim-dev instance has been fixed. The 2 RevRegs that were created during the rotation have been successfully posted to the ledger and activated. The other one I created manually has been set to full.

Active:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:a57e7adb-a44c-4ccb-9af1-b50ce77673be",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:4a165d42-1215-41cd-b4dc-806855c37f1a"
  ]
}

Full:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:64293046-0895-403a-b695-6b3698e5f11b"
  ]
}

Decommisioned:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1b6373a4-3200-4cbd-89c2-0984283e50f9",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:d3f96e1c-951a-4a9b-9d31-6a6d921ee0c8"
  ]
}

Ledger txns:

@WadeBarnes
Copy link
Member Author

On to fix upgrade and fix the sit and qa instances.

@usingtechnology
Copy link

nice work @WadeBarnes !

@WadeBarnes
Copy link
Member Author

nice work @WadeBarnes !

Thanks for the help!

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 8, 2023

IDIM is experiencing errors when publishing revocations to the new RegRegs. They are not having any issues publishing revocations to the decommissioned registry.

idim-dev-revoke-error.log

@marcos-carretero, @swcurran, @usingtechnology, @esune, @shaangill025

@WadeBarnes
Copy link
Member Author

With the new RevRegs being published manually, is there a step that I could have missed? Does there need to be an initial RevRegEntry written to them?

@WadeBarnes
Copy link
Member Author

I think I missed writing the tails file.

@WadeBarnes
Copy link
Member Author

Tails files for the new registries have been published.

@WadeBarnes
Copy link
Member Author

Wade Barnes @wade.barnes 11:01 AM
I think I missed writing the tails file. Looking.
Ok, try again. The tails files have been published.

Jay Cheng @jay.cheng 11:10 AM
I was able to revoke the credential issued earlier today; however, I issued another credential and getting http status 500 when revoking it
Timestamp would be around 11:07:50am

New log (time in UTC):
idim-dev-revoke-error.log

@swcurran
Copy link
Contributor

swcurran commented Sep 8, 2023

Reviewing the log in detail — the first errors in the sequence are from webhooks failing. Those occur starting at 2023-09-08 18:07:49,424 to announce the completion of the issue-credential task. Then it looks like we get a Revocation Failure, and then an attempt to fix the revocation failure, which also fails.

Anyone know why the messages to the controller are failing? It would be nice to get that cleaned up so we know it is not an issue.

I think the attempt to fix the failure fails because the “fix” routine is not smart enough to handle the fixing a problem with the first publish revocation. It expects it will get the “prev_accum” from the latest RevRegEntry, but in this case it needs to get it from the RevRegDef. because the expected first RevRegEntry was never published. See the CandyScan entries for the two active RevRegs — there is no first RevRegEntry for them.

But that doesn’t solve why the RevRegEntry write fails in the first place.

There are also a bunch of errors at start up similiar to the DID Resolution fix from yesterday, but it appears that things proceed regardless. I’ll see if we can get those looked at.

@swcurran
Copy link
Contributor

swcurran commented Sep 8, 2023

Ah…the messages back to the controller are failing as 400s. I bet that the controller is giving a 404 for the messages it is not prepared to receive/doesn’t care about. Which is probably fine. So I think we can safely ignore those.

@swcurran
Copy link
Contributor

swcurran commented Sep 8, 2023

I think I know what is going on. The creation of a RevReg does two writes — the RevRegDef and the first RevRegEntry that happens (usually) 3 seconds later. You can look at CandyScan here to see that. If you look at the latest ledger entries. The RevRegDefs were created along - no RevRegEntry.

I think the fix is to try to rotate the RevRegs again. I hate that without really knowing, but I don’t see another option. Perhaps we take a database backup before...

My guess is the partial completion of the RevReg

2023-09-08 13:53:13,989 aries_cloudagent.admin.server DEBUG Match info: <MatchInfo {'rev_reg_id': 'XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:4a165d42-1215-41cd-b4dc-806855c37f1a'}: <ResourceRoute [PUT] <DynamicResource  /revocation/registry/{rev_reg_id}/fix-revocation-entry-state> -> <function update_rev_reg_revoked_state at 0x7f1ac1587dc0>>
2023-09-08 13:53:13,989 aries_cloudagent.admin.server DEBUG Body: None
2023-09-08 13:53:13,989 aries_cloudagent.revocation.routes DEBUG >>> apply_ledger_update_json = false
2023-09-08 13:53:14,031 aries_cloudagent.revocation.routes DEBUG available write_ledgers = ['CANdyDev']
2023-09-08 13:53:14,031 aries_cloudagent.revocation.routes DEBUG write_ledger = <aries_cloudagent.ledger.indy_vdr.IndyVdrLedger object at 0x7f1aba0a9970>
2023-09-08 13:53:14,031 aries_cloudagent.revocation.routes DEBUG write_ledger pool = <aries_cloudagent.ledger.indy_vdr.IndyVdrLedgerPool object at 0x7f1ac06b2a60>
2023-09-08 13:53:14,031 aries_cloudagent.ledger.indy_vdr DEBUG Opening the pool ledger
2023-09-08 13:53:14,477 aries_cloudagent.admin.server ERROR Handler error with exception: 'NoneType' object is not subscriptable

=================
Traceback (most recent call last):
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/revocation/routes.py", line 928, in update_rev_reg_revoked_state
    ) = await rev_manager.update_rev_reg_revoked_state(
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/revocation/manager.py", line 180, in update_rev_reg_revoked_state
    return await rev_reg_record.fix_ledger_entry(
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/revocation/models/issuer_rev_reg_record.py", line 369, in fix_ledger_entry
    (rev_reg_delta, _) = await ledger.get_revoc_reg_delta(self.revoc_reg_id)
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/ledger/indy_vdr.py", line 1066, in get_revoc_reg_delta
    "accum": response_value["accum_to"]["value"]["accum"],
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 181, in ready_middleware
    return await handler(request)
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 218, in debug_middleware
    return await handler(request)
  File "/home/aries/.local/lib/python3.9/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
    return await handler(request)
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 338, in check_token
    return await handler(request)
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 450, in setup_context
    return await task
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
    future.result()
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/home/aries/.local/lib/python3.9/site-packages/aries_cloudagent/revocation/routes.py", line 940, in update_rev_reg_revoked_state
    raise web.HTTPBadRequest(reason=str(err))
aiohttp.web_exceptions.HTTPBadRequest: 'NoneType' object is not subscriptable
2023-09-08 13:53:14,478 aiohttp.access INFO 10.97.6.1 [08/Sep/2023:13:53:13 +0000] "PUT /revocation/registry/XpgeQa93eZvGSZBZef3PHn%3A4%3AXpgeQa93eZvGSZBZef3PHn%3A3%3ACL%3A28075%3APersonDEV%3ACL_ACCUM%3A4a165d42-1215-41cd-b4dc-806855c37f1a/fix-revocation-entry-state?apply_ledger_update=false HTTP/1.1" 400 447 "https://idim-agent-admin-dev.apps.silver.devops.gov.bc.ca/api/doc" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"

@usingtechnology
Copy link

hard to know which is empty/null/NoneType - response_value["accum_to"]["value"]["accum"]. could be either the accum_to or value.

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 11, 2023

I've confirmed the manual steps for creating the RevRegs is missing one final step, which is calling /revocation/registry/{rev_reg_id}/entry to post the initial accumulator value. I've also confirmed this is only possible when there are no revoked credentials, i.e. before any other operations. I'll submit a PR with the update to the docs.

I was able to post the initial RevRegEntry for the "backup" RevReg, but not for the "active" RegRev. That leaves the new RegRegs in a state where it's best to rotate them.

We can confirm this all again when I repair the sit environment.

@WadeBarnes
Copy link
Member Author

After making a backup of the idim-dev wallet called /revocation/active-registry/{cred_def_id}/rotate. This time the rotation completed successfully; https://candyscan.idlab.org/txs/CANDY_DEV/domain?page=1&pageSize=50&filterTxNames=[%22REVOC_REG_DEF%22,%22REVOC_REG_ENTRY%22]&sortFromRecent=true&search=XpgeQa93eZvGSZBZef3PHn

Response from the call was:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:a57e7adb-a44c-4ccb-9af1-b50ce77673be",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1b6373a4-3200-4cbd-89c2-0984283e50f9",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:d3f96e1c-951a-4a9b-9d31-6a6d921ee0c8",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:64293046-0895-403a-b695-6b3698e5f11b",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:4a165d42-1215-41cd-b4dc-806855c37f1a"
  ]
}

RevReg States for idim-dev:

Active:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:70093c2e-43f2-42fd-b376-5fd6b23a73b7",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:96fa823f-a320-4634-8708-b83ec0bddef2"
  ]
}

Decommissioned:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:a57e7adb-a44c-4ccb-9af1-b50ce77673be",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1b6373a4-3200-4cbd-89c2-0984283e50f9",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:d3f96e1c-951a-4a9b-9d31-6a6d921ee0c8",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:64293046-0895-403a-b695-6b3698e5f11b",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:4a165d42-1215-41cd-b4dc-806855c37f1a"
  ]
}

So, the rotate set all of the previous RegRegs to decommissioned, including the one I had manually set to full. @usingtechnology, is that the expected behavior?

@swcurran
Copy link
Contributor

Nice work! Yes — that is the expected behaviour of rotate. That specific behaviour was discussed and agreed to when the feature was implemented.

@WadeBarnes
Copy link
Member Author

At IDIM's request I've rotated the RevRegs on the dev instance again.

Response:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:70093c2e-43f2-42fd-b376-5fd6b23a73b7",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:a57e7adb-a44c-4ccb-9af1-b50ce77673be",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1b6373a4-3200-4cbd-89c2-0984283e50f9",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:96fa823f-a320-4634-8708-b83ec0bddef2",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:d3f96e1c-951a-4a9b-9d31-6a6d921ee0c8",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:64293046-0895-403a-b695-6b3698e5f11b",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:4a165d42-1215-41cd-b4dc-806855c37f1a"
  ]
}

State:

Active:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:998398da-fb47-4c31-958b-1d730a581638",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1ae09ef3-acf7-4f3a-9a9b-f46374b82b21"
  ]
}

Decommissioned:

{
  "rev_reg_ids": [
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:70093c2e-43f2-42fd-b376-5fd6b23a73b7",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:a57e7adb-a44c-4ccb-9af1-b50ce77673be",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:1b6373a4-3200-4cbd-89c2-0984283e50f9",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:96fa823f-a320-4634-8708-b83ec0bddef2",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:d3f96e1c-951a-4a9b-9d31-6a6d921ee0c8",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:64293046-0895-403a-b695-6b3698e5f11b",
    "XpgeQa93eZvGSZBZef3PHn:4:XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV:CL_ACCUM:4a165d42-1215-41cd-b4dc-806855c37f1a"
  ]
}

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 12, 2023

Fixing idim-sit.

Starting state of RevRegs for 7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT

Posted:

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:ec28f7d7-23a0-474e-9f56-5c2fd3204d77",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:a81d6e90-b2ee-42ef-b0d9-fa81ffa2f3b8"
  ]
}

Decommissioned:

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:50205010-00ae-4e47-b513-4ded5df05727",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:6b8710bb-79c8-4846-b257-378853336abf"
  ]
}

Steps to recover the RevRegs that were created during rotation, but not written to the ledger:

  • Upgrade ACA-Py instance; py3.9-0.10.2-rc0
  • Set state generated; PATCH /revocation/registry/{rev_reg_id}/set-state
  • Post to ledger (tails URL is already set); POST /revocation/registry/{rev_reg_id}/definition
  • Write tails file; PUT /revocation/registry/{rev_reg_id}/tails-file
  • Post initial RevRegEntry; POST /revocation/registry/{rev_reg_id}/entry

End state of RevRegs for 7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT

Active:

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:ec28f7d7-23a0-474e-9f56-5c2fd3204d77",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:a81d6e90-b2ee-42ef-b0d9-fa81ffa2f3b8"
  ]
}

Decommissioned:

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:50205010-00ae-4e47-b513-4ded5df05727",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:6b8710bb-79c8-4846-b257-378853336abf"
  ]
}

Registries:

@WadeBarnes
Copy link
Member Author

At IDIM's request I've rotated the RevRegs on the sit instance.

/revocation/active-registry/7xjfawcnyTUcduWVysLww5%3A3%3ACL%3A28075%3APersonSIT/rotate

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:ec28f7d7-23a0-474e-9f56-5c2fd3204d77",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:a81d6e90-b2ee-42ef-b0d9-fa81ffa2f3b8",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:50205010-00ae-4e47-b513-4ded5df05727",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:6b8710bb-79c8-4846-b257-378853336abf"
  ]
}

Active:

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:6280c6b5-36d3-419a-9e5b-0b1d993a9a8c",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:0e75ecfc-da6c-4265-8f92-da3fa3611397"
  ]
}

Decommissioned:

{
  "rev_reg_ids": [
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:ec28f7d7-23a0-474e-9f56-5c2fd3204d77",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:a81d6e90-b2ee-42ef-b0d9-fa81ffa2f3b8",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:50205010-00ae-4e47-b513-4ded5df05727",
    "7xjfawcnyTUcduWVysLww5:4:7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT:CL_ACCUM:6b8710bb-79c8-4846-b257-378853336abf"
  ]
}

Txns for the new Registries:

@WadeBarnes
Copy link
Member Author

IDIM reported testing was successful.

@WadeBarnes
Copy link
Member Author

Agents have been upgraded to ACA-Py 0.10.2 using; the py3.9-0.10.2 image:

  • dev
  • sit
  • qa

The initial set of rotated RevRegs for KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA have been recovered.

Active:

{
  "rev_reg_ids": [
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:351f78c4-27c1-44a0-a83d-5bea7d397ec8",
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:f0a718ef-af17-4360-a76c-649861de56b7"
  ]
}

Decommissioned:

{
  "rev_reg_ids": [
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:921ca010-04e7-4667-b613-5037e0459551",
    "KCxVC8GkKywjhWJnUfCmkW:4:KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA:CL_ACCUM:b8ada6b0-c3c6-4e26-bb52-3b1aa9bef1b8"
  ]
}

@WadeBarnes WadeBarnes changed the title Upgrade IDIM Issuers to ACA-Py v0.10.1 and Askar only images. Upgrade IDIM Issuers to ACA-Py v0.10.2 and Askar only images. Sep 28, 2023
@WadeBarnes
Copy link
Member Author

WadeBarnes commented Sep 28, 2023

The IDIM prod agent has been upgraded to ACA-Py 0.10.2 using the py3.9-0.10.2 image, and the RevRegs have been rotated.

Active:

{
  "rev_reg_ids": [
    "RGjWbW1eycP7FrMf4QJvX8:4:RGjWbW1eycP7FrMf4QJvX8:3:CL:13:Person:CL_ACCUM:f954f297-07cd-444a-ba9b-96a126297ef2",
    "RGjWbW1eycP7FrMf4QJvX8:4:RGjWbW1eycP7FrMf4QJvX8:3:CL:13:Person:CL_ACCUM:0747da7c-1d0b-489e-aa84-9e94609e8174"
  ]
}

Decommissioned:

{
  "rev_reg_ids": [
    "RGjWbW1eycP7FrMf4QJvX8:4:RGjWbW1eycP7FrMf4QJvX8:3:CL:13:Person:CL_ACCUM:6a1fa86a-f5b2-4b26-ac94-ae165a63da10",
    "RGjWbW1eycP7FrMf4QJvX8:4:RGjWbW1eycP7FrMf4QJvX8:3:CL:13:Person:CL_ACCUM:badc49aa-6666-4a44-b375-060353258d0b"
  ]
}

@WadeBarnes
Copy link
Member Author

This is finally complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants