credential-rotation #1

Merged
jem merged 18 commits from credential-rotation into main 2024-12-27 09:25:09 +00:00
2 changed files with 9 additions and 4 deletions
Showing only changes of commit bd7ea0ccba - Show all commits

View file

@ -3,7 +3,8 @@
[orchestra.core :refer [defn-spec]]
[clojure.spec.alpha :as s]
[dda.backup.cred-rot.domain :as domain]
[dda.backup.infrastructure :as i]))
[dda.backup.infrastructure :as i]
[cheshire.core :as cc]))
(s/def ::new-password-file string?)
@ -19,9 +20,13 @@
(if (not (nil? new-password-file))
(i/execute! (domain/add-password-command config) config))))
(defn-spec list-passwords! nil?
(defn-spec list-passwords! map?
[config ::cred-rot]
(i/execute! (domain/list-passwords-command config) config))
(i/execute-out! (domain/list-passwords-command config) config))
(defn-spec parse-passwords! nil?
[config ::cred-rot]
(println (cc/parse-string (list-passwords! config))))
(defn-spec replace-old-password! nil?
[]

View file

@ -57,7 +57,7 @@
(defn-spec list-passwords-command ::cd/command
[config ::config]
[(base-command config ["key" "list" "--json"])])
(base-command config ["key" "list" "--json"]))
(defn-spec add-password-command ::cd/command
[config ::config]