-
-
Notifications
You must be signed in to change notification settings - Fork 4
ref: move Permission, Scope, Scopes to objectstore_types and use in Rust client
#236
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
Conversation
jan-auer
left a comment
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.
Thanks!
|
Responding to comments from the original PR description, these should all be sufficiently addressed.
Those are now two separate types. The only reason it was a single type is because they were in the same module and we didn't have to create a second struct. Those are simple view wrappers (a common Rust pattern), so there's no need to have them as one type.
The client API is rather intentional here and suggests a specific semantic data model. Maybe we should rename
This is a limitation of structured scopes we can accept. We could also write them directly into a string and then parse it on-demand when we build the token, but I'm not sure this is worth the complexity. If we truly cause a performance issue through these allocations, we can still optimize without breaking the API.
Fixed by using a view wrapper .
Not part of this PR.
Reverted. The |
jan-auer
left a comment
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.
Would appreciate another review from @lcian since I made substantial changes to the PR.
lcian
left a comment
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.
Looks really good!
Signing tokens in the client requires structured scope information which we currently don't have. We have a structured scope type in
objectstore_servicealready so this PR moves that type toobjectstore_typesand integrates it into the Rust client.As a driveby, it also moves the
Permissiontype in preparation for the actual token signing impl.