Skip to content
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

eacl: Support numeric matchers #554

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

cthulhu-rider
Copy link
Contributor

No description provided.

Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second commit's body is Handle handle.

What is our tests status? Can some repeating reruns fix it?

eacl/validator.go Show resolved Hide resolved
@cthulhu-rider
Copy link
Contributor Author

@carpawell #549

@carpawell
Copy link
Member

@carpawell #549

Yeah, i saw them, i meant what do we do for now? Just ignore them? Maybe at least skip them?

@cthulhu-rider cthulhu-rider force-pushed the feature/eacl-numeric-ops branch from ce9130f to 84bb77c Compare February 14, 2024 15:41
@cthulhu-rider cthulhu-rider marked this pull request as draft February 14, 2024 16:46
@cthulhu-rider
Copy link
Contributor Author

cthulhu-rider commented Feb 14, 2024

forgot to test NOT_PRESENT in Validator

@cthulhu-rider cthulhu-rider force-pushed the feature/eacl-numeric-ops branch 2 times, most recently from d09a4b0 to a1444d8 Compare February 14, 2024 17:21
@cthulhu-rider cthulhu-rider marked this pull request as ready for review February 14, 2024 17:25
@carpawell carpawell mentioned this pull request Feb 15, 2024
@cthulhu-rider cthulhu-rider force-pushed the feature/eacl-numeric-ops branch from a1444d8 to ac151c2 Compare February 16, 2024 14:26
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK with big.Int to me.

Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK with big.Int to me.

Well ok, but i would add a limitation in the future (at least to the attribute's length).

@roman-khimov
Copy link
Member

We'll have nspcc-dev/neofs-api#262 soon, we need it. We can discuss per-attribute limits there as well, but those would be like 4K which is not that far from 32K.

NeoFS API protocol was recently extended with numeric `null`, >`, `>=`,
`<` and `<=` match operators. These operators should be provided by SDK
so users could use them in their access rules.

Signed-off-by: Leonard Lyubich <[email protected]>
Handle recently added `MatchType` values by `Validator` to support
integer comparisons and attribute absence. Non-decimal filter and/or
header value used with numeric matcher is considered as mismatching rule.

Signed-off-by: Leonard Lyubich <[email protected]>
@cthulhu-rider cthulhu-rider force-pushed the feature/eacl-numeric-ops branch from ac151c2 to a31bd91 Compare February 21, 2024 16:10
@cthulhu-rider cthulhu-rider merged commit cbaf23c into master Feb 21, 2024
5 checks passed
@cthulhu-rider cthulhu-rider deleted the feature/eacl-numeric-ops branch February 21, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants