Commit graph

18 commits

Author SHA1 Message Date
db36131800 [#90] policy: Add constants for more targets
All checks were successful
DCO action / DCO (pull_request) Successful in 1m15s
Tests / Tests (1.21) (pull_request) Successful in 1m48s
Tests / Tests (1.22) (pull_request) Successful in 1m48s
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2024-04-17 11:01:07 +03:00
694daebb19 [#84] policy: Fix IteratorChainsByPrefix method
All checks were successful
DCO action / DCO (pull_request) Successful in 1m11s
Tests / Tests (1.20) (pull_request) Successful in 1m24s
Tests / Tests (1.19) (pull_request) Successful in 1m37s
* If numeric mapping does not exists, then assign id to 0.
* Add check to unit-test.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-04-04 15:43:19 +03:00
e27b8ad306 [#83] policy: Allow to update contract
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 10:03:23 +03:00
43c90af97d [#78] policy: Fix counter key prefix name
All checks were successful
DCO action / DCO (pull_request) Successful in 4m32s
Tests / Tests (1.19) (pull_request) Successful in 4m42s
Tests / Tests (1.20) (pull_request) Successful in 4m44s
* Fix counterKey: "counter" may conflict with 'c' prefix.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-20 11:58:33 +03:00
d9f523ee07 [#78] policy: Introduce ListTargets method for Policy contract
* Introduce a new method ListTargets that lists targets by kind.
* Slightly fix key mapping - also concatenate kind to prefix.
* Write unit-tests.
* Regenerate rpcclient.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-20 11:57:34 +03:00
6e72d0b3b4 [#75] policy: Fix compiler error
All checks were successful
DCO action / DCO (pull_request) Successful in 1m36s
Tests / Tests (1.20) (pull_request) Successful in 1m55s
Tests / Tests (1.19) (pull_request) Successful in 2m14s
Refs #71

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-30 16:37:37 +03:00
e0f6fe3bc9 [#61] policy: Shorten policy contract keys
* Map long entity names to 8-bytes long numbers.
* Add desctiption to docs.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-01-30 12:27:57 +00:00
93781f1149 [#66] policy: Support IteratorChainsByPrefix method
All checks were successful
DCO action / DCO (pull_request) Successful in 1m28s
Tests / Tests (1.19) (pull_request) Successful in 2m5s
Tests / Tests (1.20) (pull_request) Successful in 2m35s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-01-26 17:41:04 +03:00
a7c45fdd0d [#68] policy: Add Version() method
All checks were successful
DCO action / DCO (pull_request) Successful in 1m3s
Tests / Tests (1.20) (pull_request) Successful in 1m26s
Tests / Tests (1.19) (pull_request) Successful in 1m31s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-11 15:39:19 +03:00
7864fc3c4d [#55] policy: Fix typo in ErrNotAuthorized
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-29 09:21:58 +03:00
edf3c26047 [#54] policy: Accept []byte as name
Strings cannot contain non-UTF8 bytes, this is ensured in JSON
marshaling/unmarshaling. At the same time using human-readable strings
can be rather restrictive, because we have 64-byte key limit.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-28 13:49:57 +03:00
f30fb324ff [#55] policy: Swap signature check order
While implementing the changes for FrostFS ID it became obvious, that
committee signature check can be rather costly (`getCommittee` call +
multiaddress construction + checking witness). In real scenarious it
will mostly fail, so it makes sense do it last.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-28 13:49:57 +03:00
0dda536d4a [#55] policy: Fix admin processing in _deploy
Refactoring remnants, there is a single admin now.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-28 13:49:57 +03:00
e56e8d02ee [#52] policy: Add admin
All checks were successful
DCO action / DCO (pull_request) Successful in 57s
Tests / Tests (1.20) (pull_request) Successful in 1m31s
Tests / Tests (1.19) (pull_request) Successful in 1m37s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-24 10:34:22 +03:00
20f86e96b2 [#51] policy: Fix tests
All checks were successful
DCO action / DCO (pull_request) Successful in 1m11s
Tests / Tests (1.19) (pull_request) Successful in 1m30s
Tests / Tests (1.20) (pull_request) Successful in 1m31s
We don't want to return Null from contract when list is empty
because generated policy client cannot parse this.

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-11-20 15:43:07 +03:00
5cc34f98e9 [#51] policy: Support Get and ListByPrefix methods
Some checks failed
DCO action / DCO (pull_request) Successful in 1m2s
Tests / Tests (1.19) (pull_request) Failing after 1m43s
Tests / Tests (1.20) (pull_request) Failing after 1m42s
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-11-17 14:36:48 +03:00
d890a7eba4 [#50] Replace interface{} with any
All checks were successful
DCO action / DCO (pull_request) Successful in 1m6s
Tests / Tests (1.19) (pull_request) Successful in 1m17s
Tests / Tests (1.20) (pull_request) Successful in 1m12s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-07 15:18:48 +03:00
9ed3845aa9 [#44] policy: Initial implementation
All checks were successful
DCO action / DCO (pull_request) Successful in 1m7s
Tests / Tests (1.19) (pull_request) Successful in 1m21s
Tests / Tests (1.20) (pull_request) Successful in 1m18s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-02 09:54:36 +03:00