blob: 590897202ce91e027dda178a0d39b41bf0dc8fa2 [file] [log] [blame]
Yingdi Yu4e99f532014-08-25 19:40:57 -07001client.conf
2===========
3
4System configuration of NDN platform is specified in ``client.conf``.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -07005
6The configuration file ``client.conf`` is looked up in several directories in the following order:
7
Davide Pesavento534b8412018-12-08 19:19:09 -05008- ``$HOME/.ndn``: user-specific settings
9- ``@SYSCONFDIR@/ndn`` (``/usr/local/etc/ndn``, ``/opt/local/etc/ndn``, or other, depending how the
Niv Sardi8ac87542016-12-13 15:38:06 -030010 library is configured): system-wide settings
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070011- ``/etc/ndn``: default system-wide settings
12
Yingdi Yu4e99f532014-08-25 19:40:57 -070013Here is an example of ``client.conf`` for current ndn-cxx package:
14
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070015.. literalinclude:: ../../client.conf.sample
Yingdi Yu4e99f532014-08-25 19:40:57 -070016
Yingdi Yu4e99f532014-08-25 19:40:57 -070017
18NFD
19---
20
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070021transport
Eric Newberry52a803c2020-04-07 00:01:12 -070022 FaceUri for default connection toward local NDN forwarder. Only ``unix``, ``tcp``, ``tcp4``, and
23 ``tcp6`` FaceUris can be specified here.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070024
Eric Newberry52a803c2020-04-07 00:01:12 -070025 By default, ``unix:///run/nfd.sock`` is used on Linux and ``unix:///var/run/nfd.sock`` is used on
26 other platforms.
Yingdi Yu4e99f532014-08-25 19:40:57 -070027
Davide Pesavento534b8412018-12-08 19:19:09 -050028 .. note::
Niv Sardi8ac87542016-12-13 15:38:06 -030029 This value can be overridden using the ``NDN_CLIENT_TRANSPORT`` environment variable.
Yingdi Yu4e99f532014-08-25 19:40:57 -070030
Davide Pesavento534b8412018-12-08 19:19:09 -050031
Yingdi Yu4e99f532014-08-25 19:40:57 -070032Key Management
33--------------
34
Yingdi Yu4e99f532014-08-25 19:40:57 -070035pib
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070036 The public key information for each private key stored in TPM. The format for this setting is::
Yingdi Yu4e99f532014-08-25 19:40:57 -070037
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070038 pib=[scheme]:[location]
Yingdi Yu4e99f532014-08-25 19:40:57 -070039
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070040 Possible values for ``[scheme]``:
Yingdi Yu4e99f532014-08-25 19:40:57 -070041
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070042 * ``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 Sardi8ac87542016-12-13 15:38:06 -030054 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 Afanasyev5208d0e2015-06-03 16:42:09 -070057
58 rm -rf ~/.ndn/ndnsec-*
59
Davide Pesavento534b8412018-12-08 19:19:09 -050060 It is not recommended to share the same directory between machines, e.g. via NFS.
Junxiao Shi67fba7f2016-09-09 13:40:05 +000061 Simultaneous access from multiple machines may cause errors.
62
Davide Pesavento534b8412018-12-08 19:19:09 -050063 .. note::
Niv Sardi8ac87542016-12-13 15:38:06 -030064 This value can be overridden using the ``NDN_CLIENT_PIB`` environment variable.
Alexander Afanasyev57e00362016-06-23 13:22:54 -070065
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070066tpm
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 Pesavento534b8412018-12-08 19:19:09 -050074 * ``tpm-osx-keychain`` (default on macOS): secure storage of private keys in the macOS
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070075 Keychain with OS-provided access restrictions.
76
77 ``[location]`` parameter is ignored.
78
Davide Pesavento534b8412018-12-08 19:19:09 -050079 May not work for daemon applications, as user interaction may be required to access the
80 macOS Keychain.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070081
Davide Pesavento534b8412018-12-08 19:19:09 -050082 * ``tpm-file`` (default on all other platforms): file-based storage of private keys.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070083
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 Pesavento534b8412018-12-08 19:19:09 -050095 **Changing the ``tpm`` setting is only possible together with ``pib`` setting. Otherwise,
96 an error will be generated during PIB/TPM access.**
Alexander Afanasyev57e00362016-06-23 13:22:54 -070097
Davide Pesavento534b8412018-12-08 19:19:09 -050098 It is not recommended to share the same directory between machines, e.g. via NFS.
Junxiao Shi67fba7f2016-09-09 13:40:05 +000099 Simultaneous access from multiple machines may cause errors.
100
Davide Pesavento534b8412018-12-08 19:19:09 -0500101 .. note::
Niv Sardi8ac87542016-12-13 15:38:06 -0300102 This value can be overridden using the ``NDN_CLIENT_TPM`` environment variable.