   the input config will be returned."
   [config]
   (when-not config
-    (throw (IllegalArgumentException.
-            "Missing authorization service configuration.")))
+    (reject! "Missing authorization service configuration."))
   (when-not (map? config)
-    (throw (IllegalArgumentException.
-            "The authorization service configuration is not a map.")))
+    (reject! "The authorization service configuration is not a map."))
   (let [allow-header-cert-info (:allow-header-cert-info config)]
     (when (and (not (nil? allow-header-cert-info))
                (not (ks/boolean? allow-header-cert-info)))
-      (throw (IllegalArgumentException.
-              "allow-header-cert-info is not a boolean."))))
+      (reject! "allow-header-cert-info is not a boolean.")))
   (when-not (= 1 (:version config))
-    (throw (IllegalArgumentException.
-            (str "Unsupported or missing version in configuration file. "
-                 "Supported versions are: 1"))))
+    (reject! "Unsupported or missing version in configuration file. "
+             "Supported versions are: 1"))
   (when-not (vector? (:rules config))
-    (throw (IllegalArgumentException.
-            "The authorization service configuration rules is not a list.")))
+    (reject! "The authorization service configuration rules is not a list."))
   (doseq [rule (:rules config)]
     (validate-auth-config-rule! rule))
   (doseq [[name rules] (group-by :name (:rules config))]
     (when-not (= 1 (count rules))
-      (throw (IllegalArgumentException.
-              (str "Duplicate rules named '" name "'. "
-                   "Rules must be uniquely named.")))))
+      (reject! "Duplicate rules named '" name "'. "
+               "Rules must be uniquely named.")))
   config)
 
 (schema/defn transform-config :- [rules/Rule]

                          (.matcher "")
                          .groupCount)
                      (catch PatternSyntaxException e
                        (throw (IllegalArgumentException.
                                (str "The path regex provided in the rule"
                                     " defined as " (pprint-rule rule)
                                     " is invalid: " (.getMessage e))))))
        get-br-list (fn [match-str]
                      (map #(Integer/parseInt (second %))
                           (re-seq #"\$(\d+)" match-str)))

    (doseq [[largest field] [[largest-allow-br "allow"]
                             [largest-deny-br "deny"]]
            :when (> largest group-count)]
      (reject! "The " field " field provided in the rule specified as "
               (pprint-rule rule) " contains the back reference '$"
               largest "' which refers to a capture group in "
               "the regex that doesn't exist."))))

(defn validate-auth-config-rule!
  "Tests to see if the given map contains the proper data to define an auth
