@voxgig/sdkgen 4.20.0 → 4.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/helpers/applicability.js +11 -6
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/collectDeps.js +31 -6
- package/dist/helpers/collectDeps.js.map +1 -1
- package/dist/helpers/naming.js +2 -2
- package/dist/helpers/naming.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aon +49 -3
- package/package.json +1 -1
- package/project/.sdk/model/feature/secrets.aon +128 -0
- package/project/.sdk/model/feature/validate.aon +3 -2
- package/project/.sdk/model/target/c.aon +1 -1
- package/project/.sdk/model/target/clojure.aon +1 -1
- package/project/.sdk/model/target/cpp.aon +1 -1
- package/project/.sdk/model/target/csharp.aon +1 -1
- package/project/.sdk/model/target/elixir.aon +1 -1
- package/project/.sdk/model/target/go.aon +1 -1
- package/project/.sdk/model/target/java.aon +1 -1
- package/project/.sdk/model/target/kotlin.aon +1 -1
- package/project/.sdk/model/target/lua.aon +1 -1
- package/project/.sdk/model/target/ocaml.aon +1 -1
- package/project/.sdk/model/target/perl.aon +1 -1
- package/project/.sdk/model/target/php.aon +1 -1
- package/project/.sdk/model/target/py.aon +1 -1
- package/project/.sdk/model/target/rb.aon +1 -1
- package/project/.sdk/model/target/rust.aon +1 -1
- package/project/.sdk/model/target/scala.aon +1 -1
- package/project/.sdk/model/target/swift.aon +1 -1
- package/project/.sdk/model/target/zig.aon +1 -1
- package/project/.sdk/src/cmp/c/Main_c.ts +3 -0
- package/project/.sdk/src/cmp/c/Schema_c.ts +106 -0
- package/project/.sdk/src/cmp/clojure/Main_clojure.ts +2 -0
- package/project/.sdk/src/cmp/clojure/ReadmeExplanation_clojure.ts +1 -0
- package/project/.sdk/src/cmp/clojure/Schema_clojure.ts +73 -0
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +3 -0
- package/project/.sdk/src/cmp/cpp/Schema_cpp.ts +105 -0
- package/project/.sdk/src/cmp/csharp/Main_csharp.ts +3 -0
- package/project/.sdk/src/cmp/csharp/Schema_csharp.ts +85 -0
- package/project/.sdk/src/cmp/elixir/Main_elixir.ts +2 -0
- package/project/.sdk/src/cmp/elixir/ReadmeExplanation_elixir.ts +1 -0
- package/project/.sdk/src/cmp/elixir/Schema_elixir.ts +88 -0
- package/project/.sdk/src/cmp/go/Main_go.ts +2 -0
- package/project/.sdk/src/cmp/go/Schema_go.ts +93 -0
- package/project/.sdk/src/cmp/java/Main_java.ts +2 -0
- package/project/.sdk/src/cmp/java/Schema_java.ts +125 -0
- package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +2 -0
- package/project/.sdk/src/cmp/kotlin/Schema_kotlin.ts +111 -0
- package/project/.sdk/src/cmp/lua/Main_lua.ts +46 -9
- package/project/.sdk/src/cmp/lua/Package_lua.ts +1 -0
- package/project/.sdk/src/cmp/lua/ReadmeExplanation_lua.ts +1 -0
- package/project/.sdk/src/cmp/lua/Schema_lua.ts +72 -0
- package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +24 -1
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +34 -13
- package/project/.sdk/src/cmp/ocaml/ReadmeExplanation_ocaml.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Schema_ocaml.ts +99 -0
- package/project/.sdk/src/cmp/perl/Main_perl.ts +2 -0
- package/project/.sdk/src/cmp/perl/ReadmeExplanation_perl.ts +1 -0
- package/project/.sdk/src/cmp/perl/Schema_perl.ts +107 -0
- package/project/.sdk/src/cmp/php/Main_php.ts +2 -0
- package/project/.sdk/src/cmp/php/Package_php.ts +1 -1
- package/project/.sdk/src/cmp/php/ReadmeExplanation_php.ts +1 -0
- package/project/.sdk/src/cmp/php/Schema_php.ts +129 -0
- package/project/.sdk/src/cmp/py/Main_py.ts +2 -0
- package/project/.sdk/src/cmp/py/ReadmeExplanation_py.ts +1 -0
- package/project/.sdk/src/cmp/py/Schema_py.ts +72 -0
- package/project/.sdk/src/cmp/rb/Main_rb.ts +2 -0
- package/project/.sdk/src/cmp/rb/ReadmeExplanation_rb.ts +1 -0
- package/project/.sdk/src/cmp/rb/Schema_rb.ts +70 -0
- package/project/.sdk/src/cmp/rust/Main_rust.ts +3 -0
- package/project/.sdk/src/cmp/rust/Schema_rust.ts +107 -0
- package/project/.sdk/src/cmp/scala/Main_scala.ts +3 -0
- package/project/.sdk/src/cmp/scala/Schema_scala.ts +108 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +3 -0
- package/project/.sdk/src/cmp/swift/Schema_swift.ts +92 -0
- package/project/.sdk/src/cmp/zig/Main_zig.ts +3 -0
- package/project/.sdk/src/cmp/zig/Schema_zig.ts +114 -0
- package/project/.sdk/tm/c/core/context.c +3 -0
- package/project/.sdk/tm/c/core/sdk.h +14 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/config.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/config.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/env.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/env.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/export.c +3 -3
- package/project/.sdk/tm/c/feature/secrets/plugin/export.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/host.c +25 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/host.h +3 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/order.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/order.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/point.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/point.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/types.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/types.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/value.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/value.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/version.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/version.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/aws.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/azuresecrets.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/boru.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/clock.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/doppler.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/encode.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/gcpsecrets.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/hashicorp.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/httpjson.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/infisical.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/minivault.c +2072 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/onepassword.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/proc.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/secretspec.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/sekretoplugins.h +151 -10
- package/project/.sdk/tm/c/feature/secrets/plugins/sha256.c +16 -10
- package/project/.sdk/tm/c/feature/secrets/plugins/sigv4.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/support.h +12 -8
- package/project/.sdk/tm/c/feature/secrets/plugins/tls.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/internal.h +17 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/json.c +5 -5
- package/project/.sdk/tm/c/feature/secrets/sekreto/providers.c +37 -9
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.h +17 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/util.c +16 -2
- package/project/.sdk/tm/c/feature/validate.c +364 -0
- package/project/.sdk/tm/c/feature/validate.h +29 -0
- package/project/.sdk/tm/c/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/c/tests/vendor/omni/json.c +2 -2
- package/project/.sdk/tm/c/tests/vendor/omni/omni.h +2 -2
- package/project/.sdk/tm/c/tests/vendor/omni/runner.c +2 -2
- package/project/.sdk/tm/c/tests/vendor/omni/util.c +2 -2
- package/project/.sdk/tm/c/utility/make_options.c +12 -24
- package/project/.sdk/tm/c/utility/make_spec.c +8 -0
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/capability.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/catalog.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/config.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/depend.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/env.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/export.clj +3 -3
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/graph.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/host.clj +17 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/json.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/order.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/point.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/ref.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/resolve.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/types.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/version.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/addr.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/chain.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/core.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/json.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/aws.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/azuresecrets.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/boru.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/doppler.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/gcpsecrets.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/hashicorp.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/httpjson.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/infisical.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/minivault.clj +837 -0
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/onepassword.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/proc.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/secretspec.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/sigv4.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/provider.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/providers.clj +6 -4
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto.clj +2 -2
- package/project/.sdk/tm/clojure/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/sdk/core.clj +31 -41
- package/project/.sdk/tm/clojure/src/sdk/features.clj +202 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +2 -2
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +2 -2
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +2 -2
- package/project/.sdk/tm/cpp/core/types.hpp +4 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.cpp +3 -3
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.cpp +21 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.hpp +3 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.hpp +9 -7
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Minivault.cpp +1345 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Minivault.hpp +219 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.cpp +22 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.hpp +12 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.cpp +3 -3
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/validate.hpp +301 -0
- package/project/.sdk/tm/cpp/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +2 -2
- package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +2 -2
- package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +2 -2
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +24 -41
- package/project/.sdk/tm/csharp/feature/ValidateFeature.cs +343 -0
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Capability.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Catalog.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Config.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Definition.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Depend.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Entry.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Env.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Export.cs +3 -3
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Graph.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Host.cs +9 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Inst.cs +21 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Json.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Order.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Plugin.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Point.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Refs.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Resolve.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Types.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Version.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Aws.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/AzureSecrets.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Boru.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Child.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Doppler.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/GcpSecrets.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Hashicorp.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/HttpJson.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Infisical.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/MiniVault.cs +1572 -0
- package/project/.sdk/tm/csharp/feature/secrets/plugins/OnePassword.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/SecretSpec.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Sigv4.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/sekreto/Json.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/sekreto/Providers.cs +3 -2
- package/project/.sdk/tm/csharp/feature/secrets/sekreto/Sekreto.cs +2 -2
- package/project/.sdk/tm/csharp/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +2 -2
- package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +2 -2
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +12 -85
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +24 -3
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/capability.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/catalog.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/config.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/depend.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/env.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/error.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/export.ex +7 -4
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/graph.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/host.ex +13 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/inst.ex +15 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/json.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/order.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/point.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/ref.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/resolve.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/types.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/version.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/voxgig_plugin.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/json.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/aws.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/azuresecrets.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/boru.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/doppler.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/gcpsecrets.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/hashicorp.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/http.ex +3 -3
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/httpjson.ex +3 -3
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/infisical.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/minivault.ex +1033 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/onepassword.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/proc.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/secretspec.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/sigv4.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/provider.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/providers.ex +17 -5
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/sekreto.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/validate.ex +320 -0
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +10 -46
- package/project/.sdk/tm/elixir/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +2 -2
- package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +2 -2
- package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/config.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/env.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/export.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/host.go +25 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/order.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/point.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/types.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/util.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/version.go +1 -1
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/minivault/format.go +493 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/minivault/minivault.go +1131 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +14 -2
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +2 -2
- package/project/.sdk/tm/go/feature/validate_feature.go +346 -0
- package/project/.sdk/tm/go/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/omni/omni.go +2 -2
- package/project/.sdk/tm/go/test/omni/util.go +2 -2
- package/project/.sdk/tm/go/utility/make_options.go +13 -54
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +24 -8
- package/project/.sdk/tm/java/feature/ValidateFeature.java +330 -0
- package/project/.sdk/tm/java/feature/secrets/plugin/Capability.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Catalog.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Config.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Definition.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Depend.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Entry.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Env.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Export.java +3 -3
- package/project/.sdk/tm/java/feature/secrets/plugin/Graph.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Host.java +3 -3
- package/project/.sdk/tm/java/feature/secrets/plugin/Inst.java +21 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Json.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Order.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Plugin.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/PluginException.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Point.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Refs.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Resolve.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Types.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Version.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Addr.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Builtins.java +4 -3
- package/project/.sdk/tm/java/feature/secrets/sekreto/Json.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Provider.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Sekreto.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Support.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Aws.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Azuresecrets.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Boru.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Doppler.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Gcpsecrets.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Hashicorp.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Httpjson.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Infisical.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Minivault.java +1448 -0
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Onepassword.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Proc.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Secretspec.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Sigv4.java +2 -2
- package/project/.sdk/tm/java/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/java/test/vendor/omni/Json.java +2 -2
- package/project/.sdk/tm/java/test/vendor/omni/Runner.java +2 -2
- package/project/.sdk/tm/java/test/vendor/omni/Util.java +2 -2
- package/project/.sdk/tm/java/utility/MakeOptions.java +13 -45
- package/project/.sdk/tm/java/utility/struct/Struct.java +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/capability.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/catalog.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/config.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/depend.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/env.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/export.js +3 -3
- package/project/.sdk/tm/js/src/feature/secrets/plugin/graph.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/host.js +17 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/index.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/order.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/point.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/ref.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/resolve.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/types.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/plugin/version.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/Sekreto.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/index.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/aws.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/azuresecrets.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/boru.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/doppler.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/gcpsecrets.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/hashicorp.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/httpjson.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/infisical.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/minivault.js +866 -0
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/onepassword.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/secretspec.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/sigv4.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/addr.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/builtin.js +3 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/dotenv.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/env.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/file.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/memory.js +2 -2
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/support.js +2 -2
- package/project/.sdk/tm/js/src/utility/StructUtility.js +1 -1
- package/project/.sdk/tm/js/test/vendor/omni/index.js +1 -1
- package/project/.sdk/tm/js/test/vendor/omni/runner.js +1 -1
- package/project/.sdk/tm/js/test/vendor/omni/util.js +1 -1
- package/project/.sdk/tm/kotlin/feature/ValidateFeature.kt +297 -0
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Capability.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Catalog.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Config.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Depend.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Env.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Export.kt +3 -3
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Graph.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Host.kt +21 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Json.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Order.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Plugin.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Point.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Refs.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Resolve.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Types.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Version.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Json.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Provider.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Providers.kt +3 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Sekreto.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Spec.kt +14 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Support.kt +10 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Aws.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Azuresecrets.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Boru.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Doppler.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Gcpsecrets.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Hashicorp.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Httpjson.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Infisical.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Minivault.kt +1095 -0
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Onepassword.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Secretspec.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Sigv4.kt +2 -2
- package/project/.sdk/tm/kotlin/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +2 -2
- package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +2 -2
- package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +2 -2
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +13 -35
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -0
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +1 -1
- package/project/.sdk/tm/lua/feature/secrets/native/sekretonet.c +2 -2
- package/project/.sdk/tm/lua/feature/secrets/native/sekretovault.c +240 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/capability.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/catalog.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/config.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/depend.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/env.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/export.lua +12 -3
- package/project/.sdk/tm/lua/feature/secrets/plugin/graph.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/host.lua +18 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/json.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/order.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/point.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/ref.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/resolve.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/types.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/version.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/addr.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/err.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/name.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/aws.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/azuresecrets.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/boru.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/crypto.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/doppler.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/gcpsecrets.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/hashicorp.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/httpjson.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/infisical.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/json.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/minivault.lua +1227 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/net.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/onepassword.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/secretspec.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/sigv4.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/support.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/providers.lua +3 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto.lua +2 -2
- package/project/.sdk/tm/lua/feature/validate_feature.lua +333 -0
- package/project/.sdk/tm/lua/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/lua/test/vendor/omni/json.lua +2 -2
- package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +2 -2
- package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +2 -2
- package/project/.sdk/tm/lua/test/vendor/omni/util.lua +2 -2
- package/project/.sdk/tm/lua/utility/make_options.lua +74 -55
- package/project/.sdk/tm/lua/utility/make_spec.lua +8 -1
- package/project/.sdk/tm/lua/utility/struct/regex.lua +1 -1
- package/project/.sdk/tm/lua/utility/struct/struct.lua +1 -1
- package/project/.sdk/tm/ocaml/Makefile +12 -7
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/capability.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/catalog.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/config.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/defs.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/depend.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/env.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/export.ml +5 -3
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/graph.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/host.ml +18 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/order.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/point.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/ref.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/resolve.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/types.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/value.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/version.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/aws.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/azuresecrets.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/boru.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/crypto.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/doppler.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/gcpsecrets.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/hashicorp.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/http.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/httpjson.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/infisical.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/minivault.ml +1086 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/minivault_stubs.c +222 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/onepassword.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/runcmd.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/secretspec.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/sigv4.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls_stubs.c +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/json.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/provider.ml +33 -3
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/secret.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/sekreto.ml +4 -3
- package/project/.sdk/tm/ocaml/sdk_features.ml +174 -0
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +12 -37
- package/project/.sdk/tm/ocaml/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +2 -2
- package/project/.sdk/tm/perl/core/helpers.pm +64 -16
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Capability.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Catalog.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Config.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Depend.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Env.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Export.pm +3 -3
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Graph.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Host.pm +19 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Order.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Point.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Ref.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Resolve.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Types.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Version.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Aws.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Azuresecrets.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Boru.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Doppler.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Gcpsecrets.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Hashicorp.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Httpjson.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Infisical.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Minivault.pm +1380 -0
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Onepassword.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Proc.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Secretspec.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Sigv4.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto/Addr.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto/Providers.pm +4 -3
- package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto.pm +2 -2
- package/project/.sdk/tm/perl/feature/validate_feature.pm +319 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +1 -1
- package/project/.sdk/tm/perl/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +1 -1
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +1 -1
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +1 -1
- package/project/.sdk/tm/perl/utility/make_options.pm +25 -43
- package/project/.sdk/tm/php/feature/ValidateFeature.php +361 -0
- package/project/.sdk/tm/php/feature/secrets/plugin/Capability.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Catalog.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Config.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Depend.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Env.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Export.php +3 -3
- package/project/.sdk/tm/php/feature/secrets/plugin/Graph.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Host.php +26 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Order.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Point.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Ref.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Resolve.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Types.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Version.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/plugin.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/aws.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/azuresecrets.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/boru.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/doppler.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/gcpsecrets.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/hashicorp.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/httpjson.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/infisical.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/minivault.php +1250 -0
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/onepassword.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/runcmd.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/secretspec.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/sigv4.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/src/Addr.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/src/Providers.php +5 -3
- package/project/.sdk/tm/php/feature/secrets/sekreto/src/Sekreto.php +2 -2
- package/project/.sdk/tm/php/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/php/test/vendor/omni/Runner.php +2 -2
- package/project/.sdk/tm/php/test/vendor/omni/Util.php +2 -2
- package/project/.sdk/tm/php/utility/MakeOptions.php +15 -31
- package/project/.sdk/tm/php/utility/struct/Struct.php +56 -7
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +2 -2
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +17 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/minivault.py +1202 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +2 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/validate_feature.py +273 -0
- package/project/.sdk/tm/py/pkg/utility/make_options.py +14 -53
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +1 -1
- package/project/.sdk/tm/py/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +1 -1
- package/project/.sdk/tm/py/test/voxgig_omni/runner.py +1 -1
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +1 -1
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/capability.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/catalog.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/config.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/depend.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/env.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/export.rb +3 -3
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/graph.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/host.rb +16 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/order.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/point.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/ref.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/resolve.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/types.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/version.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/addr.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/aws.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/azuresecrets.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/boru.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/doppler.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/hashicorp.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/httpjson.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/infisical.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/minivault.rb +979 -0
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/onepassword.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/secretspec.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/sigv4.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/providers.rb +6 -5
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/sekreto.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto.rb +2 -2
- package/project/.sdk/tm/rb/feature/validate_feature.rb +265 -0
- package/project/.sdk/tm/rb/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +2 -2
- package/project/.sdk/tm/rb/test/vendor/omni/util.rb +2 -2
- package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +2 -2
- package/project/.sdk/tm/rb/utility/make_options.rb +15 -32
- package/project/.sdk/tm/rb/utility/struct/voxgig_struct.rb +24 -1
- package/project/.sdk/tm/rust/core/mod.rs +3 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/capability.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/catalog.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/config.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/depend.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/env.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/export.rs +3 -3
- package/project/.sdk/tm/rust/feature/secrets/plugin/graph.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/host.rs +24 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/mod.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/order.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/point.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/refs.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/resolve.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/types.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/value.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugin/version.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/aws/crypto.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/aws/sigv4.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/aws.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/azuresecrets.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/boru.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/doppler.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/gcpsecrets.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/hashicorp.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson/http.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson/json.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/infisical.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/minivault/format.rs +425 -0
- package/project/.sdk/tm/rust/feature/secrets/plugins/minivault.rs +1076 -0
- package/project/.sdk/tm/rust/feature/secrets/plugins/onepassword.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/plugins/secretspec.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/sekreto/addr.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/sekreto/mod.rs +2 -2
- package/project/.sdk/tm/rust/feature/secrets/sekreto/providers.rs +30 -4
- package/project/.sdk/tm/rust/feature/secrets/sekreto/sekreto.rs +2 -2
- package/project/.sdk/tm/rust/feature/validate.rs +387 -0
- package/project/.sdk/tm/rust/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +2 -2
- package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +2 -2
- package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +2 -2
- package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +2 -2
- package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +2 -2
- package/project/.sdk/tm/rust/utility/make_options.rs +12 -63
- package/project/.sdk/tm/rust/utility/make_spec.rs +10 -3
- package/project/.sdk/tm/scala/feature/ValidateFeature.scala +286 -0
- package/project/.sdk/tm/scala/feature/secrets/plugin/Capability.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Config.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Depend.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Env.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Export.scala +3 -3
- package/project/.sdk/tm/scala/feature/secrets/plugin/Graph.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Host.scala +19 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Json.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Order.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Plugin.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Point.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Refs.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Resolve.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Types.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Value.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Version.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Json.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Provider.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Providers.scala +3 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Sekreto.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Spec.scala +13 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Support.scala +11 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Aws.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Azuresecrets.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Boru.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Doppler.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Gcpsecrets.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Hashicorp.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Httpjson.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Infisical.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Minivault.scala +979 -0
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Onepassword.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Secretspec.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Sigv4.scala +2 -2
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +2 -2
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +2 -2
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +2 -2
- package/project/.sdk/tm/scala/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/scala/utility/Make.scala +12 -41
- package/project/.sdk/tm/scala/utility/MakeSpec.scala +8 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ValidateFeature.swift +273 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Capability.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Catalog.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Config.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Depend.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Env.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Export.swift +3 -3
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Graph.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Host.swift +17 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Json.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Order.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Point.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Refs.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Resolve.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Types.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Value.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Version.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Aws.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Azuresecrets.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Boru.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Crypto.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Doppler.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Gcpsecrets.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Hashicorp.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Httpjson.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Infisical.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Onepassword.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Proc.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Secretspec.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Sigv4.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Addr.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Json.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Provider.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Providers.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Sekreto.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Make.swift +9 -3
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +12 -87
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +3 -3
- package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +2 -2
- package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +2 -2
- package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +2 -2
- package/project/.sdk/tm/swift/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +13 -2
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +27 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/aws.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/azuresecrets.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/boru.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/doppler.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/gcpsecrets.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/hashicorp.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/infisical.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/minivault.ts +1034 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/onepassword.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/sigv4.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +2 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +11 -1
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +1 -1
- package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +1 -1
- package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +1 -1
- package/project/.sdk/tm/ts/test/vendor/omni/index.ts +1 -1
- package/project/.sdk/tm/zig/core/utility.zig +20 -44
- package/project/.sdk/tm/zig/feature/secrets/plugin/capability.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/catalog.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/config.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/depend.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/env.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/export.zig +3 -3
- package/project/.sdk/tm/zig/feature/secrets/plugin/graph.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/host.zig +18 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/inst.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/order.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/plugin.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/point.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/ref.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/resolve.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/types.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/value.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/version.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/aws.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/azuresecrets.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/boru.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/doppler.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/gcpsecrets.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/hashicorp.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/httpjson.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/infisical.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/minivault.zig +1930 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/onepassword.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/secretspec.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/sigv4.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/addr.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/builtins.zig +3 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/provider.zig +19 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/sekreto.zig +2 -2
- package/project/.sdk/tm/zig/feature/validate.zig +293 -0
- package/project/.sdk/tm/zig/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +2 -2
- package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +2 -2
- package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +2 -2
- package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +2 -2
- package/project/sdkgen-package.json +1 -1
- package/src/helpers/applicability.ts +11 -6
- package/src/helpers/collectDeps.ts +30 -5
- package/src/helpers/naming.ts +2 -2
|
@@ -0,0 +1,1076 @@
|
|
|
1
|
+
// VENDORED: @voxgig/sekreto sdk-20260917-1242-0 (rust/plugins/minivault/src/lib.rs)
|
|
2
|
+
// Source: https://github.com/voxgig/sekreto @ 108c4a914bee7b6534c30d1c68c25cd1b9377696 [tag: sdk-20260917-1242-0]
|
|
3
|
+
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
//! The mini vault: every secret a project owns, encrypted, in one file.
|
|
5
|
+
//!
|
|
6
|
+
//! A store this library owns outright rather than a client for a server
|
|
7
|
+
//! somebody else runs. It has a master key and restricted keys, and it is
|
|
8
|
+
//! the port's worked example of a definition publishing an API beside its
|
|
9
|
+
//! provider: a chain READS, and writing is a deliberate act with an
|
|
10
|
+
//! interface of its own.
|
|
11
|
+
//!
|
|
12
|
+
//! ```no_run
|
|
13
|
+
//! use crate::feature::secrets::sekreto::{Options, ProviderSpec, Sekreto};
|
|
14
|
+
//! use voxgig_sekreto_minivault::{createvault, minivault, vaultof, VaultOptions};
|
|
15
|
+
//!
|
|
16
|
+
//! let vault = createvault(&VaultOptions {
|
|
17
|
+
//! file: "app.skmv".to_string(),
|
|
18
|
+
//! passphrase: "master".to_string(),
|
|
19
|
+
//! ..Default::default()
|
|
20
|
+
//! })
|
|
21
|
+
//! .unwrap();
|
|
22
|
+
//! vault.set("api.token", "tok01").unwrap();
|
|
23
|
+
//!
|
|
24
|
+
//! let mut secrets = Sekreto::new(Options {
|
|
25
|
+
//! plugins: vec![minivault()],
|
|
26
|
+
//! providers: vec![ProviderSpec {
|
|
27
|
+
//! kind: "minivault".to_string(),
|
|
28
|
+
//! file: "app.skmv".to_string(),
|
|
29
|
+
//! passphrase: "master".to_string(),
|
|
30
|
+
//! ..Default::default()
|
|
31
|
+
//! }],
|
|
32
|
+
//! ..Default::default()
|
|
33
|
+
//! })
|
|
34
|
+
//! .unwrap();
|
|
35
|
+
//!
|
|
36
|
+
//! let _ = secrets.get("api.token").unwrap(); // the chain reads
|
|
37
|
+
//! let _ = vaultof(&secrets, "").unwrap().list().unwrap(); // the API writes
|
|
38
|
+
//! ```
|
|
39
|
+
//!
|
|
40
|
+
//! A port of typescript/plugins/minivault.ts, which is canonical.
|
|
41
|
+
|
|
42
|
+
mod format;
|
|
43
|
+
|
|
44
|
+
use std::cell::RefCell;
|
|
45
|
+
use std::collections::BTreeMap;
|
|
46
|
+
use std::collections::HashMap;
|
|
47
|
+
use std::fs;
|
|
48
|
+
use std::io::Write;
|
|
49
|
+
use std::path::PathBuf;
|
|
50
|
+
use std::rc::Rc;
|
|
51
|
+
use std::sync::{Arc, Mutex, OnceLock};
|
|
52
|
+
|
|
53
|
+
use crate::feature::secrets::plugin::catalog::Definition;
|
|
54
|
+
use crate::feature::secrets::plugin::host::Inst;
|
|
55
|
+
use crate::feature::secrets::plugin::types::{details, PluginError};
|
|
56
|
+
use crate::feature::secrets::plugin::value::Value;
|
|
57
|
+
|
|
58
|
+
use crate::feature::secrets::sekreto::{
|
|
59
|
+
checkname, specof, Answer, Provider, Sekreto, ERROR_CODE, PROVIDER_EXPORT,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
use self::format::{
|
|
63
|
+
checkid, entryid, fail, kek, mac, random, readfile, seal, secretkey, unseal, writefile,
|
|
64
|
+
EntryRecord, KeyRecord, Sealed, VaultFile, AAD_META, AAD_NAME, AAD_RING, AAD_SECRET, KEYLEN,
|
|
65
|
+
LABEL_META, LABEL_NAMES, SALTLEN,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
pub use self::format::{ITERATIONS, MASTERKEY};
|
|
69
|
+
|
|
70
|
+
/// The export key the vault API is published under, beside the provider.
|
|
71
|
+
pub const VAULT_EXPORT: &str = "vault";
|
|
72
|
+
|
|
73
|
+
// --- the lock every handle on one file shares -------------------------
|
|
74
|
+
|
|
75
|
+
/// Each `Vault` is its own object, so two handles on one path did not
|
|
76
|
+
/// coordinate: both could finish `load` before either saved, and the
|
|
77
|
+
/// second rename then discarded the first one's change while reporting
|
|
78
|
+
/// success. Keyed by the ABSOLUTE path, so two handles spelled
|
|
79
|
+
/// differently still meet.
|
|
80
|
+
///
|
|
81
|
+
/// A guarantee WITHIN one process, which is what DOCS.md promises and what
|
|
82
|
+
/// the go port arranges the same way. Two processes still race, and the
|
|
83
|
+
/// format's answer to that is the exclusive create and the atomic rename:
|
|
84
|
+
/// a reader sees one whole vault or the other, never half of one.
|
|
85
|
+
///
|
|
86
|
+
/// `std::sync`, although a `Vault` is `Rc` and never crosses a thread:
|
|
87
|
+
/// what races is the FILE, and two threads each opening their own handle
|
|
88
|
+
/// on one path is exactly the case this exists for.
|
|
89
|
+
static LOCKS: OnceLock<Mutex<HashMap<PathBuf, Arc<Mutex<()>>>>> = OnceLock::new();
|
|
90
|
+
|
|
91
|
+
fn lockfor(file: &str) -> Arc<Mutex<()>> {
|
|
92
|
+
let key = fs::canonicalize(file).unwrap_or_else(|_| PathBuf::from(file));
|
|
93
|
+
|
|
94
|
+
let table = LOCKS.get_or_init(|| Mutex::new(HashMap::new()));
|
|
95
|
+
let mut held = table.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
|
|
96
|
+
|
|
97
|
+
held.entry(key).or_insert_with(|| Arc::new(Mutex::new(()))).clone()
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// --- base64 ----------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
/// Here rather than in the HTTP plugin: a vault opens no socket, and
|
|
103
|
+
/// reaching that crate for two functions would link a TLS stack into a
|
|
104
|
+
/// program whose only store is a local file.
|
|
105
|
+
const B64: &[u8; 64] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
106
|
+
|
|
107
|
+
fn b64(raw: &[u8]) -> String {
|
|
108
|
+
let mut out = String::new();
|
|
109
|
+
|
|
110
|
+
for chunk in raw.chunks(3) {
|
|
111
|
+
let a = chunk[0] as u32;
|
|
112
|
+
let b = if 1 < chunk.len() { chunk[1] as u32 } else { 0 };
|
|
113
|
+
let c = if 2 < chunk.len() { chunk[2] as u32 } else { 0 };
|
|
114
|
+
let triple = (a << 16) | (b << 8) | c;
|
|
115
|
+
|
|
116
|
+
out.push(B64[(triple >> 18 & 63) as usize] as char);
|
|
117
|
+
out.push(B64[(triple >> 12 & 63) as usize] as char);
|
|
118
|
+
out.push(if 1 < chunk.len() {
|
|
119
|
+
B64[(triple >> 6 & 63) as usize] as char
|
|
120
|
+
} else {
|
|
121
|
+
'='
|
|
122
|
+
});
|
|
123
|
+
out.push(if 2 < chunk.len() {
|
|
124
|
+
B64[(triple & 63) as usize] as char
|
|
125
|
+
} else {
|
|
126
|
+
'='
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
out
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/// STRICT. A lenient decoder hands back plausible bytes for a corrupted
|
|
134
|
+
/// payload, and those bytes are then used AS A KEY.
|
|
135
|
+
fn unb64(text: &str, what: &str) -> Answer<Vec<u8>> {
|
|
136
|
+
let missing = || fail::<Vec<u8>>(&format!("missing {}", what));
|
|
137
|
+
|
|
138
|
+
let chars: Vec<u8> = text.bytes().filter(|byte| !byte.is_ascii_whitespace()).collect();
|
|
139
|
+
if chars.is_empty() || 0 != chars.len() % 4 {
|
|
140
|
+
return missing();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let body: Vec<u8> = chars.iter().copied().take_while(|byte| b'=' != *byte).collect();
|
|
144
|
+
let pad = &chars[body.len()..];
|
|
145
|
+
if 2 < pad.len() || !pad.iter().all(|byte| b'=' == *byte) {
|
|
146
|
+
return missing();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let mut out = Vec::new();
|
|
150
|
+
let (mut held, mut bits) = (0u32, 0u32);
|
|
151
|
+
|
|
152
|
+
for byte in body {
|
|
153
|
+
let value = match B64.iter().position(|one| *one == byte) {
|
|
154
|
+
Some(at) => at as u32,
|
|
155
|
+
None => return missing(),
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
held = (held << 6) | value;
|
|
159
|
+
bits += 6;
|
|
160
|
+
if 8 <= bits {
|
|
161
|
+
bits -= 8;
|
|
162
|
+
out.push((held >> bits & 0xff) as u8);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
Ok(out)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// --- the rings -------------------------------------------------------
|
|
170
|
+
|
|
171
|
+
/// A MASTER's ring holds the root and no grants; a RESTRICTED key's holds
|
|
172
|
+
/// grants and no root, EVEN WHEN IT WAS GRANTED NOTHING. That asymmetry is
|
|
173
|
+
/// the format rather than a saving: a ring with a root reaches every name
|
|
174
|
+
/// there will ever be, so a grant list beside it would be a second answer
|
|
175
|
+
/// to the same question - and an empty grant map is still a grant map, as
|
|
176
|
+
/// the go port learned by writing twelve bytes fewer than everyone else.
|
|
177
|
+
fn masterring(root: &[u8]) -> String {
|
|
178
|
+
let mut out = Value::map();
|
|
179
|
+
out.set("v", Value::Num(format::FORMAT as f64));
|
|
180
|
+
out.set("write", Value::Bool(true));
|
|
181
|
+
out.set("root", Value::str(&b64(root)));
|
|
182
|
+
out.json()
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
fn grantring(write: bool, grants: &BTreeMap<String, Vec<u8>>) -> String {
|
|
186
|
+
let mut held = Value::map();
|
|
187
|
+
for (name, key) in grants {
|
|
188
|
+
held.set(name, Value::str(&b64(key)));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
let mut out = Value::map();
|
|
192
|
+
out.set("v", Value::Num(format::FORMAT as f64));
|
|
193
|
+
out.set("write", Value::Bool(write));
|
|
194
|
+
out.set("grants", held);
|
|
195
|
+
out.json()
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
fn metaof(master: bool, write: bool, names: &[String]) -> String {
|
|
199
|
+
let mut out = Value::map();
|
|
200
|
+
out.set("v", Value::Num(format::FORMAT as f64));
|
|
201
|
+
out.set("master", Value::Bool(master));
|
|
202
|
+
out.set("write", Value::Bool(write));
|
|
203
|
+
out.set(
|
|
204
|
+
"grants",
|
|
205
|
+
Value::List(names.iter().map(|name| Value::str(name)).collect()),
|
|
206
|
+
);
|
|
207
|
+
out.json()
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
fn jsonof(plain: &[u8], what: &str) -> Answer<Value> {
|
|
211
|
+
let text = String::from_utf8_lossy(plain);
|
|
212
|
+
match voxgig_plugin::value::parse(&text) {
|
|
213
|
+
Ok(held) if held.as_map().is_some() => Ok(held),
|
|
214
|
+
_ => fail(&format!("unreadable {}", what)),
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
fn jsontrue(held: &Value, key: &str) -> bool {
|
|
219
|
+
matches!(held.get(key), Value::Bool(true))
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// --- the vault -------------------------------------------------------
|
|
223
|
+
|
|
224
|
+
/// What a key may do. `grants` is empty for a master key, which reads and
|
|
225
|
+
/// writes every name there is.
|
|
226
|
+
///
|
|
227
|
+
/// FIELDS THE CALLER CANNOT WRITE THROUGH, so the defect the review round
|
|
228
|
+
/// found in the canonical - a caller flipping its own `write` bit on the
|
|
229
|
+
/// record it was handed - cannot be written at all. A clone makes a new
|
|
230
|
+
/// value and changes nothing the vault reads.
|
|
231
|
+
#[derive(Clone, Debug, Default, PartialEq)]
|
|
232
|
+
pub struct VaultKeyInfo {
|
|
233
|
+
pub key: String,
|
|
234
|
+
pub master: bool,
|
|
235
|
+
pub write: bool,
|
|
236
|
+
pub grants: Vec<String>,
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/// How a vault file is opened as one key.
|
|
240
|
+
#[derive(Clone, Debug, Default)]
|
|
241
|
+
pub struct VaultOptions {
|
|
242
|
+
/// The vault file.
|
|
243
|
+
pub file: String,
|
|
244
|
+
/// Which key to open with. Empty means `master`.
|
|
245
|
+
pub key: String,
|
|
246
|
+
/// What unwraps that key.
|
|
247
|
+
pub passphrase: String,
|
|
248
|
+
/// The PBKDF2 round count used when this handle CREATES a key.
|
|
249
|
+
/// Reading uses what the file records for the key being opened.
|
|
250
|
+
pub iterations: u32,
|
|
251
|
+
/// Make the file, with this key as its master, if it is not there.
|
|
252
|
+
///
|
|
253
|
+
/// Off by default. A missing vault is far more often a broken
|
|
254
|
+
/// deployment than a new one, and a store that invents itself where a
|
|
255
|
+
/// real vault was meant to be answers every read with a miss.
|
|
256
|
+
pub create: bool,
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/// What mints a restricted key.
|
|
260
|
+
#[derive(Clone, Debug, Default)]
|
|
261
|
+
pub struct GrantSpec {
|
|
262
|
+
/// The id the new key answers to.
|
|
263
|
+
pub key: String,
|
|
264
|
+
/// What will unwrap it.
|
|
265
|
+
pub passphrase: String,
|
|
266
|
+
/// The names it may read.
|
|
267
|
+
pub names: Vec<String>,
|
|
268
|
+
/// Whether it may overwrite those names. It can never create one.
|
|
269
|
+
pub write: bool,
|
|
270
|
+
/// PBKDF2 rounds for this key; the vault's own when zero.
|
|
271
|
+
pub iterations: u32,
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/// What a handle remembers between calls: this key's ring, unwrapped.
|
|
275
|
+
struct Opened {
|
|
276
|
+
info: VaultKeyInfo,
|
|
277
|
+
root: Option<Vec<u8>>,
|
|
278
|
+
grants: BTreeMap<String, Vec<u8>>,
|
|
279
|
+
/// THE SEALED RING THIS WAS DERIVED FROM, kept so that every later
|
|
280
|
+
/// call can check the file still says the same thing. A handle that
|
|
281
|
+
/// cached its keys and never looked again kept reading a vault after
|
|
282
|
+
/// its key was revoked, which is the one thing `revoke` promises.
|
|
283
|
+
ring: Sealed,
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
struct Held {
|
|
287
|
+
file: String,
|
|
288
|
+
key: String,
|
|
289
|
+
passphrase: String,
|
|
290
|
+
iterations: u32,
|
|
291
|
+
create: bool,
|
|
292
|
+
opened: RefCell<Option<Opened>>,
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/// A handle on one vault file, opened as ONE key.
|
|
296
|
+
///
|
|
297
|
+
/// Every method answers as that key: `list` shows the names it may read,
|
|
298
|
+
/// `get` answers for those and misses on the rest, and the master-only
|
|
299
|
+
/// ones refuse for any other key. Nothing is read or derived until the
|
|
300
|
+
/// first call that needs the file, so putting a vault in a chain costs no
|
|
301
|
+
/// key derivation until a secret is actually wanted.
|
|
302
|
+
///
|
|
303
|
+
/// Cheap to clone: the handle is shared, not copied, so the definition can
|
|
304
|
+
/// export one and keep one.
|
|
305
|
+
#[derive(Clone)]
|
|
306
|
+
pub struct Vault {
|
|
307
|
+
held: Rc<Held>,
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
fn wantkey(value: &str) -> &str {
|
|
311
|
+
// AN EMPTY KEY IS NO KEY, so it means `master`. A CLI reaches this
|
|
312
|
+
// with SEKRETO_VAULT_KEY set and empty, which is what an unset shell
|
|
313
|
+
// variable expands to.
|
|
314
|
+
if value.is_empty() {
|
|
315
|
+
MASTERKEY
|
|
316
|
+
} else {
|
|
317
|
+
value
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/// Open a vault file as one key. Nothing is read until the first call
|
|
322
|
+
/// that needs the file.
|
|
323
|
+
pub fn openvault(options: &VaultOptions) -> Answer<Vault> {
|
|
324
|
+
if options.file.is_empty() {
|
|
325
|
+
return fail("a vault needs a file");
|
|
326
|
+
}
|
|
327
|
+
if options.passphrase.is_empty() {
|
|
328
|
+
return fail("a vault needs a passphrase");
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
let key = wantkey(&options.key);
|
|
332
|
+
checkid(key, "a vault needs a key id")?;
|
|
333
|
+
|
|
334
|
+
Ok(Vault {
|
|
335
|
+
held: Rc::new(Held {
|
|
336
|
+
file: options.file.clone(),
|
|
337
|
+
key: key.to_string(),
|
|
338
|
+
passphrase: options.passphrase.clone(),
|
|
339
|
+
iterations: if 0 < options.iterations {
|
|
340
|
+
options.iterations
|
|
341
|
+
} else {
|
|
342
|
+
ITERATIONS
|
|
343
|
+
},
|
|
344
|
+
create: options.create,
|
|
345
|
+
opened: RefCell::new(None),
|
|
346
|
+
}),
|
|
347
|
+
})
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/// Make a vault file and answer a handle on its master key.
|
|
351
|
+
///
|
|
352
|
+
/// Refuses a file that is already there: a vault is created once, and
|
|
353
|
+
/// overwriting one discards every secret in it.
|
|
354
|
+
pub fn createvault(options: &VaultOptions) -> Answer<Vault> {
|
|
355
|
+
if options.file.is_empty() {
|
|
356
|
+
return fail("a vault needs a file");
|
|
357
|
+
}
|
|
358
|
+
if options.passphrase.is_empty() {
|
|
359
|
+
return fail("a vault needs a passphrase");
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
let key = wantkey(&options.key);
|
|
363
|
+
checkid(key, "a vault needs a key id")?;
|
|
364
|
+
|
|
365
|
+
let iterations = if 0 < options.iterations {
|
|
366
|
+
options.iterations
|
|
367
|
+
} else {
|
|
368
|
+
ITERATIONS
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
// No existence check first: the check and the write would be two
|
|
372
|
+
// steps, and `putnew` refuses an existing file in ONE.
|
|
373
|
+
putnew(&options.file, &newvault(key, &options.passphrase, iterations)?)?;
|
|
374
|
+
|
|
375
|
+
openvault(options)
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
fn newvault(key: &str, passphrase: &str, iterations: u32) -> Answer<VaultFile> {
|
|
379
|
+
let root = random(KEYLEN)?;
|
|
380
|
+
let record = sealkey(
|
|
381
|
+
&root,
|
|
382
|
+
key,
|
|
383
|
+
passphrase,
|
|
384
|
+
iterations,
|
|
385
|
+
&masterring(&root),
|
|
386
|
+
&metaof(true, true, &[]),
|
|
387
|
+
)?;
|
|
388
|
+
|
|
389
|
+
Ok(VaultFile {
|
|
390
|
+
keys: vec![record],
|
|
391
|
+
entries: vec![],
|
|
392
|
+
})
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
fn sealkey(
|
|
396
|
+
root: &[u8],
|
|
397
|
+
id: &str,
|
|
398
|
+
passphrase: &str,
|
|
399
|
+
iters: u32,
|
|
400
|
+
ring: &str,
|
|
401
|
+
noted: &str,
|
|
402
|
+
) -> Answer<KeyRecord> {
|
|
403
|
+
let salt = random(SALTLEN)?;
|
|
404
|
+
let wrapping = kek(passphrase, &salt, iters)?;
|
|
405
|
+
let metakey = mac(root, LABEL_META);
|
|
406
|
+
|
|
407
|
+
Ok(KeyRecord {
|
|
408
|
+
id: id.to_string(),
|
|
409
|
+
salt,
|
|
410
|
+
iters,
|
|
411
|
+
ring: seal(&wrapping, ring.as_bytes(), &format!("{}{}", AAD_RING, id))?,
|
|
412
|
+
meta: seal(&metakey, noted.as_bytes(), &format!("{}{}", AAD_META, id))?,
|
|
413
|
+
})
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// --- the file on disk -------------------------------------------------
|
|
417
|
+
|
|
418
|
+
/// Writes a vault file that is not there yet, and REFUSES one that is.
|
|
419
|
+
///
|
|
420
|
+
/// `create_new` is `O_EXCL`, and the mode goes on at creation rather than
|
|
421
|
+
/// after: a `set_permissions` once the bytes are written leaves the file
|
|
422
|
+
/// readable for as long as it takes to write them.
|
|
423
|
+
fn putnew(path: &str, made: &VaultFile) -> Answer<()> {
|
|
424
|
+
let mut open = fs::OpenOptions::new();
|
|
425
|
+
open.write(true).create_new(true);
|
|
426
|
+
owneronly(&mut open);
|
|
427
|
+
|
|
428
|
+
match open.open(path) {
|
|
429
|
+
Ok(mut handle) => match handle.write_all(&writefile(made)) {
|
|
430
|
+
Ok(()) => Ok(()),
|
|
431
|
+
Err(_) => fail(&format!("cannot write {}", path)),
|
|
432
|
+
},
|
|
433
|
+
Err(err) if std::io::ErrorKind::AlreadyExists == err.kind() => {
|
|
434
|
+
fail(&format!("vault file already exists: {}", path))
|
|
435
|
+
}
|
|
436
|
+
Err(_) => fail(&format!("cannot write {}", path)),
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
#[cfg(unix)]
|
|
441
|
+
fn owneronly(open: &mut fs::OpenOptions) {
|
|
442
|
+
use std::os::unix::fs::OpenOptionsExt;
|
|
443
|
+
open.mode(0o600);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
#[cfg(not(unix))]
|
|
447
|
+
fn owneronly(_open: &mut fs::OpenOptions) {
|
|
448
|
+
// No POSIX mode to ask for. The file lands with whatever the platform
|
|
449
|
+
// gives a new file, which is what every port can promise there.
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
fn readmaybe(path: &str) -> Answer<Option<Vec<u8>>> {
|
|
453
|
+
match fs::read(path) {
|
|
454
|
+
Ok(raw) => Ok(Some(raw)),
|
|
455
|
+
Err(err) if std::io::ErrorKind::NotFound == err.kind() => Ok(None),
|
|
456
|
+
Err(_) => fail(&format!("cannot read {}", path)),
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
impl Vault {
|
|
461
|
+
/// The file this handle reads.
|
|
462
|
+
pub fn file(&self) -> &str {
|
|
463
|
+
&self.held.file
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/// The key id this handle opens with.
|
|
467
|
+
pub fn key(&self) -> &str {
|
|
468
|
+
&self.held.key
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/// Forget the derived keys. The next call opens again.
|
|
472
|
+
pub fn close(&self) {
|
|
473
|
+
*self.held.opened.borrow_mut() = None;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/// Replaces the file rather than editing it in place. The rename is
|
|
477
|
+
/// what makes a concurrent reader see either the old file or the new
|
|
478
|
+
/// one, so a write interrupted halfway leaves a vault rather than
|
|
479
|
+
/// wreckage.
|
|
480
|
+
///
|
|
481
|
+
/// THE TEMPORARY IS RANDOM AND EXCLUSIVE. `<vault>.<pid>.tmp` is a
|
|
482
|
+
/// name anyone can predict, and an ordinary create FOLLOWS a symlink,
|
|
483
|
+
/// so anyone who could write the vault's directory could point that
|
|
484
|
+
/// name at another file and have the next save truncate it.
|
|
485
|
+
fn save(&self, made: &VaultFile) -> Answer<()> {
|
|
486
|
+
let suffix = random(8)?;
|
|
487
|
+
let temp = format!("{}.{}.tmp", self.held.file, hex(&suffix));
|
|
488
|
+
|
|
489
|
+
putnew(&temp, made)?;
|
|
490
|
+
|
|
491
|
+
match fs::rename(&temp, &self.held.file) {
|
|
492
|
+
Ok(()) => Ok(()),
|
|
493
|
+
Err(_) => {
|
|
494
|
+
// The vault is unchanged either way, and the write error
|
|
495
|
+
// is what the caller needs to be told about.
|
|
496
|
+
let _ = fs::remove_file(&temp);
|
|
497
|
+
fail(&format!("cannot write {}", self.held.file))
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
fn bytes(&self) -> Answer<Vec<u8>> {
|
|
503
|
+
match readmaybe(&self.held.file)? {
|
|
504
|
+
Some(raw) => Ok(raw),
|
|
505
|
+
None => {
|
|
506
|
+
// A vault is configured deliberately, with a key. Its
|
|
507
|
+
// absence is a broken deployment and never "no secrets
|
|
508
|
+
// here": answering a miss would send the chain on to a
|
|
509
|
+
// weaker store, which is the failure mode this library
|
|
510
|
+
// most has to avoid. `create` is the caller saying the
|
|
511
|
+
// opposite, in writing.
|
|
512
|
+
if !self.held.create {
|
|
513
|
+
return fail(&format!("no vault file: {}", self.held.file));
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
putnew(
|
|
517
|
+
&self.held.file,
|
|
518
|
+
&newvault(&self.held.key, &self.held.passphrase, self.held.iterations)?,
|
|
519
|
+
)?;
|
|
520
|
+
|
|
521
|
+
match readmaybe(&self.held.file)? {
|
|
522
|
+
Some(raw) => Ok(raw),
|
|
523
|
+
None => fail(&format!("cannot read {}", self.held.file)),
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/// The file as this key sees it: parsed every call - it is different
|
|
530
|
+
/// bytes every time - while the unwrapped ring is kept, because
|
|
531
|
+
/// stretching a passphrase once per lookup is the cost that caching
|
|
532
|
+
/// exists to avoid.
|
|
533
|
+
fn load(&self) -> Answer<VaultFile> {
|
|
534
|
+
let file = readfile(&self.bytes()?)?;
|
|
535
|
+
|
|
536
|
+
let record = match file.key(&self.held.key) {
|
|
537
|
+
Some(held) => held.clone(),
|
|
538
|
+
None => {
|
|
539
|
+
// REVOKED, or never there. Either way this handle is
|
|
540
|
+
// finished, and dropping what it derived is what stops the
|
|
541
|
+
// next call answering from memory.
|
|
542
|
+
self.close();
|
|
543
|
+
return fail(&format!("no such key: {}", self.held.key));
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
// The file still holds this key, and holds the SAME ring: a key
|
|
548
|
+
// revoked and re-granted under another passphrase is a different
|
|
549
|
+
// key wearing the id, and re-deriving is what refuses it.
|
|
550
|
+
let fresh = match &*self.held.opened.borrow() {
|
|
551
|
+
Some(held) => held.ring != record.ring,
|
|
552
|
+
None => true,
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
if fresh {
|
|
556
|
+
self.close();
|
|
557
|
+
let made = self.derive(&record)?;
|
|
558
|
+
*self.held.opened.borrow_mut() = Some(made);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
Ok(file)
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
fn derive(&self, record: &KeyRecord) -> Answer<Opened> {
|
|
565
|
+
let wrapping = kek(&self.held.passphrase, &record.salt, record.iters)?;
|
|
566
|
+
let plain = unseal(
|
|
567
|
+
&wrapping,
|
|
568
|
+
&record.ring,
|
|
569
|
+
&format!("{}{}", AAD_RING, self.held.key),
|
|
570
|
+
&format!(
|
|
571
|
+
"wrong passphrase for key {}, or a damaged vault",
|
|
572
|
+
self.held.key
|
|
573
|
+
),
|
|
574
|
+
)?;
|
|
575
|
+
|
|
576
|
+
let ring = jsonof(&plain, &format!("key ring for {}", self.held.key))?;
|
|
577
|
+
|
|
578
|
+
let mut grants = BTreeMap::new();
|
|
579
|
+
if let Some(entries) = ring.get("grants").as_map() {
|
|
580
|
+
for (name, key) in entries {
|
|
581
|
+
match key.as_str() {
|
|
582
|
+
Some(text) => {
|
|
583
|
+
grants.insert(name.clone(), unb64(text, "a granted key")?);
|
|
584
|
+
}
|
|
585
|
+
None => return fail("missing a granted key"),
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
let root = match ring.get("root").as_str() {
|
|
591
|
+
Some(text) => Some(unb64(text, "the root key")?),
|
|
592
|
+
None => None,
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
Ok(Opened {
|
|
596
|
+
info: VaultKeyInfo {
|
|
597
|
+
key: self.held.key.clone(),
|
|
598
|
+
master: root.is_some(),
|
|
599
|
+
write: root.is_some() || jsontrue(&ring, "write"),
|
|
600
|
+
grants: grants.keys().cloned().collect(),
|
|
601
|
+
},
|
|
602
|
+
root,
|
|
603
|
+
grants,
|
|
604
|
+
ring: record.ring.clone(),
|
|
605
|
+
})
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
fn info(&self) -> VaultKeyInfo {
|
|
609
|
+
match &*self.held.opened.borrow() {
|
|
610
|
+
Some(held) => held.info.clone(),
|
|
611
|
+
None => VaultKeyInfo::default(),
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
fn rootof(&self, what: &str) -> Answer<Vec<u8>> {
|
|
616
|
+
match &*self.held.opened.borrow() {
|
|
617
|
+
Some(held) => match &held.root {
|
|
618
|
+
Some(root) => Ok(root.clone()),
|
|
619
|
+
None => fail(&format!(
|
|
620
|
+
"{} needs a master key, and {} is restricted",
|
|
621
|
+
what, self.held.key
|
|
622
|
+
)),
|
|
623
|
+
},
|
|
624
|
+
None => fail(&format!("{} needs a master key", what)),
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/// The key for one name, or nothing when this key cannot reach it.
|
|
629
|
+
fn keyfor(&self, name: &str) -> Option<Vec<u8>> {
|
|
630
|
+
let held = self.held.opened.borrow();
|
|
631
|
+
let open = held.as_ref()?;
|
|
632
|
+
|
|
633
|
+
match &open.root {
|
|
634
|
+
Some(root) => Some(secretkey(root, name)),
|
|
635
|
+
None => open.grants.get(name).cloned(),
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/// Derive the key and read the file NOW rather than at first use.
|
|
640
|
+
pub fn open(&self) -> Answer<VaultKeyInfo> {
|
|
641
|
+
self.load()?;
|
|
642
|
+
Ok(self.info())
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/// The names this key can read, sorted.
|
|
646
|
+
pub fn list(&self) -> Answer<Vec<String>> {
|
|
647
|
+
let file = self.load()?;
|
|
648
|
+
let info = self.info();
|
|
649
|
+
|
|
650
|
+
let mut out = match &self.held.opened.borrow().as_ref().and_then(|h| h.root.clone()) {
|
|
651
|
+
Some(root) => {
|
|
652
|
+
let namekey = mac(root, LABEL_NAMES);
|
|
653
|
+
let mut names = Vec::new();
|
|
654
|
+
for entry in &file.entries {
|
|
655
|
+
let plain =
|
|
656
|
+
unseal(&namekey, &entry.name, AAD_NAME, "a secret name is damaged")?;
|
|
657
|
+
names.push(String::from_utf8_lossy(&plain).into_owned());
|
|
658
|
+
}
|
|
659
|
+
names
|
|
660
|
+
}
|
|
661
|
+
// A restricted key has no name key, so it reports the grants
|
|
662
|
+
// it can actually find: the vault never tells it what else is
|
|
663
|
+
// in there.
|
|
664
|
+
None => info
|
|
665
|
+
.grants
|
|
666
|
+
.iter()
|
|
667
|
+
.filter(|name| {
|
|
668
|
+
self.keyfor(name)
|
|
669
|
+
.map(|key| file.entry(&entryid(&key)).is_some())
|
|
670
|
+
.unwrap_or(false)
|
|
671
|
+
})
|
|
672
|
+
.cloned()
|
|
673
|
+
.collect(),
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
out.sort();
|
|
677
|
+
Ok(out)
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/// The value, or a MISS. A name the vault does not hold and a name
|
|
681
|
+
/// this key cannot read answer the same way, which is what makes a
|
|
682
|
+
/// restricted vault in front of a broader store a workable chain.
|
|
683
|
+
pub fn get(&self, name: &str) -> Answer<Option<String>> {
|
|
684
|
+
checkname(name)?;
|
|
685
|
+
let file = self.load()?;
|
|
686
|
+
|
|
687
|
+
let key = match self.keyfor(name) {
|
|
688
|
+
Some(held) => held,
|
|
689
|
+
None => return Ok(None),
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
match file.entry(&entryid(&key)) {
|
|
693
|
+
None => Ok(None),
|
|
694
|
+
Some(entry) => {
|
|
695
|
+
let plain = unseal(
|
|
696
|
+
&key,
|
|
697
|
+
&entry.value,
|
|
698
|
+
&format!("{}{}", AAD_SECRET, name),
|
|
699
|
+
&format!("the value of {} is damaged", name),
|
|
700
|
+
)?;
|
|
701
|
+
Ok(Some(String::from_utf8_lossy(&plain).into_owned()))
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
pub fn has(&self, name: &str) -> Answer<bool> {
|
|
707
|
+
Ok(self.get(name)?.is_some())
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/// Write a value. A master writes any name; a restricted key holding
|
|
711
|
+
/// `write` overwrites the names it was granted, and creates none.
|
|
712
|
+
pub fn set(&self, name: &str, value: &str) -> Answer<()> {
|
|
713
|
+
checkname(name)?;
|
|
714
|
+
|
|
715
|
+
// Every write on this file, from any handle in this process,
|
|
716
|
+
// serializes here; see lockfor.
|
|
717
|
+
let one = lockfor(&self.held.file);
|
|
718
|
+
let _guard = one.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
|
|
719
|
+
|
|
720
|
+
let mut file = self.load()?;
|
|
721
|
+
let info = self.info();
|
|
722
|
+
|
|
723
|
+
if !info.write {
|
|
724
|
+
return fail(&format!("key {} is read-only", self.held.key));
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
let key = match self.keyfor(name) {
|
|
728
|
+
Some(held) => held,
|
|
729
|
+
None => {
|
|
730
|
+
return fail(&format!("key {} was not granted {}", self.held.key, name));
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
let box_ = seal(&key, value.as_bytes(), &format!("{}{}", AAD_SECRET, name))?;
|
|
735
|
+
let id = entryid(&key);
|
|
736
|
+
|
|
737
|
+
match file.entries.iter_mut().find(|entry| id == entry.id) {
|
|
738
|
+
Some(entry) => entry.value = box_,
|
|
739
|
+
None => {
|
|
740
|
+
// A NEW NAME NEEDS THE NAME KEY, which only a master
|
|
741
|
+
// holds. So a restricted key with `write` updates what it
|
|
742
|
+
// was granted and cannot grow the vault, which is what
|
|
743
|
+
// "restricted" has to mean for the grant list to stay the
|
|
744
|
+
// whole story.
|
|
745
|
+
let root = self.rootof(&format!("creating the secret {}", name))?;
|
|
746
|
+
let namekey = mac(&root, LABEL_NAMES);
|
|
747
|
+
|
|
748
|
+
file.entries.push(EntryRecord {
|
|
749
|
+
id,
|
|
750
|
+
name: seal(&namekey, name.as_bytes(), AAD_NAME)?,
|
|
751
|
+
value: box_,
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
self.save(&file)
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/// Drop a name. Master only.
|
|
760
|
+
pub fn remove(&self, name: &str) -> Answer<()> {
|
|
761
|
+
checkname(name)?;
|
|
762
|
+
|
|
763
|
+
let one = lockfor(&self.held.file);
|
|
764
|
+
let _guard = one.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
|
|
765
|
+
|
|
766
|
+
let mut file = self.load()?;
|
|
767
|
+
let root = self.rootof("removing a secret")?;
|
|
768
|
+
let want = entryid(&secretkey(&root, name));
|
|
769
|
+
|
|
770
|
+
if file.entry(&want).is_none() {
|
|
771
|
+
return fail(&format!("no such secret: {}", name));
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
file.entries.retain(|entry| want != entry.id);
|
|
775
|
+
|
|
776
|
+
self.save(&file)
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/// Every key in the file, with what it may do. Master only.
|
|
780
|
+
pub fn keys(&self) -> Answer<Vec<VaultKeyInfo>> {
|
|
781
|
+
let file = self.load()?;
|
|
782
|
+
let root = self.rootof("listing the keys")?;
|
|
783
|
+
let metakey = mac(&root, LABEL_META);
|
|
784
|
+
|
|
785
|
+
let mut out = Vec::new();
|
|
786
|
+
|
|
787
|
+
for record in &file.keys {
|
|
788
|
+
let mut info = VaultKeyInfo {
|
|
789
|
+
key: record.id.clone(),
|
|
790
|
+
..Default::default()
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
// A record written under a root key this one has replaced. The
|
|
794
|
+
// key is still in the file and still opens with its own
|
|
795
|
+
// passphrase, so it is reported rather than hidden - with what
|
|
796
|
+
// it can do unknown.
|
|
797
|
+
if let Ok(plain) = unseal(
|
|
798
|
+
&metakey,
|
|
799
|
+
&record.meta,
|
|
800
|
+
&format!("{}{}", AAD_META, record.id),
|
|
801
|
+
"metadata",
|
|
802
|
+
) {
|
|
803
|
+
let noted = jsonof(&plain, &format!("metadata for key {}", record.id))?;
|
|
804
|
+
info.master = jsontrue(¬ed, "master");
|
|
805
|
+
info.write = jsontrue(¬ed, "write");
|
|
806
|
+
if let Some(names) = noted.get("grants").as_list() {
|
|
807
|
+
info.grants = names
|
|
808
|
+
.iter()
|
|
809
|
+
.filter_map(|one| one.as_str().map(|text| text.to_string()))
|
|
810
|
+
.collect();
|
|
811
|
+
info.grants.sort();
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
out.push(info);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
Ok(out)
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/// Mint a restricted key. Master only.
|
|
822
|
+
pub fn grant(&self, spec: &GrantSpec) -> Answer<()> {
|
|
823
|
+
let one = lockfor(&self.held.file);
|
|
824
|
+
let _guard = one.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
|
|
825
|
+
|
|
826
|
+
let mut file = self.load()?;
|
|
827
|
+
let root = self.rootof("granting a key")?;
|
|
828
|
+
|
|
829
|
+
checkid(&spec.key, "a grant needs a key id")?;
|
|
830
|
+
if spec.passphrase.is_empty() {
|
|
831
|
+
return fail("a grant needs a passphrase");
|
|
832
|
+
}
|
|
833
|
+
if file.key(&spec.key).is_some() {
|
|
834
|
+
return fail(&format!("key already exists: {}", spec.key));
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
let mut names = spec.names.clone();
|
|
838
|
+
names.sort();
|
|
839
|
+
|
|
840
|
+
let mut grants = BTreeMap::new();
|
|
841
|
+
for name in &names {
|
|
842
|
+
checkname(name)?;
|
|
843
|
+
grants.insert(name.clone(), secretkey(&root, name));
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
let iterations = if 0 < spec.iterations {
|
|
847
|
+
spec.iterations
|
|
848
|
+
} else {
|
|
849
|
+
self.held.iterations
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
let record = sealkey(
|
|
853
|
+
&root,
|
|
854
|
+
&spec.key,
|
|
855
|
+
&spec.passphrase,
|
|
856
|
+
iterations,
|
|
857
|
+
&grantring(spec.write, &grants),
|
|
858
|
+
&metaof(false, spec.write, &names),
|
|
859
|
+
)?;
|
|
860
|
+
|
|
861
|
+
file.keys.push(record);
|
|
862
|
+
|
|
863
|
+
self.save(&file)
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/// Drop a key. Master only.
|
|
867
|
+
///
|
|
868
|
+
/// Anyone who already copied the file keeps whatever that key could
|
|
869
|
+
/// read, so revoking bars future reads of the LIVE file and `rotate`
|
|
870
|
+
/// is what takes a secret back.
|
|
871
|
+
pub fn revoke(&self, key: &str) -> Answer<()> {
|
|
872
|
+
let one = lockfor(&self.held.file);
|
|
873
|
+
let _guard = one.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
|
|
874
|
+
|
|
875
|
+
let mut file = self.load()?;
|
|
876
|
+
self.rootof("revoking a key")?;
|
|
877
|
+
|
|
878
|
+
if key == self.held.key {
|
|
879
|
+
return fail(&format!("a key cannot revoke itself: {}", key));
|
|
880
|
+
}
|
|
881
|
+
if file.key(key).is_none() {
|
|
882
|
+
return fail(&format!("no such key: {}", key));
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
file.keys.retain(|record| key != record.id);
|
|
886
|
+
|
|
887
|
+
self.save(&file)
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/// Take a new root key, re-encrypt every value under it, and DROP
|
|
891
|
+
/// EVERY OTHER KEY. Master only.
|
|
892
|
+
///
|
|
893
|
+
/// The other keys go because they must: their rings are sealed under
|
|
894
|
+
/// passphrases this process does not have, so there is no way to hand
|
|
895
|
+
/// them keys they can unwrap. Re-grant afterwards.
|
|
896
|
+
pub fn rotate(&self) -> Answer<()> {
|
|
897
|
+
let one = lockfor(&self.held.file);
|
|
898
|
+
let _guard = one.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
|
|
899
|
+
|
|
900
|
+
let file = self.load()?;
|
|
901
|
+
let oldroot = self.rootof("rotating the vault")?;
|
|
902
|
+
|
|
903
|
+
let iters = match file.key(&self.held.key) {
|
|
904
|
+
Some(record) => record.iters,
|
|
905
|
+
None => self.held.iterations,
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
// Read everything out under the old root before anything changes:
|
|
909
|
+
// once the root is replaced the old derived keys are unreachable.
|
|
910
|
+
let oldnamekey = mac(&oldroot, LABEL_NAMES);
|
|
911
|
+
let mut held = Vec::new();
|
|
912
|
+
|
|
913
|
+
for entry in &file.entries {
|
|
914
|
+
let plain = unseal(&oldnamekey, &entry.name, AAD_NAME, "a secret name is damaged")?;
|
|
915
|
+
let name = String::from_utf8_lossy(&plain).into_owned();
|
|
916
|
+
let key = secretkey(&oldroot, &name);
|
|
917
|
+
|
|
918
|
+
let value = unseal(
|
|
919
|
+
&key,
|
|
920
|
+
&entry.value,
|
|
921
|
+
&format!("{}{}", AAD_SECRET, name),
|
|
922
|
+
&format!("the value of {} is damaged", name),
|
|
923
|
+
)?;
|
|
924
|
+
|
|
925
|
+
held.push((name, String::from_utf8_lossy(&value).into_owned()));
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
let root = random(KEYLEN)?;
|
|
929
|
+
let namekey = mac(&root, LABEL_NAMES);
|
|
930
|
+
let mut entries = Vec::new();
|
|
931
|
+
|
|
932
|
+
for (name, value) in &held {
|
|
933
|
+
let key = secretkey(&root, name);
|
|
934
|
+
entries.push(EntryRecord {
|
|
935
|
+
id: entryid(&key),
|
|
936
|
+
name: seal(&namekey, name.as_bytes(), AAD_NAME)?,
|
|
937
|
+
value: seal(&key, value.as_bytes(), &format!("{}{}", AAD_SECRET, name))?,
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
let record = sealkey(
|
|
942
|
+
&root,
|
|
943
|
+
&self.held.key,
|
|
944
|
+
&self.held.passphrase,
|
|
945
|
+
iters,
|
|
946
|
+
&masterring(&root),
|
|
947
|
+
&metaof(true, true, &[]),
|
|
948
|
+
)?;
|
|
949
|
+
|
|
950
|
+
self.save(&VaultFile {
|
|
951
|
+
keys: vec![record],
|
|
952
|
+
entries,
|
|
953
|
+
})?;
|
|
954
|
+
|
|
955
|
+
// The ring this handle holds is the OLD one, so the next call must
|
|
956
|
+
// derive again rather than answer from it.
|
|
957
|
+
self.close();
|
|
958
|
+
|
|
959
|
+
Ok(())
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
fn hex(raw: &[u8]) -> String {
|
|
964
|
+
raw.iter().map(|byte| format!("{:02x}", byte)).collect()
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
// --- the provider and the definition ----------------------------------
|
|
968
|
+
|
|
969
|
+
/// Reads a vault as one store in a chain.
|
|
970
|
+
struct MiniVaultProvider {
|
|
971
|
+
vault: Vault,
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
impl Provider for MiniVaultProvider {
|
|
975
|
+
fn lookup(&self, name: &str) -> Answer<Option<String>> {
|
|
976
|
+
self.vault.get(name)
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
fn describe(&self) -> String {
|
|
980
|
+
format!("minivault:{}", self.vault.file())
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
/// The `minivault` provider kind, as a voxgig/plugin definition.
|
|
985
|
+
///
|
|
986
|
+
/// Written out rather than built by `providerplugin`, because this
|
|
987
|
+
/// definition publishes TWO exports: `provider`, the read half every kind
|
|
988
|
+
/// publishes, and `vault`, the programmatic API. voxgig/plugin's exports
|
|
989
|
+
/// are how a definition offers an application more than the host's own
|
|
990
|
+
/// vocabulary, and a store that can only be read is half a vault.
|
|
991
|
+
///
|
|
992
|
+
/// Both cross as `Value::Opaque` - plugin's escape hatch for "a client the
|
|
993
|
+
/// library never inspects" - which is what `providerplugin` already does
|
|
994
|
+
/// for the provider. No slot table: unlike the ports whose value model
|
|
995
|
+
/// carries only numbers and strings, rust can put the handle itself in.
|
|
996
|
+
pub fn minivault() -> Definition {
|
|
997
|
+
let mut definition = Definition::named("minivault");
|
|
998
|
+
|
|
999
|
+
definition.define = Some(Rc::new(move |inst: &Inst| {
|
|
1000
|
+
let spec = specof(&inst.options());
|
|
1001
|
+
|
|
1002
|
+
let built = openvault(&VaultOptions {
|
|
1003
|
+
file: spec.file.clone(),
|
|
1004
|
+
key: spec.vaultkey.clone(),
|
|
1005
|
+
passphrase: spec.passphrase.clone(),
|
|
1006
|
+
iterations: spec.iterations,
|
|
1007
|
+
create: spec.create,
|
|
1008
|
+
});
|
|
1009
|
+
|
|
1010
|
+
match built {
|
|
1011
|
+
Ok(vault) => {
|
|
1012
|
+
let provider: Rc<dyn Provider> = Rc::new(MiniVaultProvider {
|
|
1013
|
+
vault: vault.clone(),
|
|
1014
|
+
});
|
|
1015
|
+
inst.export(PROVIDER_EXPORT, Value::Opaque(Rc::new(provider)));
|
|
1016
|
+
inst.export(VAULT_EXPORT, Value::Opaque(Rc::new(vault)));
|
|
1017
|
+
Ok(())
|
|
1018
|
+
}
|
|
1019
|
+
// The message is the spec's, byte for byte, and the code is
|
|
1020
|
+
// what `Sekreto::new` reads it back under. This is the
|
|
1021
|
+
// `sekreto_error` bridge `providerplugin` would have done.
|
|
1022
|
+
Err(err) => Err(PluginError::new(
|
|
1023
|
+
ERROR_CODE,
|
|
1024
|
+
&err.message,
|
|
1025
|
+
details(&[
|
|
1026
|
+
("ref", Value::str(&inst.eref)),
|
|
1027
|
+
("cause", Value::str(&err.message)),
|
|
1028
|
+
]),
|
|
1029
|
+
)),
|
|
1030
|
+
}
|
|
1031
|
+
}));
|
|
1032
|
+
|
|
1033
|
+
definition
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
/// The vault behind a store in a chain, as its programmatic API.
|
|
1037
|
+
///
|
|
1038
|
+
/// With no store named, the unqualified alias answers: one vault in the
|
|
1039
|
+
/// chain resolves whatever it is called, and two refuse rather than
|
|
1040
|
+
/// picking one.
|
|
1041
|
+
pub fn vaultof(secrets: &Sekreto, store: &str) -> Answer<Vault> {
|
|
1042
|
+
let held = |eref: &str, why: &str| -> Answer<Vault> {
|
|
1043
|
+
let exported = match secrets.host().exports(&format!("{}/{}", eref, VAULT_EXPORT)) {
|
|
1044
|
+
Ok(value) => value,
|
|
1045
|
+
Err(_) => return fail(why),
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
match &exported {
|
|
1049
|
+
Value::Opaque(one) => match one.downcast_ref::<Vault>() {
|
|
1050
|
+
Some(vault) => Ok(vault.clone()),
|
|
1051
|
+
None => fail(why),
|
|
1052
|
+
},
|
|
1053
|
+
_ => fail(why),
|
|
1054
|
+
}
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
if store.is_empty() {
|
|
1058
|
+
return held("minivault", "no minivault store in this chain");
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
// A NAMED STORE MUST EXIST, and the alias must not stand in for it.
|
|
1062
|
+
// `exports` falls back to the alias when the exact ref misses, so
|
|
1063
|
+
// asking for `minivault` in a chain whose only vault is named `app`
|
|
1064
|
+
// used to hand back the `app` vault - and then write to it.
|
|
1065
|
+
let missing = format!("no minivault store named {} in this chain", store);
|
|
1066
|
+
let eref = if "minivault" == store {
|
|
1067
|
+
"minivault".to_string()
|
|
1068
|
+
} else {
|
|
1069
|
+
format!("minivault${}", store)
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
match secrets.host().instance(&Value::str(&eref)) {
|
|
1073
|
+
Ok(Some(_)) => held(&eref, &missing),
|
|
1074
|
+
_ => fail(&missing),
|
|
1075
|
+
}
|
|
1076
|
+
}
|