           (assoc :client-auth :need)
           (assoc :max-threads (jetty7-minimum-threads (:max-threads merged-jetty)))))))
 
-(def database-config-in
-  "Schema for incoming database config (user defined)"
-  {(s/optional-key :log-slow-statements) (pls/defaulted-maybe s/Int 10)
-   (s/optional-key :conn-max-age) (pls/defaulted-maybe s/Int 60)
-   (s/optional-key :conn-keep-alive) (pls/defaulted-maybe s/Int 45)
-   (s/optional-key :conn-lifetime) (s/maybe s/Int)
-   (s/optional-key :classname) (s/maybe s/String)
-   (s/optional-key :subprotocol) (s/maybe s/String)
-   (s/optional-key :subname) (s/maybe s/String)
-   (s/optional-key :username) s/String
-   (s/optional-key :password) s/String
-   (s/optional-key :syntax_pgs) s/String})
-
-(def write-database-config-in
-  "Includes the common database config params, also the write-db specific ones"
-  (merge database-config-in
-         {(s/optional-key :gc-interval) (pls/defaulted-maybe s/Int 60)
-          (s/optional-key :report-ttl) (pls/defaulted-maybe s/String "14d")
-          (s/optional-key :node-purge-ttl) (pls/defaulted-maybe s/String "0s")
-          (s/optional-key :node-ttl) (s/maybe s/String)
-          (s/optional-key :node-ttl-days) (s/maybe s/Int)}))
-
-(def database-config-out
-  "Schema for parsed/processed database config"
-  {:classname s/String
-   :subprotocol s/String
-   :subname s/String
-   :log-slow-statements pls/Days
-   :conn-max-age pls/Minutes
-   :conn-keep-alive pls/Minutes
-   (s/optional-key :conn-lifetime) (s/maybe pls/Minutes)
-   (s/optional-key :read-only?) pls/SchemaBoolean
-   (s/optional-key :username) s/String
-   (s/optional-key :password) s/String
-   (s/optional-key :syntax_pgs) s/String})
-
-(def write-database-config-out
-  "Schema for parsed/processed database config that includes write database params"
-  (merge database-config-out
-         {:gc-interval pls/Minutes
-          :report-ttl pls/Period
-          :node-purge-ttl pls/Period
-          :node-ttl (s/either pls/Period pls/Days)}))
-
-(def command-processing-in
-  "Schema for incoming command processing config (user defined) - currently incomplete"
-  {(s/optional-key :dlo-compression-threshold) (pls/defaulted-maybe s/String "1d")
-   (s/optional-key :threads) (pls/defaulted-maybe s/Int half-the-cores)
-   (s/optional-key :store-usage) (s/maybe s/Int)
-   (s/optional-key :temp-usage) (s/maybe s/Int)})
-
-(def command-processing-out
-  "Schema for parsed/processed command processing config - currently incomplete"
-  {:dlo-compression-threshold pls/Period
-   :threads s/Int
-   (s/optional-key :store-usage) (s/maybe s/Int)
-   (s/optional-key :temp-usage) (s/maybe s/Int)})
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Database config 
 
 (defn maybe-days
   "Convert the non-nil integer ot days"

      (/ 2)
      (int)
      (max 1)))

(defn configure-commandproc-threads
  "Update the supplied config map with the number of

(ns com.puppetlabs.puppetdb.config
  "Centralized place for reading a user-defined config INI file, validating,
   defaulting and converting into a format that can startup a PuppetDB instance.

   The schemas in this file define what is expected to be present in the INI file
   and the format expected by the rest of the application."
  (:import [java.security KeyStore])
  (:require [clojure.tools.logging :as log]
            [puppetlabs.kitchensink.ssl :as ssl]
