Task #2039
closedController: remote prefix registration
Added by Junxiao Shi about 10 years ago. Updated about 10 years ago.
100%
Description
Extend ndn::nfd::Controller
to allow generating ControlCommand for remote prefix registration.
Currently Controller
only allows /localhost/nfd
prefix, but remote prefix registration needs /localhop/nfd/rib
prefix.
Updated by Junxiao Shi about 10 years ago
- Blocked by Task #2038: RibMgmt: remote prefix registration added
Updated by Junxiao Shi about 10 years ago
- Blocks Task #2040: ndn-autoconfig: remote prefix registration added
Updated by Alex Afanasyev about 10 years ago
This task will be rejected, as the applications WILL NOT do remote registrations.
This will be the job of NRD, which will automatically infer when to do localhop prefix registrations, based on the input from localhost registrations.
Updated by Alex Afanasyev about 10 years ago
If not rejected, this task should be very specific. Controller should send localhop
registrations only when face is associated with non-local transport.
Updated by Junxiao Shi about 10 years ago
I agree that regular applications SHOULD NOT perform remote prefix registration. However, this is not the basis of rejecting this Task.
This Task allows remote prefix registration commands to be generated and signed by Controller.
This feature is intended to be used by the process who is supposed to send remote prefix registration commands, and certain administrative and testing tools.
This feature, similar to FIB Management commands, is not intended to be used by regular applications.
Controller itself shouldn't forbid remote prefix registration commands to be sent to a local face.
Face::registerPrefix
, the public API for regular applications, makes the choice of whether to send a local or remote prefix registration command.
Updated by Junxiao Shi about 10 years ago
- Blocks Feature #2056: nrd: remote prefix registration added
Updated by Junxiao Shi about 10 years ago
- Blocks deleted (Task #2040: ndn-autoconfig: remote prefix registration)
Updated by Junxiao Shi about 10 years ago
- Blocked by Task #2008: Delete deprecated Command Interest functions added
Updated by Junxiao Shi about 10 years ago
- Blocked by deleted (Task #2008: Delete deprecated Command Interest functions)
Updated by Junxiao Shi about 10 years ago
- Status changed from New to In Progress
A straightforward API is to add a commandPrefix
parameter to Controller::start
.
But we already have five parameters in this method, and adding another makes it uglier.
I plan to make signing identity, timeout, and command prefix properties of Controller
, so that Controller::start
call can be simplier.
The reason is: Controller
is a client of ControlCommand protocol, which is used to interact with one server.
The new API would be:
interface Controller
{
Controller(Face&);
void setDefaultSigningIdentity();
void setSigningIdentity(Name identityName);
void setSigningCertificate(IdentityCertificate);
void setTimeout(time::milliseconds);
void setCommandPrefix(Name commandPrefix);
void start<Command>(CommandParameters, CommandSucceedCallback, CommandFailCallback);
};
Old APIs will be deprecated, and deleted after next release.
Face::registerPrefix
allows specifying signing identity for each prefix, which relies on deprecated API.
I don't see why an application wants to use different identities for different prefixes: local RIB daemon should be configured to accept the application's certificate for all prefixes it needs.
Updated by Junxiao Shi about 10 years ago
20141024 conference call rejects the design in note-10.
Reason for this rejection is: If we allow application to change signing identity on the Controller owned by Face, prefix unregistration command may incorrectly use different signing identity than prefix registration command.
An alternate design is agreed:
interface Controller
{
Controller(Face&);
void start<Command>(CommandParameters, CommandSucceedCallback, CommandFailCallback, CommandOptions);
};
struct CommandOptions
{
union {
void useDefaultSigningIdentity;
Name signingIdentity;
IdentityCertificate signingCertificate;
}; // either one of these three should be satisfied; implement shouldn't use 'union'
time::milliseconds timeout;
Name prefix;
};
Face::registerPrefix
and similar methods should take optional CommandOptions
, and don't need multiple overloads.
Controller no longer owns a KeyChain, but uses the KeyChain from Face.
Face constructor can take KeyChain
:
Face(shared_ptr<Transport> transport, io_service& io, KeyChain& keyChain);
Updated by Alex Afanasyev about 10 years ago
void useDefaultSigningIdentity
=> bool useDefaultSigningIdentity
Updated by Junxiao Shi about 10 years ago
void useDefaultSigningIdentity
=>bool useDefaultSigningIdentity
The union shown in note-11 is an abstract which indicates three properties are mutually exclusive.
The implementation is likely to have an enum
to indicate which option is chosen, and two fields for identityName and certificate.
Callers can access those fields via getters/setters similar to those in note-10.
Updated by Junxiao Shi about 10 years ago
- % Done changed from 0 to 30
Change-Id: I51111d84c73c25265d03f303fad238f314264a08 implements CommandOptions
type.
Upcoming commits:
- change
Controller::start
to takeCommandOptions
, and deprecate old overloads - change
Face::registerPrefix
and other methods to useController::start
overload that takesCommandOptions
; make Face own KeyChain
Updated by Junxiao Shi about 10 years ago
- % Done changed from 30 to 70
Change-Id: I8c405498597bdca115b71eec87acf23d28a266b1 changes Controller::start
to take CommandOptions
.
Controller::start<RibRegisterCommand>
will be capable of sending remote prefix registration commands once this Change is merged.
Updated by Junxiao Shi about 10 years ago
Change-Id: Iecc60c45ba6134dbcc34f58dcdf6a171e7b05253 gives Face
class an internal KeyChain.
Upcoming commits:
- In
Face::registerPrefix
and similar methods, useCommandOptions
- Put
DEPRECATED
macros on all deprecated items in this Task, in order to warn library users
Updated by Junxiao Shi about 10 years ago
- Blocks Task #2097: Delete deprecated Face::Face(shared_ptr<io_service>) and Face::ioService() added
Updated by Junxiao Shi about 10 years ago
http://gerrit.named-data.net/1369 lets Face::registerPrefix
use CommandOptions
and no longer uses deprecated overloads of Controller::start
.
Updated by Junxiao Shi about 10 years ago
- Blocks deleted (Task #2097: Delete deprecated Face::Face(shared_ptr<io_service>) and Face::ioService())
Updated by Junxiao Shi about 10 years ago
- Blocks deleted (Feature #2056: nrd: remote prefix registration)
Updated by Junxiao Shi about 10 years ago
- Related to Task #2097: Delete deprecated Face::Face(shared_ptr<io_service>) and Face::ioService() added
Updated by Junxiao Shi about 10 years ago
- Related to Feature #2056: nrd: remote prefix registration added
Updated by Junxiao Shi about 10 years ago
- % Done changed from 70 to 90
The last thing left in this Task is:
- Put DEPRECATED macros on all deprecated items in this Task, in order to warn library users
I'll defer this after Nov 09.
This Task is no longer blocking #2056, because necessary features are available now.
Updated by Junxiao Shi about 10 years ago
- Blocks Task #2138: Delete deprecated Controller functions added
Updated by Junxiao Shi about 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 90 to 100
Last commit for this Task is in: http://gerrit.named-data.net/1420
Sadly, NFD and NLSR still have reference to Controller(Face&)
. They are fixed in http://gerrit.named-data.net/1421 and http://gerrit.named-data.net/1422.
I didn't check other owned projects, because they are not supposed to use Controller
directly.
Updated by Junxiao Shi about 10 years ago
- Status changed from Code review to Closed