You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing #2762 in #2907 I came across a bug where calling a sourcehub operation on two different nodes failed i.e. attempting to share a document by the same owner with a 2nd owner on each 2 different nodes causes the first node's operation to succeed and the second nodes operation to fail.
My hunch was that this is not specific to the relationship sharing feature, as this is only an issue for http client with sourcehub.
I tested a basic example of creating 2 private documents using the same identity (which uses acp identity operations underneath ofc.), one on node 1 and second on node 2 using sourcehub with http client. As suspected the tests fail, hence this is an existing bug.
shahzadlone
changed the title
bug: consecutive source-hub acp operations fail for http client due to an identity error
bug: consecutive source-hub acp operations fail for http client due to an identity auth error
Sep 24, 2024
Bumped down in priority, I think this is not a prod issue, might just be a testing framework issue the way we reuse identity bearer tokens between nodes, but they should have different tokens I believe due to different audience values (i.e. node host values) which might be causing this.
…rk#3068)
## Relevant issue(s)
Resolvessourcenetwork#3065
## Description
The main bug was only visible on sourcehub acp using http, due to the
identity being copied with the audience value of another node's host
failing authentication (the bearer tokens should be unique using correct
node's audience). The biggest issue was the way we use `getNodes` and
`getNodeCollections`. I would be in favor of completely removing them as
they are more troublesome than the utility they provide.
- First commit documents the bug
- Some utility functions were overwriting and producing the wrong node
index
- Forbidden bug happening on sourcehub<>http test run:
https://github.com/sourcenetwork/defradb/actions/runs/10930293192/job/30342883535?pr=2907
### Future:
- Resolve import/export documentation and implementation if different
(sourcenetwork#3067)
- Should likely clean this test utils up and make helper methods to
avoid code duplication
(sourcenetwork#3069)
- Likely should remove all usages of `getNodeCollections`
(sourcenetwork#3069)
- Likely should remove all usages of `getNodes`
(sourcenetwork#3069)
## How has this been tested?
- Very painfully haha, had to install Linux bare-metal to investigate
the first bug (sourcehub doesn't build on wsl for me) that was only
occurring on sourcehub acp using http, due to the identity being copied
with the audience value of another node the way we use `getNodes` and
`getNodeCollections`
While implementing #2762 in #2907 I came across a bug where calling a sourcehub operation on two different nodes failed i.e. attempting to share a document by the same owner with a 2nd owner on each 2 different nodes causes the first node's operation to succeed and the second nodes operation to fail.
My hunch was that this is not specific to the relationship sharing feature, as this is only an issue for http client with sourcehub.
I tested a basic example of creating 2 private documents using the same identity (which uses acp identity operations underneath ofc.), one on node 1 and second on node 2 using sourcehub with http client. As suspected the tests fail, hence this is an existing bug.
Here is a test that documents the failure:
Output:
The text was updated successfully, but these errors were encountered: