Commit Graph

536 Commits (master)

Author SHA1 Message Date
Alexey Vanin db36131800 [#90] policy: Add constants for more targets
DCO action / DCO (pull_request) Successful in 1m15s Details
Tests / Tests (1.21) (pull_request) Successful in 1m48s Details
Tests / Tests (1.22) (pull_request) Successful in 1m48s Details
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2024-04-17 11:01:07 +03:00
Ekaterina Lebedeva a3d5e02f20 [#81] Add domain in the error message in NNS
DCO action / DCO (pull_request) Successful in 54s Details
Tests / Tests (1.22) (pull_request) Successful in 1m25s Details
Tests / Tests (1.21) (pull_request) Successful in 1m31s Details
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-04-16 18:05:46 +03:00
Evgenii Stratonikov 6eb492025b [#86] .forgejo: Update go version
DCO action / DCO (pull_request) Successful in 1m11s Details
Tests / Tests (1.21) (pull_request) Successful in 1m45s Details
Tests / Tests (1.22) (pull_request) Successful in 2m2s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-04-09 14:57:29 +03:00
Evgenii Stratonikov 1addbfef2d [#86] .forgejo: Update DCO action version
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-04-09 14:57:29 +03:00
Airat Arifullin e7a05a49ff [#XX] client: Terminate session in `ReadIteratorItems`
DCO action / DCO (pull_request) Successful in 1m10s Details
Tests / Tests (1.19) (pull_request) Successful in 1m38s Details
Tests / Tests (1.20) (pull_request) Successful in 1m34s Details
* Make an invoker terminate session by its ID before return, otherwise,
  it may lead to `max session capacity reached error`.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-04-09 14:15:39 +03:00
Airat Arifullin 694daebb19 [#84] policy: Fix IteratorChainsByPrefix method
DCO action / DCO (pull_request) Successful in 1m11s Details
Tests / Tests (1.20) (pull_request) Successful in 1m24s Details
Tests / Tests (1.19) (pull_request) Successful in 1m37s Details
* 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
Airat Arifullin 2574b2840e [#84] rpcclient: Regenerate interface for Policy
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-04-04 10:26:28 +03:00
Evgenii Stratonikov 42344eaa69 [#83] container: Remove outdated migration code
DCO action / DCO (pull_request) Successful in 1m9s Details
Tests / Tests (1.20) (pull_request) Successful in 1m33s Details
Tests / Tests (1.19) (pull_request) Successful in 1m40s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 10:03:23 +03:00
Evgenii Stratonikov e27b8ad306 [#83] policy: Allow to update contract
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 10:03:23 +03:00
Evgenii Stratonikov 5119f655fe [#82] common: Update version
DCO action / DCO (pull_request) Successful in 1m1s Details
Tests / Tests (1.20) (pull_request) Successful in 1m32s Details
Tests / Tests (1.19) (pull_request) Successful in 1m38s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-13 20:57:09 +03:00
Anton Nikiforov c9c53bb9ec [#17] frostfs: Remove method `alphabetAddress`
DCO action / DCO (pull_request) Successful in 1m3s Details
Tests / Tests (1.19) (pull_request) Successful in 1m34s Details
Tests / Tests (1.20) (pull_request) Successful in 1m29s Details
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-03-05 12:59:03 +03:00
Airat Arifullin 43c90af97d [#78] policy: Fix counter key prefix name
DCO action / DCO (pull_request) Successful in 4m32s Details
Tests / Tests (1.19) (pull_request) Successful in 4m42s Details
Tests / Tests (1.20) (pull_request) Successful in 4m44s Details
* 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
Airat Arifullin 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
Marina Biryukova 55a4163951 [#76] frostfsid: Add GetGroupByName method
DCO action / DCO (pull_request) Successful in 1m10s Details
Tests / Tests (1.19) (pull_request) Successful in 1m41s Details
Tests / Tests (1.20) (pull_request) Successful in 1m40s Details
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2024-02-01 16:06:17 +03:00
Evgenii Stratonikov 6e72d0b3b4 [#75] policy: Fix compiler error
DCO action / DCO (pull_request) Successful in 1m36s Details
Tests / Tests (1.20) (pull_request) Successful in 1m55s Details
Tests / Tests (1.19) (pull_request) Successful in 2m14s Details
Refs #71

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-30 16:37:37 +03:00
Airat Arifullin 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
Evgenii Stratonikov 074a241272 [#74] proxy: Allow to own NNS domains
DCO action / DCO (pull_request) Successful in 1m15s Details
Tests / Tests (1.19) (pull_request) Successful in 1m38s Details
Tests / Tests (1.20) (pull_request) Successful in 1m37s Details
Because `Verify` is flexible enough, any funds transferred to the proxy
contract can be moved out with the help of the committee. Thus,
implementing onNEP11Payment() is enough.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-29 14:03:06 +03:00
Evgenii Stratonikov 2efebf4206 [#74] tests: Do not compile proxy contract twice
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-29 14:02:18 +03:00
Evgenii Stratonikov 60e8abbf49 [#74] tests: Actualize proxy contract deploy parameters
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-29 14:02:18 +03:00
Alexander Chuprov 93781f1149 [#66] policy: Support IteratorChainsByPrefix method
DCO action / DCO (pull_request) Successful in 1m28s Details
Tests / Tests (1.19) (pull_request) Successful in 2m5s Details
Tests / Tests (1.20) (pull_request) Successful in 2m35s Details
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-01-26 17:41:04 +03:00
Evgenii Stratonikov da8ec5b447 [#73] nns: Allow 2-byte domain names
DCO action / DCO (pull_request) Successful in 1m20s Details
Tests / Tests (1.19) (pull_request) Successful in 1m38s Details
Tests / Tests (1.20) (pull_request) Successful in 2m42s Details
frostfs-node uses `.ns` domain, must be supported.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-25 16:21:58 +03:00
Denis Kirillov f2a82aa635 [#69] frostfsid: Add new client init function
DCO action / DCO (pull_request) Successful in 1m7s Details
Tests / Tests (1.20) (pull_request) Successful in 1m29s Details
Tests / Tests (1.19) (pull_request) Successful in 1m35s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-01-15 11:29:15 +03:00
Evgenii Stratonikov a7c45fdd0d [#68] policy: Add Version() method
DCO action / DCO (pull_request) Successful in 1m3s Details
Tests / Tests (1.20) (pull_request) Successful in 1m26s Details
Tests / Tests (1.19) (pull_request) Successful in 1m31s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-11 15:39:19 +03:00
Evgenii Stratonikov 5363aaf16a [#68] rpcclient: Regenerate wrappers after neo-go update
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-11 15:39:19 +03:00
Evgenii Stratonikov 86e6d4d334 [#64] commonclient: Use partial unwrap in ReadIteratorItems()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-29 14:06:46 +00:00
Evgenii Stratonikov 8c7925d3c0 [#64] go.mod: Update neo-go
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-29 14:06:46 +00:00
Denis Kirillov bce7ef18c8 [#63] frostfsid/client: Support proxy
DCO action / DCO (pull_request) Successful in 6m14s Details
Tests / Tests (1.20) (pull_request) Successful in 6m48s Details
Tests / Tests (1.19) (pull_request) Successful in 6m52s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-12-18 11:43:46 +03:00
Evgenii Stratonikov 23e85d11c4 [#53] proxy: Allow using proxy by trusted accounts
Tests / Tests (1.19) (pull_request) Successful in 1m27s Details
DCO action / DCO (pull_request) Successful in 1m36s Details
Tests / Tests (1.20) (pull_request) Successful in 1m26s Details
It was reverted because `Verify` with arguments was not well supported
by the client software. Thanks to recent `System.Runtime.CurrentSigners`
call from neo-go v0.104.0 we can take the best of both worlds.

Verify with argument still looks better (less overhead), but this
implementation should work too. Sadly, `overloads` are not of much use
here because verification routines take the _first_ method from the
manifest, albeit with arbitrary number of arguments.

This reverts commit a0b73150c6 with some
changes on-top.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-15 14:34:26 +03:00
Ekaterina Lebedeva 4dcb575caa [#56] Add multi-level domain name support
DCO action / DCO (pull_request) Successful in 1m0s Details
Tests / Tests (1.20) (pull_request) Successful in 1m29s Details
Tests / Tests (1.19) (pull_request) Successful in 1m35s Details
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2023-12-13 15:22:12 +03:00
Denis Kirillov 897f538a3c [#48] frostfsid: add GetSubjectByName method
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-12-11 09:36:47 +00:00
Denis Kirillov 3fb511ac15 [#48] frostfsid: Support empty namespaces
Require ns to create subject.
Since we don't allow move subject from one ns to another -
drop add/remove subject to/from namespace

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-12-11 09:36:47 +00:00
Evgenii Stratonikov a0b73150c6 Revert "[#53] proxy: Allow using proxy by trusted accounts"
DCO action / DCO (pull_request) Failing after 1m2s Details
Tests / Tests (1.19) (pull_request) Successful in 1m32s Details
Tests / Tests (1.20) (pull_request) Successful in 1m32s Details
This reverts commit bc3186575f.
2023-12-08 11:10:00 +03:00
Evgenii Stratonikov bc3186575f [#53] proxy: Allow using proxy by trusted accounts
DCO action / DCO (pull_request) Successful in 1m4s Details
Tests / Tests (1.20) (pull_request) Successful in 1m25s Details
Tests / Tests (1.19) (pull_request) Successful in 1m30s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-07 10:22:47 +03:00
Evgenii Stratonikov d7cb550a5e [#53] common: Use interop.Hash160 in address producing functions
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-06 19:47:43 +03:00
Evgenii Stratonikov 91b36a7eb3 [#53] go.mod: Update neo-go to the laster master
Pickup new neotest features.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-06 19:47:43 +03:00
Evgenii Stratonikov 94cd3dca83 [#53] go.mod: Resolve ambiguous import
There was a problem with `go mod tidy`.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-06 19:47:15 +03:00
Evgenii Stratonikov a1b61d3949 [#55] Makefile: Add config.yml to NEF dependencies
DCO action / DCO (pull_request) Successful in 55s Details
Tests / Tests (1.20) (pull_request) Successful in 1m17s Details
Tests / Tests (1.19) (pull_request) Successful in 1m43s Details
It can affects manifest, so recompilation is needed.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-29 09:22:01 +03:00
Evgenii Stratonikov f28d918727 [#55] frostfsid: Add missing safe methods
All of them can be called in read-only context.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-29 09:22:01 +03:00
Evgenii Stratonikov 7864fc3c4d [#55] policy: Fix typo in ErrNotAuthorized
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-29 09:21:58 +03:00
Evgenii Stratonikov 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
Evgenii Stratonikov 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
Evgenii Stratonikov 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
Evgenii Stratonikov 43097d2152 [#55] frostfsid: Use single admin instead of many
Autorization can be dedicated to a separate contract, iterating over
multiple keys can be costly. Also add committee as "default" admin:
everything is allowed for it.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-28 13:49:56 +03:00
Evgenii Stratonikov 03d0c10852 [#55] Apply gofumpt
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-28 12:32:33 +03:00
Evgenii Stratonikov 21bfe3ebf0 [#52] policy: Regenerate RPC wrapper
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-28 12:32:33 +03:00
Evgenii Stratonikov e56e8d02ee [#52] policy: Add admin
DCO action / DCO (pull_request) Successful in 57s Details
Tests / Tests (1.20) (pull_request) Successful in 1m31s Details
Tests / Tests (1.19) (pull_request) Successful in 1m37s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-24 10:34:22 +03:00
Denis Kirillov 20f86e96b2 [#51] policy: Fix tests
DCO action / DCO (pull_request) Successful in 1m11s Details
Tests / Tests (1.19) (pull_request) Successful in 1m30s Details
Tests / Tests (1.20) (pull_request) Successful in 1m31s Details
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
Denis Kirillov 5cc34f98e9 [#51] policy: Support Get and ListByPrefix methods
DCO action / DCO (pull_request) Successful in 1m2s Details
Tests / Tests (1.19) (pull_request) Failing after 1m43s Details
Tests / Tests (1.20) (pull_request) Failing after 1m42s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-11-17 14:36:48 +03:00
Denis Kirillov dd5919348d [#48] frostfsid: Update storage scheme doc
DCO action / DCO (pull_request) Successful in 58s Details
Tests / Tests (1.19) (pull_request) Successful in 1m37s Details
Tests / Tests (1.20) (pull_request) Successful in 1m32s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-11-09 17:39:25 +03:00
Denis Kirillov e2e406932f [#48] frostfsid: Support Group updating
DCO action / DCO (pull_request) Successful in 1m24s Details
Tests / Tests (1.20) (pull_request) Successful in 2m6s Details
Tests / Tests (1.19) (pull_request) Successful in 3m14s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-11-09 16:14:11 +03:00