cncopregistration - register with cncop network#

_images/cncopregistration.png

Overview#

The cncopregistration module provides the facilitities required to inventory a device’s network configuration, register with the cncop network and manage organization associations. Once a device is registered, this module can be used to scan for changes to it’s network configuration, and if detected, will update the cncop network.

Initial registration#

When used to register a new device, the module requires cncop network credentials be specified. If not passed on the command line, the user will be prompted to interactively enter their credentials. The cncop network will use the credentials to return the list of one or more organizations the credentials are associated with. If the credentials are associated with more than one organization, the user will be prompted to interactively select the device’s organization association.

Resolution to SSL:CERTIFICATE_VERIFY_FAILED#

cncopregistration establishes an SSL sessions with one of the Carroll-Net Datacenters. If you run the program on an older version of Windows, it’s possible your Windows certificate store may not have the most up-to-date root certificate store and you will receive the following error message:

>>> ERROR: Unable to get_org, 'GET /registration/get_orgid' Network error
[SSL:CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

The simplest way to resolve this is to visit the Carroll-Net web control panel URL using Internet Explorer. You do not need to login – the act of visiting the site will cause Windows to download and install the root certificates.

If you do not have access to Internet Explorer, you can use Firefox to download the root certificate but you’ll need to manually install it in your certificate store. Alternatively, you can use the brute force approach of downloading and installing Carroll-Net’ certificate, which will also allow cncopregistration to establish SSL sessions.

If you are still having problems establishing SSL sessions aftering installing the root certifgicate, then you should check the system time. If the time of the computer is off by more than a few minutes it may prevent SSL session establishment.

Command line options#

usage: cncopregistration.py [-?] [-d] [-i] [-c CONFIG] [--host HOST] [--reregister [{yes,ask}]] [-u USER] [-p PASSWORD] [--installer] [--refresh] [--updateorg] [--orgid ORGID] [--status]

Optional argument:#

?, -h, --help#

Display help and exit

-d, --debug#

Generate diagnostic logging. The output is directed to the Spool\Logs folder and can be viewed using the cncop watcher scripts.

-i, --internal#

For Carroll-Net internal use only.

-c CONFIG, --config CONFIG#

Alternate configuration file.

--host HOST#

Override hostname. This option is to provide a specific hostname, when the device’s hostname lookup service is not reliable.

--reregister [yes, ask]#

Force re-registration. This is a destructive operation and will destroy any previous registration details for this device. If jobs were created using the earlier registration, the jobs will be orphaned and will need to be manually re-attached after re-registration completes.

-u USER, --user USER#

Cncop network login username. Required for registering new device.

-p PASSWORD, --password PASSWORD#

Cncop network login password. Required for registering new device.

--installer#

Invoked by Carroll-Net software installer. The module will assume silent mode and suppress all interactive queries. If an action requires interactive query, the action will be skipped.

--refresh#

Re-request cncop network to describe our role (eg: REMOTE or PRIME).

--updateorg#

Correct the organization assocation of this device. This option will cause the device to query for the list of possible associations and prompt the user to select the correct association.

--orgid ORGID#

Associate this device with the specified organization id.

--status#

Show registration status and exit.