Skip to content

Commit

Permalink
enable auth in migration params schema (#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
ereteog committed Jun 26, 2024
1 parent b4ac7ee commit 43ca304
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/ctia/task/migration/store.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
[conn :as conn]
[document :as ductile.doc]
[index :as ductile.index]
[query :as ductile.query]]
[query :as ductile.query]
[schemas :refer [AuthParams]]]
[ductile.schemas :refer [ESConn ESQuery Refresh]]
[schema-tools.core :as st]
[schema.core :as s]))
Expand All @@ -41,7 +42,8 @@
:aliased s/Bool
:default_operator (s/enum "OR" "AND")
:timeout s/Num
:version s/Num}))
:version s/Num
:auth AuthParams}))

(s/defschema MigrationParams
{:migration-id s/Str
Expand Down
7 changes: 5 additions & 2 deletions test/ctia/task/migration/migrate_es_stores_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,11 @@
(with-each-fixtures #(-> %
(assoc-in [:ctia :store :es :investigation :indexname]
investigation-indexname)
(assoc-in [:malware 0 :state :props :indexname]
malware-indexname))
(assoc-in [:malware 0 :state :props]
{:indexname malware-indexname
:auth {:type "basic"
:params {:user "basic"
:pwd "ductile"}}}))
app
(let [{:keys [get-in-config]} (helpers/get-service-map app :ConfigService)]
(let [v (get-in-config [:ctia :store :es :investigation :indexname])]
Expand Down

0 comments on commit 43ca304

Please sign in to comment.