userguide.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <book>
  7. <bookinfo>
  8. <title>BIND 10 User Guide</title>
  9. <subtitle>Administrator Reference for BIND 10</subtitle>
  10. <copyright>
  11. <year>2010</year><holder>Internet Systems Consortium, Inc.</holder>
  12. </copyright>
  13. <!-- <abstract><para>This is the definitive reference and user's guide for BIND 10</para></abstract> -->
  14. </bookinfo>
  15. <chapter id="intro">
  16. <title>Introduction</title>
  17. <para>
  18. BIND is the popular implementation of a DNS server, developer
  19. interfaces, and DNS tools.
  20. BIND 10 is a rewrite, using C++ and Python, to provide
  21. modular components for serving and maintaining DNS.
  22. </para>
  23. <note><para>BIND 10, at this time, does not provide an recursive
  24. DNS server. It does provide a EDNS0- and DNSSEC-capable
  25. authoritative DNS server.</para></note>
  26. <note><para>This guide covers the experimental prototype version
  27. of BIND 10.</para></note>
  28. <para>
  29. BIND 10 provides separate executables for different tasks.
  30. The standard components include:
  31. <itemizedlist>
  32. <listitem>
  33. <simpara><command>msgq</command> &mdash; message bus daemon</simpara>
  34. </listitem>
  35. <listitem>
  36. <simpara><command>b10-auth</command> &mdash; authoritative DNS server</simpara>
  37. </listitem>
  38. <listitem>
  39. <simpara><command>b10-cfgmgr</command> &mdash; configuration manager</simpara>
  40. </listitem>
  41. <listitem>
  42. <simpara><command>b10-cmdctl</command> REST-ful communication service</simpara>
  43. </listitem>
  44. <listitem>
  45. <simpara><command>b10-xfrin</command> Incoming zone transfer service</simpara>
  46. </listitem>
  47. <listitem>
  48. <simpara><command>bind10</command> &mdash; master process for BIND 10</simpara>
  49. </listitem>
  50. </itemizedlist>
  51. </para>
  52. <para>
  53. The user tools include:
  54. <itemizedlist>
  55. <listitem>
  56. <simpara><command>bindctl</command> &mdash; interactive administration interface</simpara>
  57. </listitem>
  58. <listitem>
  59. <simpara><command>b10-loadzone</command> &mdash; tool to load standard master zone files</simpara>
  60. </listitem>
  61. <!-- TODO usermgr -->
  62. </itemizedlist>
  63. </para>
  64. <para>
  65. The tools and modules are covered in full detail in this users guide.
  66. <!-- TODO point to these -->
  67. In addition, manual pages are also provided in the default installation.
  68. </para>
  69. <!--
  70. bin/
  71. bindctl*
  72. host*
  73. lib/
  74. libauth
  75. libdns
  76. libexceptions
  77. python3.1/site-packages/isc/{cc,config}
  78. sbin/
  79. bind10
  80. share/
  81. share/bind10/ <
  82. auth.spec
  83. b10-cmdctl.pem
  84. bob.spec
  85. passwd.csv
  86. man/
  87. var/
  88. bind10/b10-config.db
  89. -->
  90. <para>
  91. BIND 10 also provides libraries and programmer interfaces
  92. for C++ and Python for the message bus, configuration backend,
  93. and, of course, DNS. These include detailed developer
  94. documentation and code examples.
  95. <!-- TODO point to this -->
  96. </para>
  97. </chapter>
  98. <chapter id="quickstart">
  99. <title>Quick start</title>
  100. <para>
  101. This quickly covers the standard steps for installing
  102. and deploying BIND 10 as an authoritative nameserver using
  103. its defaults. For troubleshooting, full customizations and further
  104. details, see the respective chapters in the BIND 10 user guide.
  105. </para>
  106. <itemizedlist>
  107. <listitem>
  108. <simpara>Install required dependencies: Python 3.1, SQLite3
  109. library, and Boost development headers.</simpara>
  110. </listitem>
  111. <listitem>
  112. <simpara>Download the BIND 10 source tarball. <!-- TODO: from -->
  113. </simpara>
  114. </listitem>
  115. <listitem>
  116. <para>Extract the tar file:
  117. <screen>$ <userinput>gzcat bind10-<replaceable>VERSION</replaceable>.tar.gz | tar -xvf -</userinput></screen>
  118. </para>
  119. </listitem>
  120. <listitem>
  121. <para>Go into the source and run configure:
  122. <screen>$ <userinput>cd bind10-<replaceable>VERSION</replaceable></userinput>
  123. $ <userinput>./configure</userinput></screen>
  124. </para>
  125. </listitem>
  126. <listitem>
  127. <para>Build it:
  128. <screen>$ <userinput>make</userinput></screen>
  129. </para>
  130. </listitem>
  131. <listitem>
  132. <para>Install it (to default /usr/local):
  133. <screen>$ <userinput>make install</userinput></screen>
  134. </para>
  135. </listitem>
  136. <listitem>
  137. <para>Start the server:
  138. <screen>$ <userinput>/usr/local/sbin/bind10</userinput></screen>
  139. </para>
  140. </listitem>
  141. <listitem>
  142. <note><simpara>The Y1 prototype of the b10-auth server listens on
  143. 0.0.0.0 (all interfaces) port 5300. (This is not the standard
  144. domain service port.)</simpara></note>
  145. <para>Test it; for example:
  146. <screen>$ <userinput>dig @127.0.0.1 -p 5300 -c CH -t TXT authors.bind</userinput></screen>
  147. </para>
  148. </listitem>
  149. <listitem>
  150. <para>Load desired zone file(s), for example:
  151. <screen>$ <userinput>b10-loadzone <replaceable>your.zone.example.org</replaceable></userinput></screen>
  152. </para>
  153. </listitem>
  154. <listitem>
  155. <simpara>Test the new zone.
  156. </simpara>
  157. </listitem>
  158. </itemizedlist>
  159. </chapter>
  160. <chapter id="install">
  161. <title>Installation from source</title>
  162. <para>
  163. BIND 10 is open source software written in C++ and Python.
  164. It is freely available in source code form from ISC via
  165. the Subversion code revision control system or as a downloadable
  166. tar file. It may also be available in pre-compiled ready-to-use
  167. packages from operating system vendors.
  168. </para>
  169. <sect1>
  170. <title>Download Tar File</title>
  171. <para>The BIND 10 development snapshots and releases
  172. are available as tarball downloads.
  173. </para>
  174. <!-- TODO -->
  175. </sect1>
  176. <sect1>
  177. <title>Retrieve from Subversion</title>
  178. <para>
  179. The latest development code, including temporary experiments
  180. and un-reviewed code, is available via the BIND 10 code revision
  181. control system. This is powered by Subversion and all the BIND 10
  182. development is public.
  183. The leading development is done in the <quote>trunk</quote>
  184. and the first year prototype containing reviewed code is in
  185. <filename>branches/Y1</filename>.
  186. </para>
  187. <para>
  188. The code can be checked out from <filename>svn://bind10.isc.org/svn/bind10</filename>; for example to check out the trunk:
  189. <screen>$ <userinput>svn co svn://bind10.isc.org/svn/bind10/trunk</userinput></screen>
  190. </para>
  191. <para>
  192. You don't need to retrieve the source code from subversion
  193. unless you are testing latest code which is not provided in the
  194. source tarball. Most users will just use the source tar file.
  195. </para>
  196. <sect2>
  197. <title>Generate configuration files</title>
  198. <para>
  199. When checking out the code from
  200. the code version control system, it doesn't include the
  201. generated configure script, Makefile.in files, nor the
  202. related configure files.
  203. They can be created by running <command>autoreconf</command>
  204. with the <command>--install</command> switch.
  205. This will run <command>autoconf</command>, <command>aclocal</command>,
  206. <command>libtoolize</command>, <command>autoheader</command>,
  207. <command>automake</command>, and related commands &mdash;
  208. and provide needed build files.
  209. </para>
  210. <para>
  211. This requires <command>autoconf</command> version 2.59 or newer
  212. and <command>automake</command> version 1.11 or better (for
  213. working Python 3.1 tests).
  214. </para>
  215. <note><para>
  216. Some operating systems do not provide these in their
  217. default installation nor standard packages collections.
  218. You may need to install them separately.
  219. </para></note>
  220. </sect2>
  221. </sect1>
  222. <sect1>
  223. <title>Required Software</title>
  224. <para>
  225. BIND 10 requires Python 3.1.
  226. </para>
  227. <para>
  228. Building from the source tarball requires the Boost
  229. build-time headers. At least Boost version 1.34 is required.
  230. <!-- TODO: we don't check for this version -->
  231. <!-- NOTE: jreed has tested with 1.34, 1.38, and 1.41. -->
  232. </para>
  233. <para>
  234. If the Boost System Library is detected at configure time,
  235. BIND 10 will be built using an alternative method for
  236. networking I/O using Boost ASIO support. This provides
  237. asynchrony support; with ASIO the Authoritative DNS server
  238. can handle other queries while the processing of a TCP
  239. transaction stalls.
  240. This dependency is not required unless you need
  241. <!-- TODO: want --> this feature as TCP transport support is
  242. provided using alternative code.
  243. </para>
  244. <note><para>
  245. For the Y1 prototype release, the only supported data source
  246. backend is SQLite3. The authoritative server requires
  247. SQLite 3.3.9 or newer,
  248. and the XFRin module requires the Python _sqlite3.so module.
  249. </para></note>
  250. <!-- TODO: this will change ... -->
  251. <!-- TODO: list where to get these from -->
  252. <note><para>
  253. Some operating systems do not provide these dependencies
  254. in their default installation nor standard packages
  255. collections.
  256. You may need to install them separately.
  257. </para></note>
  258. <para>
  259. Building BIND 10 also requires a C++ compiler and
  260. standard development headers.
  261. BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2,
  262. 4.2.1, 4.3.2, and 4.4.1.
  263. </para>
  264. </sect1>
  265. <sect1>
  266. <title>Supported Platforms</title>
  267. <para>
  268. BIND 10 builds have been tested on Debian GNU/Linux 5,
  269. Ubuntu 9.10, NetBSD 5, Solaris 10, FreeBSD 7, and CentOS
  270. Linux 5.3.
  271. It has been tested on Sparc, i386, and amd64 hardware
  272. platforms.
  273. It is planned for BIND 10 to build, install and run on
  274. Windows and standard Unix-type platforms.
  275. </para>
  276. </sect1>
  277. <sect1>
  278. <title>Configure before the build</title>
  279. <para>
  280. BIND 10 uses the GNU Build System to discover build environment
  281. details.
  282. To generate the makefiles using the defaults, simply run:
  283. <screen>$ <userinput>./configure</userinput></screen>
  284. </para>
  285. <para>
  286. Run <command>./configure</command> with the <command>--help</command>
  287. switch to view the different options. The commonly-used options are:
  288. <variablelist>
  289. <varlistentry>
  290. <term>--with-boostlib</term>
  291. <listitem>
  292. <simpara>Define the path to find the Boost system library.
  293. </simpara>
  294. </listitem>
  295. </varlistentry>
  296. <varlistentry>
  297. <term>--without-boostlib</term> or
  298. <term>--with-boostlib=no</term>
  299. <listitem>
  300. <simpara>Disable the Boost ASIO support.</simpara>
  301. </listitem>
  302. </varlistentry>
  303. <varlistentry>
  304. <term>--with-pythonpath</term>
  305. <listitem>
  306. <simpara>Define the path to Python 3.1 if it is not in the
  307. standard execution path.
  308. </simpara>
  309. </listitem>
  310. </varlistentry>
  311. <varlistentry>
  312. <term>--with-boost-include</term>
  313. <listitem>
  314. <simpara>Define the path to find the Boost headers.
  315. </simpara>
  316. </listitem>
  317. </varlistentry>
  318. <varlistentry>
  319. <term>--prefix</term>
  320. <listitem>
  321. <simpara>Define the the installation location (the
  322. default is <filename>/usr/local/</filename>).
  323. </simpara>
  324. </listitem>
  325. </varlistentry>
  326. </variablelist>
  327. </para>
  328. <!-- TODO: gtest, lcov -->
  329. <para>
  330. For example, the following configures it to build
  331. with BOOST ASIO support, find the Boost headers, find the
  332. Python interpreter, and sets the installation location:
  333. <screen>$ <userinput>./configure --with-boostlib=/usr/pkg/lib \
  334. --with-boost-include=/usr/pkg/include \
  335. --with-pythonpath=/usr/pkg/bin/python3.1 \
  336. --prefix=/opt/bind10</userinput></screen>
  337. </para>
  338. <para>
  339. If the configure fails, it may be due to missing or old
  340. dependencies.
  341. </para>
  342. </sect1>
  343. <sect1>
  344. <title>Build</title>
  345. <para>
  346. After the configure step is complete, to build the executables
  347. from the C++ code and prepare the Python scripts, run:
  348. <screen>$ <userinput>make</userinput></screen>
  349. </para>
  350. </sect1>
  351. <sect1>
  352. <title>Install</title>
  353. <para>
  354. To install the BIND 10 executables, support files,
  355. and documentation, run:
  356. <screen>$ <userinput>make install</userinput></screen>
  357. </para>
  358. <note><para>The install step may require superuser
  359. privileges.</para></note>
  360. </sect1>
  361. <!-- TODO: tests -->
  362. <sect1>
  363. <title>Install Hierarchy</title>
  364. <para>
  365. The following is the layout of the complete BIND 10 installation:
  366. <itemizedlist>
  367. <listitem>
  368. <simpara><filename>bin/</filename> &mdash; general tools and
  369. diagnostic clients.</simpara>
  370. </listitem>
  371. <listitem>
  372. <simpara><filename>etc/bind10/</filename> &mdash; configuration files.
  373. </simpara>
  374. <!-- TODO: create the etc/bind10/ directory? -->
  375. </listitem>
  376. <listitem>
  377. <simpara><filename>lib/</filename> &mdash; libraries and
  378. python modules.</simpara>
  379. </listitem>
  380. <listitem>
  381. <simpara><filename>libexec/bind10/</filename> &mdash; executables that
  382. a user wouldn't normally run directly. Nor would they be used
  383. independently. These are the BIND 10 modules which are daemons
  384. started by the <command>bind10</command> tool.
  385. </simpara>
  386. </listitem>
  387. <listitem>
  388. <simpara><filename>sbin/</filename> &mdash; commands used by
  389. the system administrator.
  390. </simpara>
  391. </listitem>
  392. <listitem>
  393. <simpara><filename>share/bind10/</filename> &mdash; configuration
  394. specifications.
  395. </simpara>
  396. </listitem>
  397. <listitem>
  398. <simpara><filename>share/man/</filename> &mdash; manual pages (online
  399. documentation).
  400. </simpara>
  401. </listitem>
  402. <listitem>
  403. <simpara><filename>var/bind10/</filename> &mdash; data source and
  404. configuration databases.
  405. <!-- TODO: move the sqlite3 database there -->
  406. </simpara>
  407. </listitem>
  408. </itemizedlist>
  409. </para>
  410. </sect1>
  411. <!--
  412. <sect1 id="install.troubleshooting">
  413. <title>Troubleshooting</title>
  414. <para>
  415. </para>
  416. </sect1>
  417. -->
  418. </chapter>
  419. <chapter id="bind10">
  420. <title>Starting BIND10 with bind10</title>
  421. <para>
  422. BIND 10 provides the <command>bind10</command> command which
  423. starts up the required daemons to provide the message
  424. communication bus, configurations, <!-- TODO: security, -->
  425. and the DNS server(s).
  426. Also known as BoB or the Boss of BIND, <command>bind10</command>
  427. will also restart processes that exit.
  428. </para>
  429. <para>
  430. After starting the <command>msgq</command> communications channel,
  431. <command>bind10</command> connects to it,
  432. runs the configuration manager, and reads its own configuration.
  433. Then it starts the other modules.
  434. </para>
  435. <para>
  436. The <command>msgq</command> and <command>b10-cfgmgr</command>
  437. services make up the core. The <command>msgq</command> daemon
  438. provides the communication channel between every part of the system.
  439. The <command>b10-cfgmgr</command> daemon is always needed by every
  440. module, if only to send information about themselves somewhere,
  441. but more importantly to ask about their own settings, and
  442. about other modules.
  443. The <command>bind10</command> master process will also startup
  444. <command>b10-cmdctl</command> for admins to communicate with the
  445. system, <command>b10-auth</command> for Authoritative DNS service,
  446. and <command>b10-xfrin</command> for inbound DNS zone transfers.
  447. (These are covered in upcoming chapters.)
  448. </para>
  449. <sect1 id="start">
  450. <title>Starting BIND 10</title>
  451. <para>
  452. To start the BIND 10 service, simply run <command>bind10</command>.
  453. Run it with the <command>--verbose</command> switch to
  454. get additional debugging or diagnostic output.
  455. </para>
  456. <!-- TODO: note it doesn't go into background -->
  457. </sect1>
  458. </chapter>
  459. <chapter id="msgq">
  460. <title>Command channel</title>
  461. <para>
  462. The BIND 10 components use the <command>msgq</command>
  463. message routing daemon to intercommunicate.
  464. This is called the <quote>Command Channel</quote>.
  465. The members of the channel subscribe to listen to certain
  466. messages and are programmed to handle received messages.
  467. Example messages include shutdown, get configurations, and set
  468. configurations.
  469. </para>
  470. <note><simpara>
  471. This Command Channel is not used for DNS message passing.
  472. </simpara></note>
  473. <para>
  474. Administrators do not communicate directly with the
  475. <command>msgq</command> daemon. The only configuration is
  476. to choose the port number it listens on.
  477. By default, BIND 10 uses port 9912 for the
  478. <command>msgq</command> service.
  479. It listens on 127.0.0.1.
  480. </para>
  481. <!-- TODO: upcoming plans:
  482. Unix domain sockets
  483. -->
  484. </chapter>
  485. <chapter id="cfgmgr">
  486. <title>Configuration manager</title>
  487. <para>
  488. The configuration manager, <command>b10-cfgmgr</command>,
  489. handles all BIND 10 system configuration. It provides
  490. persistent storage for configuration, and notifies running
  491. modules of configuration changes.</para>
  492. <para>
  493. The <command>b10-auth</command> and <command>b10-xfrin</command>
  494. daemons and other components receive their configurations
  495. from the configuration manager over the <command>msgq</command>
  496. command channel.
  497. </para>
  498. <para>The administrator doesn't connect to it directly, but
  499. uses a user interface to communicate with the configuration
  500. manager via <command>b10-cmdctl</command>'s REST-ful interface.
  501. <command>b10-cmdctl</command> is covered in <xref linkend="cmdctl"/>.
  502. </para>
  503. <!-- TODO -->
  504. <note><para>
  505. The Y1 prototype release only provides the
  506. <command>bindctl</command> as a user interface to
  507. <command>b10-cmdctl</command>.
  508. Upcoming releases will provide another interactive command-line
  509. interface and a web-based interface.
  510. </para></note>
  511. <para>
  512. The <command>b10-cfgmgr</command> daemon can send all
  513. specifications and all current settings to the
  514. <command>bindctl</command> client (via
  515. <command>b10-cmdctl</command>).
  516. </para>
  517. <para>
  518. <command>b10-cfgmgr</command> relays configurations received
  519. from <command>b10-cmdctl</command> to the appropriate modules.
  520. </para>
  521. <!-- TODO:
  522. Configuration settings for itself are defined as ConfigManager.
  523. TODO: show examples
  524. -->
  525. <!-- TODO:
  526. config changes are actually commands to cfgmgr
  527. -->
  528. <!-- TODO: what about run time config to change this? -->
  529. <!-- jelte: > config set cfgmgr/config_database <file> -->
  530. <!-- TODO: what about command line switch to change this? -->
  531. <para>
  532. The stored configuration file is at
  533. <filename>/usr/local/var/bind10/b10-config.db</filename>.
  534. (The full path is what was defined at build configure time for
  535. --localstatedir. The default is <filename>/usr/local/var/</filename>.)
  536. The format is loosely based on JSON and is directly parseable
  537. python, but this may change in a future version.
  538. This configuration data file is not manually edited by the
  539. administrator.
  540. </para>
  541. <!--
  542. Well the specfiles have a more fixed format (they must contain specific
  543. stuff), but those are also directly parseable python structures (and
  544. 'coincidentally', our data::element string representation is the same)
  545. loosely based on json, tweaked to be directly parseable in python, but a
  546. subset of that.
  547. wiki page is http://bind10.isc.org/wiki/DataElementDesign
  548. nope, spec files are written by module developers, and db should be done
  549. through bindctl and friends
  550. -->
  551. <para>
  552. The configuration manager does not have any command line arguments.
  553. Normally it is not started manually, but is automatically
  554. started using the <command>bind10</command> master process
  555. (as covered in <xref linkend="bind10"/>).
  556. </para>
  557. <!-- TODO: upcoming plans:
  558. configuration for configuration manager itself. And perhaps we might
  559. change the messaging protocol, but an admin should never see any of that
  560. -->
  561. <!-- TODO: show examples, test this -->
  562. <!--
  563. , so an admin can simply run bindctl,
  564. do config show, and it shows all modules; config show >module> shows all
  565. options for that module
  566. -->
  567. </chapter>
  568. <chapter id="cmdctl">
  569. <title>Remote control daemon</title>
  570. <para>
  571. <command>b10-cmdctl</command> is the gateway between
  572. administrators and the BIND 10 system.
  573. It is a HTTPS server that uses standard HTTP Digest
  574. Authentication for username and password validation.
  575. It provides a REST-ful interface for accessing and controlling
  576. BIND 10.
  577. </para>
  578. <!-- TODO: copy examples from wiki, try with wget -->
  579. <para>
  580. When <command>b10-cmdctl</command> starts, it firsts
  581. asks <command>b10-cfgmgr</command> about what modules are
  582. running and what their configuration is (over the
  583. <command>msgq</command> channel). Then it will start listening
  584. on HTTPS for clients &mdash; the user interface &mdash; such
  585. as <command>bindctl</command>.
  586. </para>
  587. <para>
  588. <command>b10-cmdctl</command> directly sends commands
  589. (received from the user interface) to the specified component.
  590. Configuration changes are actually commands to
  591. <command>b10-cfgmgr</command> so are sent there.
  592. </para>
  593. <!--
  594. TODO:
  595. "For bindctl to list a module's available configurations and
  596. available commands, it communicates over the cmdctl REST interface.
  597. cmdctl then asks cfgmgr over the msgq command channel. Then cfgmgr
  598. asks the module for its specification and also cfgmgr looks in its
  599. own configuration database for current values."
  600. (05:32:03) jelte: i think cmdctl doesn't request it upon a incoming
  601. GET, but rather requests it once and then listens in for updates,
  602. but you might wanna check with likun
  603. -->
  604. <!-- TODO: replace /usr/local -->
  605. <!-- TODO: permissions -->
  606. <para>The HTTPS server requires a private key,
  607. such as a RSA PRIVATE KEY.
  608. The default location is at
  609. <filename>/usr/local/etc/bind10/cmdctl-keyfile.pem</filename>.
  610. (A sample key is at
  611. <filename>/usr/local/share/bind10/cmdctl-keyfile.pem</filename>.)
  612. It also uses a certificate located at
  613. <filename>/usr/local/etc/bind10/cmdctl-certfile.pem</filename>.
  614. (A sample certificate is at
  615. <filename>/usr/local/share/bind10/cmdctl-certfile.pem</filename>.)
  616. This may be a self-signed certificate or purchased from a
  617. certification authority.
  618. </para>
  619. <note><para>
  620. The HTTPS server doesn't support a certificate request from a
  621. client (at this time).
  622. <!-- TODO: maybe allow request from server side -->
  623. The <command>b10-cmdctl</command> daemon does not provide a
  624. public service. If any client wants to control BIND 10, then
  625. a certificate needs to be first recieved from the BIND 10
  626. administrator.
  627. The BIND 10 installation provides a sample PEM bundle that matches
  628. the sample key and certificate.
  629. </para></note>
  630. <!-- TODO: cross-ref -->
  631. <!-- TODO
  632. openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
  633. but that is a single file, maybethis should go back to that format?
  634. -->
  635. <!--
  636. <para>
  637. (08:20:56) shane: It is in theory possible to run without cmdctl.
  638. (08:21:02) shane: I think we discussed this.
  639. </para>
  640. -->
  641. <!-- TODO: Please check https://bind10.isc.org/wiki/cmd-ctrld -->
  642. <para>
  643. The <command>b10-cmdctl</command> daemon also requires
  644. the user account file located at
  645. <filename>/usr/local/etc/bind10/cmdctl-accounts.csv</filename>.
  646. This comma-delimited file lists the accounts with a user name,
  647. hashed password, and salt.
  648. (A sample file is at
  649. <filename>/usr/local/share/bind10/cmdctl-accounts.csv</filename>.
  650. It contains the user named <quote>root</quote> with the password
  651. <quote>bind10</quote>.)
  652. </para>
  653. <para>
  654. The administrator may create a user account with the
  655. <command>b10-cmdctl-usermgr</command> tool.
  656. </para>
  657. <!-- TODO: show example -->
  658. <!-- TODO: does cmdctl need to be restarted to change cert or key
  659. or accounts database -->
  660. <para>
  661. By default the HTTPS server listens on the localhost port 8080.
  662. The port can be set by using the --port command line option.
  663. The address to listen on can be set using the --address command
  664. line argument.
  665. Each HTTPS connection is stateless and timesout in 1200 seconds
  666. by default. This can be
  667. redefined by using the --idle-timeout command line argument.
  668. </para>
  669. <sect1 id="cmdctl.spec">
  670. <title>Configuration specification for b10-cmdctl</title>
  671. <para>
  672. The configuration items for <command>b10-cmdctl</command> are:
  673. key_file
  674. cert_file
  675. accounts_file
  676. </para>
  677. <!-- TODO -->
  678. <para>
  679. The control commands are:
  680. print_settings
  681. shutdown
  682. print_message
  683. </para>
  684. <!-- TODO -->
  685. </sect1>
  686. <!--
  687. TODO
  688. (12:21:30) jinmei: I'd like to have sample session using a command line www client such as wget
  689. (12:21:33) jinmei: btw
  690. -->
  691. </chapter>
  692. <chapter id="bindctl">
  693. <title>Control and configure user interface</title>
  694. <note><para>
  695. For the Y1 prototype release, <command>bindctl</command>
  696. is the only user interface. It is expected that upcoming
  697. releases will provide another interactive command-line
  698. interface and a web-based interface for controlling and
  699. configuring BIND 10.
  700. </para></note>
  701. <para>
  702. The <command>bindctl</command> tool provides an interactive
  703. prompt for configuring, controlling, and querying the BIND 10
  704. components.
  705. It communicates directly with a RESTful interface over HTTPS
  706. provided by <command>b10-cmdctl</command>. It doesn't
  707. communicate to any other components directly.
  708. </para>
  709. <!-- TODO: explain and show interface -->
  710. <para>
  711. Configuration changes are actually commands to
  712. <command>b10-cfgmgr</command>. So when <command>bindctl</command>
  713. sends a configuration, it is sent to <command>b10-cmdctl</command>
  714. (over a HTTPS connection); then <command>b10-cmdctl</command>
  715. sends the command (over a <command>msgq</command> command
  716. channel) to <command>b10-cfgmgr</command> which then stores
  717. the details and relays (over a <command>msgq</command> command
  718. channel) the configuration on to the specified module.
  719. </para>
  720. <para>
  721. </para>
  722. </chapter>
  723. <chapter id="authserver">
  724. <title>Authoritative Server</title>
  725. <para>
  726. </para>
  727. <sect1>
  728. <title>Server Configurations</title>
  729. <para>
  730. </para>
  731. </sect1>
  732. <sect1>
  733. <title>Data Source Backends</title>
  734. <para>
  735. </para>
  736. </sect1>
  737. <sect1>
  738. <title>Loading Master Zones Files</title>
  739. <para>
  740. <!-- TODO
  741. loadzone
  742. What happens in the database? replaces existing? What if a.foo
  743. existed but new zone file didn't have a.foo, would previous a.foo
  744. in database be removed?
  745. if you replace the zone foo.com, all records from the prior foo.com disappear and a whole new set appears
  746. -->
  747. <!--TODO: permissions for xfrin or loadzone to create the file -->
  748. </para>
  749. </sect1>
  750. <sect1>
  751. <title>Troubleshooting</title>
  752. <para>
  753. </para>
  754. </sect1>
  755. </chapter>
  756. <!-- TODO: how to help: run unit tests, join lists, review trac tickets -->
  757. <!-- <index> <title>Index</title> </index> -->
  758. </book>
  759. <!--
  760. TODO:
  761. Overview
  762. Getting BIND 10 Installed
  763. Basics
  764. Dependencies
  765. Optional
  766. Advanced
  767. How Does Everything Work Together?
  768. Need Help?
  769. -->