-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add txId in payload for RBAC check for asset indexing #1067
Conversation
aquarius/rbac.py
Outdated
"credentials": {"type": "address", "value": address}, | ||
"credentials": [ | ||
{"type": "address", "value": address}, | ||
{"type": "address", "value": tx_id}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be
payload = {
"eventType": event_type,
"component": "metadatacache",
"txid": tx_id,
"credentials": {"type": "address", "value": address},
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! That should be it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should aquarius also pass ddo as part of the rbac request?
so rbac can check the decrypted transaction sender vs ddo.nft.owner, or other additional checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add the DDO inside the payload for additional RBAC permission checking. What do you think @alexcos20?
@soonhuat - can you check this? |
@alexcos20 Perhaps this will be good? rbac can check the nft owner using the address vs
|
Code Climate has analyzed commit e2fe315 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 84.3%. View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
@soonhuat - can you test it please and let us know if it's in line with your expectation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Description
Add txId in payload for RBAC check for asset indexing
Is this PR related with an open issue?
Related to Issue #1065
Types of changes
Checklist: