Skip to content

Ubuntu Install

kcwayne53 edited this page Jun 22, 2018 · 5 revisions

Install Veriteem Compliance Ledger Python Package

The Veriteem Compliance Ledger solution is distributed as a python package, and is installed with pip3. The package has dependencies on the veriteem, go-lang, and ethereum packages, and will install these as well.

If you have not installed and configured the veriteem package on your system, you will need to configure and start the Veriteem Ledger Technology package on your server in order to have a fabric for accessing the ledger blockchain. You can find more information about the veriteem package and configuration at https://github.com/VerimatrixGen1/Veriteem/wiki

pip3 is included in the Python3 distribution installed on the Ubuntu system. Python3 is installed by default on Ubuntu 17.10. If you are using an earlier version of Ubuntu, google "install python3 Ubuntu" to find installation instructions for the various version of Ubuntu.

As in all python packages if you use "su pip3 install veriteemcomplianceledger", the python package will be installed in /usr/local/lib/python3.X/dist-packages/veriteemcomplianceledger.

If you use "pip3 install veriteemcomplianceledger", the package will be installed in your home directory/.local/lib/python3.X/sitepackages/veriteem. i When using "su pip3 install ..." you are installing the package for all users of the system. Without the "su" option you are installing for your login account's use.

Using the "su" option requires that your account has administrator privileges, or that you know the root password to the server.

Contracts available in the Veriteem Compliance Ledger

The contracts available in the veriteemcomplianceledger package are as follows:

  • ZigBeeCompliance
  • ModelInfo
  • DeviceSecurity

To access the contracts, run the following

  • VeriteemAttach.py -z
  • loadScript("LoadZigBee.js")

This loads the contracts into the ethereum geth client, and you can work with the compliance records hosted on the distributed ledger technology

Example queries of the ledger

  • VeriteemAttach.py -z

  • admin.peers.length

    • return value should be greater than 0
  • eth.coinbase

    • return value should be the account used in the LedgerConfig script
  • ZNMHF1 = '{"Cert":"ZigBee3","Name":"Acme","Model":"Boomerang","HwVer":"1.0","FwVer":"1.0"}'

  • loadScript("LoadZigBee.js")

  • ZigBee.ReadFamily(ZNMHF1)

    • ["0x425fd133b04814563267cec46e360ef33a106f28", true, 0, "0x425fd133b04814563267cec46e360ef33a106f28"]
  • ZigBee.Read("0x425fd133b04814563267cec46e360ef33a106f28")

    • ["0x6270d0914e22fa7f8fb48942b8b3c663f412b2e8", "0xa8f77fc608378ed9961d71ac34fe23279a7c21e1", "0/0/0", "{"Name":"Acme","Model":"Boomerang","HwVer":"1.0","FwVer":"1.0","Sku":"1111","ApplicationType":"ZigBee 3.0","ApplicationTypeVer":"1.0","TechCategory":"ZigBee 3.0","TechSubCategories":["Temperature Sensor (Home)"],"ParentFuncCategories":["Energy Efficiency"],"FuncSubCategories":["Thermometer","Temperature Sensor (Home)","Simple Sensor","Sensor","Energy Efficiency"],"CertId":"ZIG1111","CertDate":"1/1/2018"}", true, "0x0000000000000000000000000000000000000000"]
  • ModelInfo.Read("0xa8f77fc608378ed9961d71ac34fe23279a7c21e1")

    • ["{"Name":"Acme","Model":"Boomerang","HwVer":"1.0","CompanyURI":"www.acme.com","MfgCert":"-----BEGIN CERTIFICATE-----MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ-----END CERTIFICATE-----"}", 2]
  • DeviceSecurity.Read("0xa8f77fc608378ed9961d71ac34fe23279a7c21e1",0)

    • ["{"ietf-mud:mud": {"mud-version": 1,"mud-url": "https://bms.example.com/.well-known/mud/lightbulb2001","last-update": "2018-01-24T16:08:58+01:00","cache-validity": 48,"is-supported": true,"systemSecurity": "The BMS Example Lightbulb","from-device-policy": {"access-lists": {"access-list": [{"name": "mud-61898-v6fr"}]}},"to-device-policy": {"access-lists": {"access-list": [{"name": "mud-61898-v6to"}]}}},"ietf-access-control-list:access-lists": {"acl": [{"name": "mud-61898-v6to","type": "ipv6-acl-type","aces": {"ace": [{"name": "cl0-todev","matches": {"l3": {"ipv6": {"ietf-acldns:src-dnsname": "service.bms.example.com","protocol": 6}},"l4": {"tcp": {"ietf-mud:direction-initiated": "from-device","source-port-range-or-operator": {"operator": "eq","port": 443}}}},"actions": {"forwarding": "accept"}}]}},{"name": "mud-61898-v6fr","type": "ipv6-acl-type","aces": {"ace": [{"name": "cl0-frdev","matches": {"l3": {"ipv6": {"ietf-acldns:dst-dnsname": "service.bms.example.com","protocol": 6}},"l4": {"tcp": {"ietf-mud:direction-initiated": "from-device","destination-port-range-or-operator": {"operator": "eq","port": 443}}}},"actions": {"forwarding": "accept"}}]}}]}}", "{"s1691":{"sec3a1AIaa_NIST_Defects":"NA","sec3a1AII_Upgradable":"True","sec3a1AIIIaa_NonDepricatedCommunicationProtocol":"True","sec3a1AIIIbb_NonDepreciatedEncryption":"True","sec3a1AIIIcc_NonDepricatedInterconnection":"True","sec3a1AIV_NoHardCodedCredentials":"True","sec3a1Eii_AnticipatedEndingSecuritySupprotDate":"1/1/2020"}}", "1.0", "www.acme.com/0x425fd133b04814563267cec46e360ef33a106f28/image.zip"]

Clone this wiki locally