Project

General

Profile

Feature #4129

Management Dispatcher for repo commands

Added by Junxiao Shi almost 3 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
6.00 h

Description

Use ndn::mgmt::Dispatcher for accepting insert, delete, and watch commands.


Related issues

Related to repo-ng - Bug #4944: ndnputfile does not workNewSaurab Dulal

Actions
Blocked by repo-ng - Bug #2023: ERROR: Failed to register prefix in local hub's daemonClosedJunxiao Shi10/03/2014

Actions
#1

Updated by Junxiao Shi almost 3 years ago

  • Blocked by Bug #2023: ERROR: Failed to register prefix in local hub's daemon added
#2

Updated by Junxiao Shi almost 3 years ago

  • Assignee set to Muktadir Chowdhury

This is needed to reduce the direct dependency on v1 validators.

#3

Updated by Muktadir Chowdhury almost 3 years ago

I integrated dispatcher. In unit-tests, the identity management fixture uses v2::security. Unit-tests are passing with v2::security but integrated test is failing.

So I changed it to v1::security. Now all the tests are failing. What should I do now?

#4

Updated by Junxiao Shi almost 3 years ago

  • Blocks Task #4091: Adapt to ndn-cxx v2::KeyChain and Validator added
#5

Updated by Junxiao Shi almost 3 years ago

As I explained in 20170731 NFD call, this issue should keep using ndn-cxx v1 Validator, and specifically ValidatorNull. It would never pass Jenkins, but you can manually verify the build with ndn-cxx-breaks and set ndn-cxx to patchset 4050,2; you should post the build log link on Gerrit. When it's time to merge, I'll override the negative vote from Jenkins and approve the Change.

The switchover to v2 Validator is to be performed in #4091 and needs to wait for v2 ValidationPolicyConfig to become ready.

#6

Updated by Muktadir Chowdhury almost 3 years ago

SInce tests/identity-management-fixture is using v2::Certificate, I am using latest ndn-cxx and it also contains ValidatorNull. But my code was breaking due to this commit ( https://github.com/named-data/ndn-cxx/commit/6938e3461bc7b64531403b05d18d492d4713c641), so changed src/storage/index.cpp to use the new name. Then everything compiles and build/unit-tests passes but integrated/ tests are failing.

#7

Updated by Junxiao Shi almost 3 years ago

Let me repeat: This issue is to switch to Dispatcher, while still using v1 ValidatorNull. It needs to be manually verified with ndn-cxx:commit:2dd711d0a3796a0731f7fe86aba10b8c867edb4e through ndn-cxx-breaks by entering "4050,2".

The reason of separation is to minimize changes in each commit, so that it's clear what changes are for dispatch and what changes are for validator.
ValidatorNull completely ignores the signature so it will accept a command Interest even it's signed with another version's KeyChain.

#8

Updated by Muktadir Chowdhury almost 3 years ago

What are the optional and required parameters of RepoCommands (watch, delete, insert)? Are all the fields required for all the commands? There is no mentioning about it here https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Command

#9

Updated by Junxiao Shi almost 3 years ago

What are the optional and required parameters of RepoCommands (watch, delete, insert)? Are all the fields required for all the commands?

They are mentioned on Basic_Repo_Insertion_Protocol, Repo_Deletion_Protocol, and Watched_Prefix_Insertion_Protocol under each command.

#10

Updated by Muktadir Chowdhury almost 3 years ago

@junxiao, Since we are adopting ndn::mgmt::Dispatcher, repo::RepoCommandResponse should inherit from ndn::mgmt::ControlResponse. What do you think?

#11

Updated by Junxiao Shi almost 3 years ago

Since we are adopting ndn::mgmt::Dispatcher, repo::RepoCommandResponse should inherit from ndn::mgmt::ControlResponse.

Yes, exactly.

#12

Updated by weijia yuan over 1 year ago

Read handle is inherited from base handle, the others are inherited from command base handle. Read is not exactly a command that needs to be validated. The other three handle are using CommandBaseHandle:makeAuthorization() includes validator. So I think the original design is right.
Or using dispatcher, we actually don't need any kind of validator in this code? In that case I can delete the makeAuthorization and make all handles inherited from command base handle.

#13

Updated by weijia yuan over 1 year ago

and I have been trying to run integrated test for this change. Under which version of ndn-cxx I should use to verify the code(your previous discussion is about one year ago)?

#14

Updated by Junxiao Shi over 1 year ago

Reply to note-12: please read Dispatcher API to find the answers.

Reply to note-12: all tests need to pass against ndn-cxx in master branch.

#15

Updated by Junxiao Shi over 1 year ago

  • Blocks deleted (Task #4091: Adapt to ndn-cxx v2::KeyChain and Validator)
#16

Updated by Ashlesh Gawande 7 months ago

  • Related to Bug #4944: ndnputfile does not work added

Also available in: Atom PDF