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 |
Eric Newberry | 52a803c | 2020-04-07 00:01:12 -0700 | [diff] [blame^] | 22 | FaceUri for default connection toward local NDN forwarder. Only ``unix``, ``tcp``, ``tcp4``, and |
| 23 | ``tcp6`` FaceUris can be specified here. |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 24 | |
Eric Newberry | 52a803c | 2020-04-07 00:01:12 -0700 | [diff] [blame^] | 25 | By default, ``unix:///run/nfd.sock`` is used on Linux and ``unix:///var/run/nfd.sock`` is used on |
| 26 | other platforms. |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 27 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 28 | .. note:: |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 29 | This value can be overridden using the ``NDN_CLIENT_TRANSPORT`` environment variable. |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 30 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 31 | |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 32 | Key Management |
| 33 | -------------- |
| 34 | |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 35 | pib |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 36 | 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] | 37 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 38 | pib=[scheme]:[location] |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 39 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 40 | Possible values for ``[scheme]``: |
Yingdi Yu | 4e99f53 | 2014-08-25 19:40:57 -0700 | [diff] [blame] | 41 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 42 | * ``pib-sqlite3``: local PIB implementation with SQLite3 storage engine |
| 43 | |
| 44 | Possible values for ``[location]``: |
| 45 | |
| 46 | * absolute path where SQLite3 database will be stored |
| 47 | * relative path (relative to ``config.conf``) |
| 48 | * empty: default path ``$HOME/.ndn`` will be used |
| 49 | |
| 50 | When ``[location]`` is empty, trailing ``:`` can be omitted. For example:: |
| 51 | |
| 52 | pib=pib-sqlite3 |
| 53 | |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 54 | Changing PIB scheme without changing location is **not** allowed. If a change like this is |
| 55 | necessary, the whole backend storage must be destroyed. For example, when the default location is |
| 56 | used:: |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 57 | |
| 58 | rm -rf ~/.ndn/ndnsec-* |
| 59 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 60 | 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] | 61 | Simultaneous access from multiple machines may cause errors. |
| 62 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 63 | .. note:: |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 64 | This value can be overridden using the ``NDN_CLIENT_PIB`` environment variable. |
Alexander Afanasyev | 57e0036 | 2016-06-23 13:22:54 -0700 | [diff] [blame] | 65 | |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 66 | tpm |
| 67 | Trusted Platform Module (TPM) where the private keys are stored. The format for this setting |
| 68 | is:: |
| 69 | |
| 70 | tpm=[scheme]:[location] |
| 71 | |
| 72 | Possible values for ``[scheme]``: |
| 73 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 74 | * ``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] | 75 | Keychain with OS-provided access restrictions. |
| 76 | |
| 77 | ``[location]`` parameter is ignored. |
| 78 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 79 | May not work for daemon applications, as user interaction may be required to access the |
| 80 | macOS Keychain. |
Alexander Afanasyev | 5208d0e | 2015-06-03 16:42:09 -0700 | [diff] [blame] | 81 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 82 | * ``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] | 83 | |
| 84 | Possible values for ``[location]``: |
| 85 | |
| 86 | * absolute path to directory that will store private/public key files (unencrypted with |
| 87 | ``0700`` permission) |
| 88 | * relative path (relative to ``config.conf``) |
| 89 | * empty: default path ``$HOME/.ndn/ndnsec-tpm-file`` will be used |
| 90 | |
| 91 | When ``[location]`` is empty, trailing ``:`` can be omitted. For example:: |
| 92 | |
| 93 | tpm=tpm-file |
| 94 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 95 | **Changing the ``tpm`` setting is only possible together with ``pib`` setting. Otherwise, |
| 96 | an error will be generated during PIB/TPM access.** |
Alexander Afanasyev | 57e0036 | 2016-06-23 13:22:54 -0700 | [diff] [blame] | 97 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 98 | 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] | 99 | Simultaneous access from multiple machines may cause errors. |
| 100 | |
Davide Pesavento | 534b841 | 2018-12-08 19:19:09 -0500 | [diff] [blame] | 101 | .. note:: |
Niv Sardi | 8ac8754 | 2016-12-13 15:38:06 -0300 | [diff] [blame] | 102 | This value can be overridden using the ``NDN_CLIENT_TPM`` environment variable. |