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