Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 1 | client.conf |
| 2 | =========== |
| 3 | |
| 4 | System configuration of NDN platform is specified in ``client.conf``. |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 5 | |
| 6 | The configuration file ``client.conf`` is looked up in several directories in the following order: |
| 7 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 8 | - ``$HOME/.ndn``: user-specific settings |
| 9 | - ``@SYSCONFDIR@/ndn`` (``/usr/local/etc/ndn``, ``/opt/local/etc/ndn``, or other, depending how the |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 10 | library is configured): system-wide settings |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 11 | - ``/etc/ndn``: default system-wide settings |
| 12 | |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 13 | Here is an example of ``client.conf`` for current ndn-cxx package: |
| 14 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 15 | .. literalinclude:: ../../client.conf.sample |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 16 | |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 17 | |
| 18 | NFD |
| 19 | --- |
| 20 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 21 | transport |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 22 | FaceUri for default connection toward local NDN forwarder. Only ``unix`` and ``tcp4`` FaceUris |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 23 | can be specified here. |
| 24 | |
| 25 | By default, ``unix:///var/run/nfd.sock`` is used. |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 26 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 27 | .. note:: |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 28 | This value can be overridden using the ``NDN_CLIENT_TRANSPORT`` environment variable. |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 29 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 30 | |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 31 | Key Management |
| 32 | -------------- |
| 33 | |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 34 | pib |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 35 | The public key information for each private key stored in TPM. The format for this setting is:: |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 36 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 37 | pib=[scheme]:[location] |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 38 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 39 | Possible values for ``[scheme]``: |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 40 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 41 | * ``pib-sqlite3``: local PIB implementation with SQLite3 storage engine |
| 42 | |
| 43 | Possible values for ``[location]``: |
| 44 | |
| 45 | * absolute path where SQLite3 database will be stored |
| 46 | * relative path (relative to ``config.conf``) |
| 47 | * empty: default path ``$HOME/.ndn`` will be used |
| 48 | |
| 49 | When ``[location]`` is empty, trailing ``:`` can be omitted. For example:: |
| 50 | |
| 51 | pib=pib-sqlite3 |
| 52 | |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 53 | Changing PIB scheme without changing location is **not** allowed. If a change like this is |
| 54 | necessary, the whole backend storage must be destroyed. For example, when the default location is |
| 55 | used:: |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 56 | |
| 57 | rm -rf ~/.ndn/ndnsec-* |
| 58 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 59 | It is not recommended to share the same directory between machines, e.g. via NFS. |
Junxiao Shi | 67fba7f | 2016-09-09 13:40:05 +0000 | [diff] [blame] | 60 | Simultaneous access from multiple machines may cause errors. |
| 61 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 62 | .. note:: |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 63 | This value can be overridden using the ``NDN_CLIENT_PIB`` environment variable. |
Alexander Afanasyev | 57e0036 | 2016-06-23 13:22:54 -0700 | [diff] [blame] | 64 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 65 | tpm |
| 66 | Trusted Platform Module (TPM) where the private keys are stored. The format for this setting |
| 67 | is:: |
| 68 | |
| 69 | tpm=[scheme]:[location] |
| 70 | |
| 71 | Possible values for ``[scheme]``: |
| 72 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 73 | * ``tpm-osx-keychain`` (default on macOS): secure storage of private keys in the macOS |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 74 | Keychain with OS-provided access restrictions. |
| 75 | |
| 76 | ``[location]`` parameter is ignored. |
| 77 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 78 | May not work for daemon applications, as user interaction may be required to access the |
| 79 | macOS Keychain. |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 80 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 81 | * ``tpm-file`` (default on all other platforms): file-based storage of private keys. |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 82 | |
| 83 | Possible values for ``[location]``: |
| 84 | |
| 85 | * absolute path to directory that will store private/public key files (unencrypted with |
| 86 | ``0700`` permission) |
| 87 | * relative path (relative to ``config.conf``) |
| 88 | * empty: default path ``$HOME/.ndn/ndnsec-tpm-file`` will be used |
| 89 | |
| 90 | When ``[location]`` is empty, trailing ``:`` can be omitted. For example:: |
| 91 | |
| 92 | tpm=tpm-file |
| 93 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 94 | **Changing the ``tpm`` setting is only possible together with ``pib`` setting. Otherwise, |
| 95 | an error will be generated during PIB/TPM access.** |
Alexander Afanasyev | 57e0036 | 2016-06-23 13:22:54 -0700 | [diff] [blame] | 96 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 97 | It is not recommended to share the same directory between machines, e.g. via NFS. |
Junxiao Shi | 67fba7f | 2016-09-09 13:40:05 +0000 | [diff] [blame] | 98 | Simultaneous access from multiple machines may cause errors. |
| 99 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 100 | .. note:: |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 101 | This value can be overridden using the ``NDN_CLIENT_TPM`` environment variable. |