bcgov / bcgov/traction

A Tenant can seem to be getting a DIFFERENT tenant's TAA acceptance

Open
#956 4 comments 0 reactions 0 assignees View on GitHub
pinned
Dominant language
TypeScript
Stars
62
Forks
59
Avg merge
1d 11h
Merged PRs (30d)
5

Description

I think I’ve found an issue with TAA acceptance in the Multi-Tenant case where a tenant that has NOT accepted the TAA for a ledger can seem to get a response from their TAA endpoint that says they HAVE accepted the TAA.

And I think this might have something to do with in-memory ACA-Py rather than the database persistence or any actual ledger write.

I don’t think this is any Tenant UI display issue.

I can reproduce with 2 tenants (both using sovrin-testnet) in this case as below

**Step 1:** Log in with a Tenant that has not accepted TAA.

![image](https://github.com/bcgov/traction/assets/17445138/fabdd03f-239a-4559-a51d-67f74afcb4bf)

_Tenant 1_ (created Dec 1) **has not accepted** the TAA for sovrin test.

**Step 2:** Log in with a Tenant that has accepted the TAA

![image](https://github.com/bcgov/traction/assets/17445138/463c10f2-c2cb-48ce-b20a-1a7432fc8056)

_Tenant 2_ HAS accepted the TAA, calls the /taa endpoint and gets that

**Step 3:** Go back to Tenant 1 and refresh (call the /taa endpoint again)

![image](https://github.com/bcgov/traction/assets/17445138/8579512c-ef10-4c7f-b810-0a3dd1d78f6b)

Now _Tenant 1_ thinks it’s accepted the TAA on the same date as Tenant 2!

Has an Oct 23 acceptance date even though the Tenant did not exist until Dec 1...

**Step 5:** Restart ACA-Py (only tested this on OCP, by killing pods, haven’t tried locally or anything)

![image](https://github.com/bcgov/traction/assets/17445138/1b231584-6896-4e2f-aeb4-5b20339dfa9c)

Now Tenant 1 is back to knowing it has not accepted the TAA

*******

Confirmed it's not specific to Tenant UI, and is "pod related" in the multi-pod scenario in dev

Using one Tenant's token in a single swagger instance I get 2 different TAA results randomly while it bounces between pods

![image](https://github.com/bcgov/traction/assets/17445138/5fdcec21-d73a-4d92-9538-9cc2a0406dc2)

![image](https://github.com/bcgov/traction/assets/17445138/65da91dc-4c15-4d04-83c1-e342084dd556)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue through the /taa endpoint with two tenants across multiple pods, then compare the results before and after restarting ACA-Py. Trace how ACA-Py handles TAA state in memory versus persistence; done means each tenant consistently receives its own acceptance status regardless of pod or restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.