@voxgig/sdkgen 4.10.0 → 4.11.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/package.json +1 -1
- package/project/.sdk/model/feature/secrets.aon +330 -0
- package/project/.sdk/model/target/c.aon +15 -2
- package/project/.sdk/model/target/cpp.aon +18 -0
- package/project/.sdk/model/target/lua.aon +17 -0
- package/project/.sdk/model/target/ocaml.aon +48 -5
- package/project/.sdk/model/target/zig.aon +30 -4
- package/project/.sdk/src/cmp/c/Config_c.ts +338 -1
- package/project/.sdk/src/cmp/c/Main_c.ts +57 -2
- package/project/.sdk/src/cmp/c/Package_c.ts +12 -2
- package/project/.sdk/src/cmp/cpp/Config_cpp.ts +324 -2
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +2 -0
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +62 -4
- package/project/.sdk/src/cmp/cpp/Package_cpp.ts +10 -0
- package/project/.sdk/src/cmp/lua/Config_lua.ts +88 -0
- package/project/.sdk/src/cmp/lua/Gitignore_lua.ts +4 -0
- package/project/.sdk/src/cmp/lua/Main_lua.ts +93 -3
- package/project/.sdk/src/cmp/lua/Package_lua.ts +60 -0
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +10 -0
- package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +183 -5
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +160 -3
- package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +25 -1
- package/project/.sdk/src/cmp/zig/Config_zig.ts +130 -9
- package/project/.sdk/src/cmp/zig/Main_zig.ts +208 -4
- package/project/.sdk/{tm/zig/build.zig → src/cmp/zig/fragment/Build.fragment.zig} +7 -0
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +25 -0
- package/project/.sdk/{tm/zig/root.zig → src/cmp/zig/fragment/Root.fragment.zig} +9 -0
- package/project/.sdk/tm/c/Makefile +58 -9
- package/project/.sdk/tm/c/core/sdk.h +10 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.c +133 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.h +39 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.c +83 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.h +48 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/config.c +413 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/config.h +24 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.c +264 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.h +29 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/env.c +220 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/env.h +19 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/export.c +97 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/export.h +19 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.c +237 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.h +17 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/host.c +1494 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/host.h +135 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/order.c +288 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/order.h +18 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/point.c +141 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/point.h +80 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.c +170 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.h +52 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.c +98 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.h +18 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/types.c +150 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/types.h +104 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/value.c +649 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/value.h +135 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/version.c +151 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/version.h +34 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/aws.c +281 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/azuresecrets.c +207 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/boru.c +164 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/clock.c +75 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/doppler.c +141 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/encode.c +144 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/gcpsecrets.c +177 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/hashicorp.c +239 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/httpjson.c +599 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/infisical.c +165 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/onepassword.c +194 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/proc.c +233 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/secretspec.c +125 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/sekretoplugins.h +125 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/sha256.c +270 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/sigv4.c +382 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/support.h +153 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/tls.c +420 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/internal.h +86 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/json.c +721 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/providers.c +813 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.c +944 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.h +490 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/util.c +442 -0
- package/project/.sdk/tm/c/feature/secrets.c +797 -0
- package/project/.sdk/tm/c/feature/secrets.h +46 -0
- package/project/.sdk/tm/c/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/c/tests/feature/secrets/secrets_test.c +802 -0
- package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +38 -11
- package/project/.sdk/tm/clojure/test/sdk/test/feature/secrets.clj +40 -6
- package/project/.sdk/tm/cpp/Makefile +48 -4
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.cpp +121 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.hpp +41 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.cpp +60 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.hpp +66 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.cpp +376 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.hpp +29 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.cpp +230 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.hpp +31 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.cpp +205 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.hpp +25 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.cpp +84 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.hpp +24 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.cpp +222 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.hpp +21 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.cpp +1200 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.hpp +250 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.cpp +250 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.hpp +22 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.cpp +110 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.hpp +79 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.cpp +136 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.hpp +60 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.cpp +82 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.hpp +25 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.cpp +90 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.hpp +65 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.cpp +491 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.hpp +120 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.cpp +143 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.hpp +36 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.cpp +248 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.hpp +30 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.cpp +149 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.cpp +117 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.hpp +27 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.cpp +180 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.hpp +52 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.cpp +87 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.cpp +121 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.cpp +153 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.cpp +666 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.hpp +160 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.cpp +123 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.cpp +125 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.cpp +223 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.hpp +47 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.cpp +104 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.hpp +27 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.cpp +242 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.hpp +58 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.cpp +260 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.hpp +47 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.cpp +476 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.hpp +89 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.cpp +312 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.hpp +263 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.cpp +354 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.hpp +111 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.cpp +613 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.hpp +227 -0
- package/project/.sdk/tm/cpp/feature/secrets.hpp +745 -0
- package/project/.sdk/tm/cpp/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/test/feature/secrets/secrets_test.cpp +808 -0
- package/project/.sdk/tm/csharp/feature/SecretsFeature.cs +34 -8
- package/project/.sdk/tm/csharp/test/feature/secrets/SecretsFeatureTest.cs +85 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets.ex +17 -2
- package/project/.sdk/tm/elixir/test/feature/secrets/secrets_test.exs +41 -0
- package/project/.sdk/tm/go/feature/secrets_feature.go +32 -10
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +116 -0
- package/project/.sdk/tm/java/feature/SecretsFeature.java +33 -8
- package/project/.sdk/tm/java/test/feature/secrets/SecretsFeatureTest.java +64 -0
- package/project/.sdk/tm/js/src/feature/secrets/SecretsFeature.js +34 -11
- package/project/.sdk/tm/js/test/feature/secrets/Secrets.test.js +73 -0
- package/project/.sdk/tm/kotlin/feature/SecretsFeature.kt +32 -7
- package/project/.sdk/tm/kotlin/test/feature/secrets/SecretsTest.kt +69 -0
- package/project/.sdk/tm/lua/Makefile +15 -4
- package/project/.sdk/tm/lua/feature/secrets/native/sekretonet.c +806 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/capability.lua +135 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/catalog.lua +63 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/config.lua +361 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/depend.lua +232 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/env.lua +168 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/export.lua +66 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/graph.lua +194 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/host.lua +1190 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/json.lua +169 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/order.lua +207 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/point.lua +106 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/ref.lua +115 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/resolve.lua +78 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/types.lua +275 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/version.lua +131 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin.lua +76 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/addr.lua +124 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/err.lua +47 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/name.lua +315 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/aws.lua +228 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/azuresecrets.lua +137 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/boru.lua +124 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/crypto.lua +212 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/doppler.lua +89 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/gcpsecrets.lua +129 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/hashicorp.lua +154 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/httpjson.lua +248 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/infisical.lua +113 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/json.lua +449 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/net.lua +198 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/onepassword.lua +126 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/secretspec.lua +93 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/sigv4.lua +269 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/support.lua +146 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/providers.lua +346 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto.lua +479 -0
- package/project/.sdk/tm/lua/feature/secrets_feature.lua +690 -0
- package/project/.sdk/tm/lua/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/lua/test/extend_test.lua +105 -0
- package/project/.sdk/tm/lua/test/feature/secrets/secrets_feature_test.lua +862 -0
- package/project/.sdk/tm/ocaml/Makefile +52 -8
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/capability.ml +106 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/catalog.ml +43 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/config.ml +349 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/defs.ml +143 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/depend.ml +217 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/env.ml +197 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/export.ml +89 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/graph.ml +227 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/host.ml +1112 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/order.ml +202 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/point.ml +138 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/ref.ml +126 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/resolve.ml +62 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/types.ml +97 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/value.ml +387 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/version.ml +139 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/aws.ml +171 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/azuresecrets.ml +116 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/boru.ml +95 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/crypto.ml +149 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/doppler.ml +61 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/gcpsecrets.ml +93 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/hashicorp.ml +120 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/http.ml +421 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/httpjson.ml +66 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/infisical.ml +85 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/onepassword.ml +112 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/runcmd.ml +97 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/secretspec.ml +68 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/sigv4.ml +259 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls.ml +44 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls_stubs.c +358 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/json.ml +376 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/provider.ml +647 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/secret.ml +299 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/sekreto.ml +347 -0
- package/project/.sdk/tm/ocaml/feature/secrets_feature.ml +453 -0
- package/project/.sdk/tm/ocaml/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +670 -0
- package/project/.sdk/tm/perl/feature/secrets_feature.pm +33 -12
- package/project/.sdk/tm/perl/t/feature/secrets/secrets.t +47 -0
- package/project/.sdk/tm/php/feature/SecretsFeature.php +30 -6
- package/project/.sdk/tm/php/test/feature/secrets/SecretsTest.php +98 -0
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +28 -6
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +114 -0
- package/project/.sdk/tm/rb/feature/secrets_feature.rb +28 -6
- package/project/.sdk/tm/rb/test/feature/secrets/secrets_feature_test.rb +93 -0
- package/project/.sdk/tm/rust/feature/secrets.rs +33 -10
- package/project/.sdk/tm/rust/tests/feature/secrets/main.rs +96 -0
- package/project/.sdk/tm/scala/feature/SecretsFeature.scala +29 -7
- package/project/.sdk/tm/scala/sdktest/feature/secrets/SecretsTestMain.scala +71 -0
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +35 -12
- package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +73 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/capability.zig +137 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/catalog.zig +90 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/config.zig +346 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/depend.zig +244 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/env.zig +201 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/export.zig +83 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/graph.zig +212 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/host.zig +1224 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/inst.zig +126 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/order.zig +228 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/plugin.zig +34 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/point.zig +166 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/ref.zig +147 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/resolve.zig +74 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/types.zig +140 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/value.zig +662 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/version.zig +139 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/aws.zig +294 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/azuresecrets.zig +222 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/boru.zig +188 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/doppler.zig +135 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/gcpsecrets.zig +170 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/hashicorp.zig +242 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/httpjson.zig +535 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/infisical.zig +167 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/onepassword.zig +202 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/secretspec.zig +160 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/sigv4.zig +336 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/addr.zig +148 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/builtins.zig +259 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/provider.zig +440 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/sekreto.zig +944 -0
- package/project/.sdk/tm/zig/feature/secrets.zig +854 -0
- package/project/.sdk/tm/zig/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/zig/test/feature/secrets/secrets_test.zig +891 -0
- package/project/sdkgen-package.json +1 -1
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
(* VENDORED: @voxgig/sekreto sdk-20260908-1556-0 (ocaml/plugins/tls_stubs.c) *)
|
|
2
|
+
(* Source: https://github.com/voxgig/sekreto @ 1267ee2e5f49566bc92695bc9eb3a60ef4924998 [tag: sdk-20260908-1556-0] *)
|
|
3
|
+
(* License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream. *)
|
|
4
|
+
/* The TLS binding: OpenSSL, and nothing else from it.
|
|
5
|
+
*
|
|
6
|
+
* OCaml's distribution has Unix sockets but no TLS, and TLS is the one
|
|
7
|
+
* thing this repository has decided must not be hand-rolled. So this file
|
|
8
|
+
* binds the platform's audited TLS library - libssl and libcrypto - which
|
|
9
|
+
* is what ocaml-ssl, conduit and every other OCaml program that speaks
|
|
10
|
+
* https ultimately bind too. It is the WHOLE of the port's third-party
|
|
11
|
+
* surface, and it is confined to this one file plus its thin OCaml wrapper.
|
|
12
|
+
*
|
|
13
|
+
* The audit surface is the dependency closure, not the direct edge: `-lssl
|
|
14
|
+
* -lcrypto`, and the distribution's OpenSSL is that surface.
|
|
15
|
+
*
|
|
16
|
+
* Nothing else here comes from OpenSSL. HTTP framing, JSON, base64,
|
|
17
|
+
* SHA-256 and HMAC are all in-tree - calling libcrypto's EVP_Digest for
|
|
18
|
+
* SigV4 would widen "cryptographic transport is not hand-rolled" into
|
|
19
|
+
* "cryptography is not hand-rolled", which is not the rule.
|
|
20
|
+
*
|
|
21
|
+
* Four obligations, all of them met below and none of them optional. A
|
|
22
|
+
* binding that connects without verifying is worse than no TLS, because it
|
|
23
|
+
* looks like it works.
|
|
24
|
+
*
|
|
25
|
+
* 1. the chain is verified against the system trust store -
|
|
26
|
+
* SSL_CTX_set_default_verify_paths plus SSL_VERIFY_PEER with a NULL
|
|
27
|
+
* callback, so a verification error aborts the handshake; belt and
|
|
28
|
+
* braces, SSL_get_verify_result and the presence of a peer
|
|
29
|
+
* certificate are checked afterwards as well.
|
|
30
|
+
* 2. the HOSTNAME is verified, which is a separate step from the chain
|
|
31
|
+
* and is the half that gets forgotten - SSL_set1_host for a DNS name,
|
|
32
|
+
* X509_VERIFY_PARAM_set1_ip_asc for an IP literal, because
|
|
33
|
+
* SSL_set1_host does DNS-name matching and will not match an
|
|
34
|
+
* iPAddress SAN.
|
|
35
|
+
* 3. SNI is sent - SSL_set_tlsext_host_name - and NOT for an IP literal,
|
|
36
|
+
* which RFC 6066 forbids and which OpenSSL will happily send anyway.
|
|
37
|
+
* 4. SEKRETO_CA_BUNDLE adds roots, additively and never as a
|
|
38
|
+
* replacement, and fails open in silence: a wrong path adds no roots
|
|
39
|
+
* and raises nothing.
|
|
40
|
+
*
|
|
41
|
+
* TLS 1.2 is the floor. Renegotiation, session tickets and client
|
|
42
|
+
* certificates are not used.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
#include <caml/mlvalues.h>
|
|
46
|
+
#include <caml/alloc.h>
|
|
47
|
+
#include <caml/memory.h>
|
|
48
|
+
#include <caml/fail.h>
|
|
49
|
+
#include <caml/custom.h>
|
|
50
|
+
|
|
51
|
+
#include <string.h>
|
|
52
|
+
#include <stdlib.h>
|
|
53
|
+
#include <errno.h>
|
|
54
|
+
|
|
55
|
+
#include <openssl/ssl.h>
|
|
56
|
+
#include <openssl/err.h>
|
|
57
|
+
#include <openssl/x509v3.h>
|
|
58
|
+
|
|
59
|
+
struct sekconn {
|
|
60
|
+
SSL_CTX *ctx;
|
|
61
|
+
SSL *ssl;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
#define Conn_val(v) (*((struct sekconn **) Data_custom_val(v)))
|
|
65
|
+
|
|
66
|
+
static void sekreto_conn_free(struct sekconn *conn)
|
|
67
|
+
{
|
|
68
|
+
if (NULL == conn) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (NULL != conn->ssl) {
|
|
72
|
+
SSL_free(conn->ssl);
|
|
73
|
+
conn->ssl = NULL;
|
|
74
|
+
}
|
|
75
|
+
if (NULL != conn->ctx) {
|
|
76
|
+
SSL_CTX_free(conn->ctx);
|
|
77
|
+
conn->ctx = NULL;
|
|
78
|
+
}
|
|
79
|
+
free(conn);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static void sekreto_conn_finalize(value v)
|
|
83
|
+
{
|
|
84
|
+
sekreto_conn_free(Conn_val(v));
|
|
85
|
+
Conn_val(v) = NULL;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
static struct custom_operations sekreto_conn_ops = {
|
|
89
|
+
"org.voxgig.sekreto.tls",
|
|
90
|
+
sekreto_conn_finalize,
|
|
91
|
+
custom_compare_default,
|
|
92
|
+
custom_hash_default,
|
|
93
|
+
custom_serialize_default,
|
|
94
|
+
custom_deserialize_default,
|
|
95
|
+
custom_compare_ext_default,
|
|
96
|
+
custom_fixed_length_default
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/* The last OpenSSL error as text, or a stand-in. The queue is drained
|
|
100
|
+
* either way, so a later handshake cannot report an earlier failure. */
|
|
101
|
+
static void sekreto_why(char *out, size_t len, const char *fallback)
|
|
102
|
+
{
|
|
103
|
+
unsigned long code = ERR_get_error();
|
|
104
|
+
|
|
105
|
+
if (0 == code) {
|
|
106
|
+
snprintf(out, len, "%s", fallback);
|
|
107
|
+
} else {
|
|
108
|
+
char buf[256];
|
|
109
|
+
ERR_error_string_n(code, buf, sizeof(buf));
|
|
110
|
+
snprintf(out, len, "%s", buf);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
ERR_clear_error();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Open a TLS connection over an already-connected socket.
|
|
117
|
+
*
|
|
118
|
+
* fd the connected socket, which stays owned by OCaml
|
|
119
|
+
* host the bare host: no brackets, no port, no userinfo
|
|
120
|
+
* isip whether `host` is an IP literal rather than a DNS name
|
|
121
|
+
* cabundle SEKRETO_CA_BUNDLE, or the empty string
|
|
122
|
+
*/
|
|
123
|
+
CAMLprim value sekreto_tls_connect(value vfd, value vhost, value visip, value vca)
|
|
124
|
+
{
|
|
125
|
+
CAMLparam4(vfd, vhost, visip, vca);
|
|
126
|
+
CAMLlocal1(result);
|
|
127
|
+
|
|
128
|
+
char why[512];
|
|
129
|
+
const char *host = String_val(vhost);
|
|
130
|
+
const char *ca = String_val(vca);
|
|
131
|
+
int isip = Bool_val(visip);
|
|
132
|
+
int fd = Int_val(vfd);
|
|
133
|
+
|
|
134
|
+
struct sekconn *conn = (struct sekconn *) calloc(1, sizeof(struct sekconn));
|
|
135
|
+
if (NULL == conn) {
|
|
136
|
+
caml_failwith("out of memory");
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
ERR_clear_error();
|
|
140
|
+
|
|
141
|
+
conn->ctx = SSL_CTX_new(TLS_client_method());
|
|
142
|
+
if (NULL == conn->ctx) {
|
|
143
|
+
sekreto_why(why, sizeof(why), "cannot create a TLS context");
|
|
144
|
+
sekreto_conn_free(conn);
|
|
145
|
+
caml_failwith(why);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* (1) Chain verification, twice over: the trust store is loaded, and the
|
|
149
|
+
* NULL callback means a verification failure aborts the handshake rather
|
|
150
|
+
* than being reported and ignored. set_default_verify_paths also honours
|
|
151
|
+
* SSL_CERT_FILE and SSL_CERT_DIR, which is how OpenSSL programs are
|
|
152
|
+
* normally pointed at a different store. */
|
|
153
|
+
SSL_CTX_set_verify(conn->ctx, SSL_VERIFY_PEER, NULL);
|
|
154
|
+
|
|
155
|
+
if (1 != SSL_CTX_set_min_proto_version(conn->ctx, TLS1_2_VERSION)) {
|
|
156
|
+
sekreto_why(why, sizeof(why), "cannot require TLS 1.2");
|
|
157
|
+
sekreto_conn_free(conn);
|
|
158
|
+
caml_failwith(why);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (1 != SSL_CTX_set_default_verify_paths(conn->ctx)) {
|
|
162
|
+
sekreto_why(why, sizeof(why), "no system trust store");
|
|
163
|
+
sekreto_conn_free(conn);
|
|
164
|
+
caml_failwith(why);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* (4) SEKRETO_CA_BUNDLE, additive and failing open. The default roots
|
|
168
|
+
* are already loaded above and stay loaded whatever this does; an
|
|
169
|
+
* unreadable file or a certificate OpenSSL rejects simply adds nothing.
|
|
170
|
+
* A wrong path must not weaken the store and must not raise. */
|
|
171
|
+
if ('\0' != ca[0]) {
|
|
172
|
+
if (1 != SSL_CTX_load_verify_locations(conn->ctx, ca, NULL)) {
|
|
173
|
+
ERR_clear_error();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
conn->ssl = SSL_new(conn->ctx);
|
|
178
|
+
if (NULL == conn->ssl) {
|
|
179
|
+
sekreto_why(why, sizeof(why), "cannot create a TLS session");
|
|
180
|
+
sekreto_conn_free(conn);
|
|
181
|
+
caml_failwith(why);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
{
|
|
185
|
+
/* (2) Hostname verification - separate from the chain, and the half
|
|
186
|
+
* people forget. An IP literal needs the iPAddress form: SSL_set1_host
|
|
187
|
+
* does DNS-name matching and never matches an iPAddress SAN, and this
|
|
188
|
+
* repository's only TLS test endpoint is an IP literal. */
|
|
189
|
+
X509_VERIFY_PARAM *param = SSL_get0_param(conn->ssl);
|
|
190
|
+
|
|
191
|
+
X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
|
|
192
|
+
|
|
193
|
+
if (isip) {
|
|
194
|
+
if (1 != X509_VERIFY_PARAM_set1_ip_asc(param, host)) {
|
|
195
|
+
sekreto_why(why, sizeof(why), "cannot verify that address");
|
|
196
|
+
sekreto_conn_free(conn);
|
|
197
|
+
caml_failwith(why);
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
if (1 != SSL_set1_host(conn->ssl, host)) {
|
|
201
|
+
sekreto_why(why, sizeof(why), "cannot verify that host name");
|
|
202
|
+
sekreto_conn_free(conn);
|
|
203
|
+
caml_failwith(why);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* (3) SNI, for a name only: RFC 6066 forbids a literal address here,
|
|
207
|
+
* and OpenSSL sends whatever it is handed. */
|
|
208
|
+
if (1 != SSL_set_tlsext_host_name(conn->ssl, host)) {
|
|
209
|
+
sekreto_why(why, sizeof(why), "cannot send SNI");
|
|
210
|
+
sekreto_conn_free(conn);
|
|
211
|
+
caml_failwith(why);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (1 != SSL_set_fd(conn->ssl, fd)) {
|
|
217
|
+
sekreto_why(why, sizeof(why), "cannot attach the socket");
|
|
218
|
+
sekreto_conn_free(conn);
|
|
219
|
+
caml_failwith(why);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (1 != SSL_connect(conn->ssl)) {
|
|
223
|
+
long verified = SSL_get_verify_result(conn->ssl);
|
|
224
|
+
|
|
225
|
+
if (X509_V_OK != verified) {
|
|
226
|
+
snprintf(why, sizeof(why), "certificate verify failed: %s",
|
|
227
|
+
X509_verify_cert_error_string(verified));
|
|
228
|
+
ERR_clear_error();
|
|
229
|
+
} else {
|
|
230
|
+
sekreto_why(why, sizeof(why), "handshake failed");
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
sekreto_conn_free(conn);
|
|
234
|
+
caml_failwith(why);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Belt and braces. SSL_VERIFY_PEER already aborts on a bad chain, but a
|
|
238
|
+
* handshake that somehow completed without a verified peer certificate
|
|
239
|
+
* must not be used to carry a token. */
|
|
240
|
+
{
|
|
241
|
+
long verified = SSL_get_verify_result(conn->ssl);
|
|
242
|
+
X509 *peer = SSL_get1_peer_certificate(conn->ssl);
|
|
243
|
+
|
|
244
|
+
if (NULL == peer) {
|
|
245
|
+
sekreto_conn_free(conn);
|
|
246
|
+
caml_failwith("the server sent no certificate");
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
X509_free(peer);
|
|
250
|
+
|
|
251
|
+
if (X509_V_OK != verified) {
|
|
252
|
+
snprintf(why, sizeof(why), "certificate verify failed: %s",
|
|
253
|
+
X509_verify_cert_error_string(verified));
|
|
254
|
+
sekreto_conn_free(conn);
|
|
255
|
+
caml_failwith(why);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
result = caml_alloc_custom(&sekreto_conn_ops, sizeof(struct sekconn *), 0, 1);
|
|
260
|
+
Conn_val(result) = conn;
|
|
261
|
+
|
|
262
|
+
CAMLreturn(result);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Write, answering how many bytes went out. */
|
|
266
|
+
CAMLprim value sekreto_tls_write(value vconn, value vbuf, value vofs, value vlen)
|
|
267
|
+
{
|
|
268
|
+
CAMLparam4(vconn, vbuf, vofs, vlen);
|
|
269
|
+
|
|
270
|
+
struct sekconn *conn = Conn_val(vconn);
|
|
271
|
+
char why[512];
|
|
272
|
+
int wrote;
|
|
273
|
+
|
|
274
|
+
if (NULL == conn) {
|
|
275
|
+
caml_failwith("the connection is closed");
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
ERR_clear_error();
|
|
279
|
+
wrote = SSL_write(conn->ssl, String_val(vbuf) + Long_val(vofs), (int) Long_val(vlen));
|
|
280
|
+
|
|
281
|
+
if (0 >= wrote) {
|
|
282
|
+
int reason = SSL_get_error(conn->ssl, wrote);
|
|
283
|
+
|
|
284
|
+
if (SSL_ERROR_WANT_READ == reason || SSL_ERROR_WANT_WRITE == reason) {
|
|
285
|
+
caml_failwith("timed out");
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
sekreto_why(why, sizeof(why), "connection lost while writing");
|
|
289
|
+
caml_failwith(why);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
CAMLreturn(Val_long(wrote));
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* Read, answering how many bytes arrived; 0 means the peer is done.
|
|
296
|
+
*
|
|
297
|
+
* The runtime lock is not released, so the GC cannot run and cannot move
|
|
298
|
+
* the destination while OpenSSL writes into it. */
|
|
299
|
+
CAMLprim value sekreto_tls_read(value vconn, value vbuf, value vofs, value vlen)
|
|
300
|
+
{
|
|
301
|
+
CAMLparam4(vconn, vbuf, vofs, vlen);
|
|
302
|
+
|
|
303
|
+
struct sekconn *conn = Conn_val(vconn);
|
|
304
|
+
char why[512];
|
|
305
|
+
int got;
|
|
306
|
+
|
|
307
|
+
if (NULL == conn) {
|
|
308
|
+
caml_failwith("the connection is closed");
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
ERR_clear_error();
|
|
312
|
+
got = SSL_read(conn->ssl, Bytes_val(vbuf) + Long_val(vofs), (int) Long_val(vlen));
|
|
313
|
+
|
|
314
|
+
if (0 >= got) {
|
|
315
|
+
int reason = SSL_get_error(conn->ssl, got);
|
|
316
|
+
|
|
317
|
+
/* A clean close_notify, and a peer that simply closed the socket after
|
|
318
|
+
* a complete response, both mean the body has ended. */
|
|
319
|
+
if (SSL_ERROR_ZERO_RETURN == reason) {
|
|
320
|
+
CAMLreturn(Val_long(0));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (SSL_ERROR_SYSCALL == reason && 0 == ERR_peek_error()) {
|
|
324
|
+
if (EAGAIN == errno || EWOULDBLOCK == errno) {
|
|
325
|
+
caml_failwith("timed out");
|
|
326
|
+
}
|
|
327
|
+
CAMLreturn(Val_long(0));
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (SSL_ERROR_WANT_READ == reason || SSL_ERROR_WANT_WRITE == reason) {
|
|
331
|
+
caml_failwith("timed out");
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
sekreto_why(why, sizeof(why), "connection lost while reading");
|
|
335
|
+
caml_failwith(why);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
CAMLreturn(Val_long(got));
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
CAMLprim value sekreto_tls_close(value vconn)
|
|
342
|
+
{
|
|
343
|
+
CAMLparam1(vconn);
|
|
344
|
+
|
|
345
|
+
struct sekconn *conn = Conn_val(vconn);
|
|
346
|
+
|
|
347
|
+
if (NULL != conn) {
|
|
348
|
+
if (NULL != conn->ssl) {
|
|
349
|
+
SSL_shutdown(conn->ssl);
|
|
350
|
+
}
|
|
351
|
+
sekreto_conn_free(conn);
|
|
352
|
+
Conn_val(vconn) = NULL;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
ERR_clear_error();
|
|
356
|
+
|
|
357
|
+
CAMLreturn(Val_unit);
|
|
358
|
+
}
|