-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: Add authorization check for enrollment in lookup verb handler #1505
Conversation
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.
In addition to my comment on the verb handler implementation, I have one more question - are there tests which cover 'special' records? (1) 'reserved' keys (2) shared symmetric keys (shared_key.bob@alice
and @bob:shared_key@alice
) etc?
packages/at_secondary_server/lib/src/verb/handler/lookup_verb_handler.dart
Outdated
Show resolved
Hide resolved
Regarding the reserved keys, particularly the key format "@bob:shared_key@alice", when a user authenticates via the APKAM (who has full access), the absence of a namespace associated with the key leads to the failure of the authorization check. As a result, the data retrieval process does not succeed. One approach to deal with this is to have a system level namespace for all the reserved keys. |
I suggest that if a record id has no namespace then we should say that the client is authorized. This is not an absolute rule - this rule should be applied any broader permission checks (e.g. records which are protected from deletion, immutable checks when we have immutable records, etc) |
Sure Gary. |
…ent is authorized for the keys that do not have namespace
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
packages/at_secondary_server/lib/src/verb/handler/lookup_verb_handler.dart
Outdated
Show resolved
Hide resolved
@sitaram-kalluri Before I approve and merge this, please run this server locally and run the at_talk program with 'new' atSigns alice and bob, and verify that everything is working correctly. Please also do any other client program testing that is appropriate. |
Sure Gary. |
at_talk_test.mp4 |
- What I did
- How I did it
- How to verify it
- Description for the changelog