-
Notifications
You must be signed in to change notification settings - Fork 14
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
bearer: Improvements and test coverage #626
Draft
cthulhu-rider
wants to merge
13
commits into
master
Choose a base branch
from
bearer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
cthulhu-rider
commented
Sep 18, 2024
- after session: Improvements and test coverage #612
Signed-off-by: Leonard Lyubich <[email protected]>
Previously, any token w/o lifetime field was always considered as invalid (expired in particular). In the protocol, the lifetime field's absence is equivalent to all zero claims. Thus, `InvalidAt` and `ExpiredAt` methods behaved correctly for all cases except default one. At the same time, if user explicitly set all lifetime claims to zero - token was not invalid at the epoch #0. From now skipping a lifetime field in a token message is equivalent to a field with all zeros. This change will only affect epoch #0 and will be invisible in practice since the NeoFS network starts from epoch #1. In addition, the internal structure of the type has been simplified. Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
Previously they could not be obtained directly. It's natural need to get what was set, e.g. in unit tests, logging, etc. So, it's better to provide way to receive such an open info. Signed-off-by: Leonard Lyubich <[email protected]>
Similar to 091a279. Signed-off-by: Leonard Lyubich <[email protected]>
Cryptographic signatures of digital data of the system are transmitted in the form of a simple tuple: scheme, binary public key and the signature itself. The library provides `Calculate` method which, on the one hand, facilitates calculation, on the other - deprives the ability to work with pre-calculated values. As a patch, the so-called `StaticSigner` was provided for signing simulation. This commit adds new approach: now the signature structure can be flexibly created by newly added constructors (or modified by new field setters). In some practical cases, like WalletConnect remote signing, working with pre-computed signature structure is the only way. For the same reason, the interface of signed data structures (e.g. tokens) is also extended: now a structured signature setter+getter are provided. Signed-off-by: Leonard Lyubich <[email protected]>
Previously, container and object verb types were `int8` enums which is much narrower than the protocol definition. Also, corresponding token were converted from derived uint32 type w/o overflow check. Now types are `int32` and any bigger value is denied. Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
Same as XXXXXXXXXXXXXXX (after session PR merge). Signed-off-by: Leonard Lyubich <[email protected]>
Same as XXXXXXXXXXXXXXX (after session PR merge). Signed-off-by: Leonard Lyubich <[email protected]>
Has been forgotten in 2cca6c7. Signed-off-by: Leonard Lyubich <[email protected]>
Previously, the only way to receive eACL in the `Token` was field getter. It states that if the table is unset, zero instance is returned. The problem is that `eacl.Table` type does not implement `comparable` constraint. So, there is no way to check whether eACL instance is zero or not. Therefore, there was no way to find out whether the token contained a table. This adds `GetEACLTable` method returning boolean flag of eACL presence. Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
cthulhu-rider
force-pushed
the
bearer
branch
from
September 19, 2024 15:04
393c5f9
to
f0018c8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.