adm: Allow to manage additional keys in frostfsid #1505

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:additional-keys into master 2024-11-19 13:58:20 +00:00
Owner

Accompanying PR TrueCloudLab/frostfs-contract#129

Testing done:

$ frostfs-cli container create --policy 'REP 2' -w ./new.json --rpc-endpoint s01.frostfs.devenv:8080
Enter password >
put container rpc error: status: code = 1024 message = frostfs error: chain/client: contract execution finished with state FAULT; exception: at instruction 3133 (THROW): unhandled exception: "subject not found"

$ neo-go wallet dump-keys -w ./new.json
Na4Qjaofoi8AtksN52v1NtphWZL3KStLDL (simple signature contract):
029df3039c14d6af5bfd059027b0a93be221b30f7bf5f4ea021d5cec42cae04fa6

$ frostfs-adm -c frostfs-adm.yml morph frostfsid add-subject-key --subject-address NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM --subject-key 029df3039c14d6af5bfd059027b0a93be221b30f7bf5f4ea021d5cec42cae04fa6
Waiting for transactions to persist...

$ frostfs-cli container create --policy 'REP 2' -w ./new.json --rpc-endpoint s01.frostfs.devenv:8080
Enter password >
CID: CMVUQzY5QstHrEMVM876Fvu7NUsb1cFo9T2ChNEJWEug

$ frostfs-cli container get -g --cid CMVUQzY5QstHrEMVM876Fvu7NUsb1cFo9T2ChNEJWEug -r s01.frostfs.devenv:8080
CID: CMVUQzY5QstHrEMVM876Fvu7NUsb1cFo9T2ChNEJWEug
owner ID: Na4Qjaofoi8AtksN52v1NtphWZL3KStLDL
basic ACL: 0
       RangeHASH    Range      Search     Delete     Put        Head       Get
0 0    0 1 0 0      0 0 0 0    0 1 0 0    0 0 0 0    0 1 0 0    0 1 0 0    0 1 0 0
X F    U S O B      U S O B    U S O B    U S O B    U S O B    U S O B    U S O B
  X-Sticky F-Final U-User S-System O-Others B-Bearer
created: 2024-11-19 15:50:39 +0300 MSK
attributes:
        Timestamp=1732020639
placement policy:
REP 2
Accompanying PR https://git.frostfs.info/TrueCloudLab/frostfs-contract/pulls/129 Testing done: ``` $ frostfs-cli container create --policy 'REP 2' -w ./new.json --rpc-endpoint s01.frostfs.devenv:8080 Enter password > put container rpc error: status: code = 1024 message = frostfs error: chain/client: contract execution finished with state FAULT; exception: at instruction 3133 (THROW): unhandled exception: "subject not found" $ neo-go wallet dump-keys -w ./new.json Na4Qjaofoi8AtksN52v1NtphWZL3KStLDL (simple signature contract): 029df3039c14d6af5bfd059027b0a93be221b30f7bf5f4ea021d5cec42cae04fa6 $ frostfs-adm -c frostfs-adm.yml morph frostfsid add-subject-key --subject-address NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM --subject-key 029df3039c14d6af5bfd059027b0a93be221b30f7bf5f4ea021d5cec42cae04fa6 Waiting for transactions to persist... $ frostfs-cli container create --policy 'REP 2' -w ./new.json --rpc-endpoint s01.frostfs.devenv:8080 Enter password > CID: CMVUQzY5QstHrEMVM876Fvu7NUsb1cFo9T2ChNEJWEug $ frostfs-cli container get -g --cid CMVUQzY5QstHrEMVM876Fvu7NUsb1cFo9T2ChNEJWEug -r s01.frostfs.devenv:8080 CID: CMVUQzY5QstHrEMVM876Fvu7NUsb1cFo9T2ChNEJWEug owner ID: Na4Qjaofoi8AtksN52v1NtphWZL3KStLDL basic ACL: 0 RangeHASH Range Search Delete Put Head Get 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 X F U S O B U S O B U S O B U S O B U S O B U S O B U S O B X-Sticky F-Final U-User S-System O-Others B-Bearer created: 2024-11-19 15:50:39 +0300 MSK attributes: Timestamp=1732020639 placement policy: REP 2 ```
fyrchik added 1 commit 2024-11-19 12:53:11 +00:00
adm: Allow to manage additional keys in frostfsid
Some checks failed
DCO action / DCO (pull_request) Failing after 1m36s
Tests and linters / Run gofumpt (pull_request) Successful in 1m44s
Vulncheck / Vulncheck (pull_request) Successful in 2m0s
Build / Build Components (pull_request) Successful in 3m14s
Tests and linters / gopls check (pull_request) Successful in 3m11s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m17s
Tests and linters / Lint (pull_request) Failing after 3m19s
Tests and linters / Staticcheck (pull_request) Successful in 3m33s
Tests and linters / Tests (pull_request) Successful in 4m40s
Tests and linters / Tests with -race (pull_request) Successful in 6m3s
9eedb1c206
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik force-pushed additional-keys from 9eedb1c206 to 9f4ce600ac 2024-11-19 13:25:38 +00:00 Compare
fyrchik requested review from storage-core-committers 2024-11-19 13:25:46 +00:00
fyrchik requested review from storage-core-developers 2024-11-19 13:25:48 +00:00
aarifullin approved these changes 2024-11-19 13:28:44 +00:00
acid-ant approved these changes 2024-11-19 13:34:22 +00:00
dstepanov-yadro approved these changes 2024-11-19 13:50:00 +00:00
fyrchik merged commit 9f4ce600ac into master 2024-11-19 13:58:20 +00:00
fyrchik deleted branch additional-keys 2024-11-19 13:58:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1505
No description provided.