@voxgig/sdkgen 4.20.0 → 4.22.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/action/action.js +0 -65
- package/dist/action/action.js.map +1 -1
- package/dist/action/check.js +0 -88
- package/dist/action/check.js.map +1 -1
- package/dist/action/dispatch.js +0 -27
- package/dist/action/dispatch.js.map +1 -1
- package/dist/action/doctor.d.ts +1 -0
- package/dist/action/doctor.js +55 -321
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/edition.js +1 -87
- package/dist/action/edition.js.map +1 -1
- package/dist/action/feature.js +0 -48
- package/dist/action/feature.js.map +1 -1
- package/dist/action/kind.js +0 -132
- package/dist/action/kind.js.map +1 -1
- package/dist/action/package.js +0 -221
- package/dist/action/package.js.map +1 -1
- package/dist/action/resolve.js +0 -145
- package/dist/action/resolve.js.map +1 -1
- package/dist/action/target.js +0 -177
- package/dist/action/target.js.map +1 -1
- package/dist/cmp/AgentGuide.js +0 -7
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideContent.js +0 -24
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +0 -7
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +0 -14
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +1 -31
- package/dist/cmp/Deploy.js.map +1 -1
- package/dist/cmp/Entity.js +0 -4
- package/dist/cmp/Entity.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +0 -36
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +0 -14
- package/dist/cmp/Feature.js.map +1 -1
- package/dist/cmp/FeatureDocs.js +0 -25
- package/dist/cmp/FeatureDocs.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +0 -60
- package/dist/cmp/PublishWorkflow.js.map +1 -1
- package/dist/cmp/ReadmeErrors.js +0 -2
- package/dist/cmp/ReadmeErrors.js.map +1 -1
- package/dist/cmp/ReadmeExplanation.js +0 -5
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeFeatures.js +0 -10
- package/dist/cmp/ReadmeFeatures.js.map +1 -1
- package/dist/cmp/ReadmeRefFeatures.js +0 -19
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +0 -19
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +0 -80
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/ReadmeUnions.js +0 -15
- package/dist/cmp/ReadmeUnions.js.map +1 -1
- package/dist/cmp/Registered.js +0 -30
- package/dist/cmp/Registered.js.map +1 -1
- package/dist/cmp/Security.js +0 -2
- package/dist/cmp/Security.js.map +1 -1
- package/dist/cmp/Test.js +2 -1
- package/dist/cmp/Test.js.map +1 -1
- package/dist/cmp/TestControl.js +0 -25
- package/dist/cmp/TestControl.js.map +1 -1
- package/dist/helpers/applicability.js +0 -55
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/buildIdNames.js +0 -12
- package/dist/helpers/buildIdNames.js.map +1 -1
- package/dist/helpers/canonSpec.js +0 -114
- package/dist/helpers/canonSpec.js.map +1 -1
- package/dist/helpers/canonType.js +0 -87
- package/dist/helpers/canonType.js.map +1 -1
- package/dist/helpers/collectDeps.js +22 -24
- package/dist/helpers/collectDeps.js.map +1 -1
- package/dist/helpers/definition.js +0 -29
- package/dist/helpers/definition.js.map +1 -1
- package/dist/helpers/dryrun.js +0 -8
- package/dist/helpers/dryrun.js.map +1 -1
- package/dist/helpers/featureSource.js +0 -145
- package/dist/helpers/featureSource.js.map +1 -1
- package/dist/helpers/getMatchEntries.js +0 -4
- package/dist/helpers/getMatchEntries.js.map +1 -1
- package/dist/helpers/junk.js +9 -85
- package/dist/helpers/junk.js.map +1 -1
- package/dist/helpers/manifest.js +0 -138
- package/dist/helpers/manifest.js.map +1 -1
- package/dist/helpers/modelNames.js +0 -78
- package/dist/helpers/modelNames.js.map +1 -1
- package/dist/helpers/modelcheck.js +0 -106
- package/dist/helpers/modelcheck.js.map +1 -1
- package/dist/helpers/naming.d.ts +0 -1
- package/dist/helpers/naming.js +2 -305
- package/dist/helpers/naming.js.map +1 -1
- package/dist/helpers/opExample.js +0 -51
- package/dist/helpers/opExample.js.map +1 -1
- package/dist/helpers/opShape.js +0 -198
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/optspec.js +0 -77
- package/dist/helpers/optspec.js.map +1 -1
- package/dist/helpers/packageMeta.js +1 -200
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/helpers/pointPath.js +0 -55
- package/dist/helpers/pointPath.js.map +1 -1
- package/dist/helpers/resolved.d.ts +6 -0
- package/dist/helpers/resolved.js +49 -0
- package/dist/helpers/resolved.js.map +1 -0
- package/dist/helpers/semver.js +0 -61
- package/dist/helpers/semver.js.map +1 -1
- package/dist/helpers/serverVars.js +0 -44
- package/dist/helpers/serverVars.js.map +1 -1
- package/dist/helpers/shipped.js +0 -14
- package/dist/helpers/shipped.js.map +1 -1
- package/dist/helpers/station.js +0 -32
- package/dist/helpers/station.js.map +1 -1
- package/dist/helpers/stdrep.js +0 -26
- package/dist/helpers/stdrep.js.map +1 -1
- package/dist/helpers/testPolicy.js +0 -4
- package/dist/helpers/testPolicy.js.map +1 -1
- package/dist/sdkgen.d.ts +2 -1
- package/dist/sdkgen.js +13 -242
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.js +6 -266
- package/dist/testkit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.js +0 -243
- package/dist/utility.js.map +1 -1
- package/model/sdkgen.aon +19 -450
- package/package.json +4 -4
- package/project/.sdk/model/feature/audit.aon +0 -7
- package/project/.sdk/model/feature/cache.aon +0 -7
- package/project/.sdk/model/feature/clienttrack.aon +0 -7
- package/project/.sdk/model/feature/cost.aon +0 -13
- package/project/.sdk/model/feature/debug.aon +0 -7
- package/project/.sdk/model/feature/idempotency.aon +0 -7
- package/project/.sdk/model/feature/log.aon +0 -7
- package/project/.sdk/model/feature/metrics.aon +0 -7
- package/project/.sdk/model/feature/netsim.aon +0 -10
- package/project/.sdk/model/feature/paging.aon +0 -7
- package/project/.sdk/model/feature/proxy.aon +0 -7
- package/project/.sdk/model/feature/ratelimit.aon +0 -7
- package/project/.sdk/model/feature/retry.aon +0 -7
- package/project/.sdk/model/feature/secrets.aon +96 -450
- package/project/.sdk/model/feature/streaming.aon +0 -7
- package/project/.sdk/model/feature/telemetry.aon +0 -7
- package/project/.sdk/model/feature/test.aon +1 -8
- package/project/.sdk/model/feature/timeout.aon +0 -7
- package/project/.sdk/model/feature/validate.aon +0 -31
- package/project/.sdk/model/target/c.aon +1 -42
- package/project/.sdk/model/target/clojure.aon +1 -37
- package/project/.sdk/model/target/cpp.aon +1 -43
- package/project/.sdk/model/target/csharp.aon +1 -27
- package/project/.sdk/model/target/elixir.aon +1 -23
- package/project/.sdk/model/target/go-cli.aon +0 -30
- package/project/.sdk/model/target/go-mcp.aon +0 -21
- package/project/.sdk/model/target/go.aon +1 -10
- package/project/.sdk/model/target/java.aon +1 -30
- package/project/.sdk/model/target/js.aon +2 -21
- package/project/.sdk/model/target/kotlin.aon +1 -32
- package/project/.sdk/model/target/lua.aon +1 -33
- package/project/.sdk/model/target/ocaml.aon +1 -65
- package/project/.sdk/model/target/perl.aon +1 -21
- package/project/.sdk/model/target/php.aon +1 -18
- package/project/.sdk/model/target/py-data.aon +0 -33
- package/project/.sdk/model/target/py.aon +1 -18
- package/project/.sdk/model/target/rb.aon +1 -18
- package/project/.sdk/model/target/rust.aon +1 -26
- package/project/.sdk/model/target/scala.aon +1 -75
- package/project/.sdk/model/target/swift.aon +1 -42
- package/project/.sdk/model/target/ts.aon +3 -25
- package/project/.sdk/model/target/zig.aon +1 -51
- package/project/.sdk/src/cmp/c/Config_c.ts +0 -100
- package/project/.sdk/src/cmp/c/EntityTypes_c.ts +0 -36
- package/project/.sdk/src/cmp/c/Main_c.ts +3 -44
- package/project/.sdk/src/cmp/c/Package_c.ts +0 -14
- package/project/.sdk/src/cmp/c/PrepareAuth_c.ts +0 -85
- package/project/.sdk/src/cmp/c/ReadmeExamplesTest_c.ts +0 -20
- package/project/.sdk/src/cmp/c/ReadmeRef_c.ts +2 -5
- package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +0 -2
- package/project/.sdk/src/cmp/c/Schema_c.ts +87 -0
- package/project/.sdk/src/cmp/c/utility_c.ts +0 -47
- package/project/.sdk/src/cmp/clojure/Config_clojure.ts +0 -63
- package/project/.sdk/src/cmp/clojure/Entity_clojure.ts +0 -1
- package/project/.sdk/src/cmp/clojure/Main_clojure.ts +2 -41
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +0 -20
- package/project/.sdk/src/cmp/clojure/PrepareAuth_clojure.ts +0 -130
- package/project/.sdk/src/cmp/clojure/ReadmeExamplesTest_clojure.ts +0 -16
- package/project/.sdk/src/cmp/clojure/ReadmeExplanation_clojure.ts +1 -0
- package/project/.sdk/src/cmp/clojure/ReadmeRef_clojure.ts +2 -5
- package/project/.sdk/src/cmp/clojure/Schema_clojure.ts +53 -0
- package/project/.sdk/src/cmp/clojure/TestDirect_clojure.ts +0 -6
- package/project/.sdk/src/cmp/clojure/TestEntity_clojure.ts +0 -10
- package/project/.sdk/src/cmp/clojure/Test_clojure.ts +0 -8
- package/project/.sdk/src/cmp/clojure/featureextra_clojure.ts +0 -34
- package/project/.sdk/src/cmp/clojure/utility_clojure.ts +0 -47
- package/project/.sdk/src/cmp/cpp/Config_cpp.ts +0 -109
- package/project/.sdk/src/cmp/cpp/EntityTypes_cpp.ts +0 -36
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +3 -47
- package/project/.sdk/src/cmp/cpp/Package_cpp.ts +0 -14
- package/project/.sdk/src/cmp/cpp/PrepareAuth_cpp.ts +0 -125
- package/project/.sdk/src/cmp/cpp/ReadmeExamplesTest_cpp.ts +0 -19
- package/project/.sdk/src/cmp/cpp/ReadmeQuick_cpp.ts +0 -7
- package/project/.sdk/src/cmp/cpp/ReadmeRef_cpp.ts +2 -5
- package/project/.sdk/src/cmp/cpp/Schema_cpp.ts +84 -0
- package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +0 -3
- package/project/.sdk/src/cmp/cpp/Test_cpp.ts +0 -3
- package/project/.sdk/src/cmp/cpp/utility_cpp.ts +0 -28
- package/project/.sdk/src/cmp/csharp/Config_csharp.ts +0 -79
- package/project/.sdk/src/cmp/csharp/EntityOperation_csharp.ts +0 -3
- package/project/.sdk/src/cmp/csharp/EntityTypes_csharp.ts +0 -50
- package/project/.sdk/src/cmp/csharp/Entity_csharp.ts +0 -1
- package/project/.sdk/src/cmp/csharp/Main_csharp.ts +3 -24
- package/project/.sdk/src/cmp/csharp/Package_csharp.ts +0 -20
- package/project/.sdk/src/cmp/csharp/PrepareAuth_csharp.ts +0 -81
- package/project/.sdk/src/cmp/csharp/ReadmeEntity_csharp.ts +0 -1
- package/project/.sdk/src/cmp/csharp/ReadmeExamplesTest_csharp.ts +0 -23
- package/project/.sdk/src/cmp/csharp/ReadmeRef_csharp.ts +2 -5
- package/project/.sdk/src/cmp/csharp/ReadmeTopQuick_csharp.ts +0 -2
- package/project/.sdk/src/cmp/csharp/Schema_csharp.ts +67 -0
- package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +0 -4
- package/project/.sdk/src/cmp/csharp/utility_csharp.ts +0 -72
- package/project/.sdk/src/cmp/elixir/Config_elixir.ts +0 -78
- package/project/.sdk/src/cmp/elixir/EntityTypes_elixir.ts +0 -38
- package/project/.sdk/src/cmp/elixir/Main_elixir.ts +2 -40
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +0 -13
- package/project/.sdk/src/cmp/elixir/PrepareAuth_elixir.ts +0 -123
- package/project/.sdk/src/cmp/elixir/ReadmeExamplesTest_elixir.ts +0 -19
- package/project/.sdk/src/cmp/elixir/ReadmeExplanation_elixir.ts +1 -0
- package/project/.sdk/src/cmp/elixir/ReadmeRef_elixir.ts +2 -5
- package/project/.sdk/src/cmp/elixir/Schema_elixir.ts +64 -0
- package/project/.sdk/src/cmp/elixir/utility_elixir.ts +0 -34
- package/project/.sdk/src/cmp/go/Config_go.ts +0 -41
- package/project/.sdk/src/cmp/go/EntityTypes_go.ts +0 -71
- package/project/.sdk/src/cmp/go/Entity_go.ts +0 -5
- package/project/.sdk/src/cmp/go/Main_go.ts +2 -28
- package/project/.sdk/src/cmp/go/Package_go.ts +0 -7
- package/project/.sdk/src/cmp/go/PrepareAuth_go.ts +0 -64
- package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +0 -5
- package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +0 -30
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +0 -3
- package/project/.sdk/src/cmp/go/ReadmeIntro_go.ts +0 -7
- package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +0 -11
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +0 -21
- package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +2 -14
- package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +0 -9
- package/project/.sdk/src/cmp/go/Schema_go.ts +72 -0
- package/project/.sdk/src/cmp/go/TestDirect_go.ts +0 -23
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +0 -8
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +0 -21
- package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +0 -12
- package/project/.sdk/src/cmp/go/utility_go.ts +0 -70
- package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +0 -49
- package/project/.sdk/src/cmp/go-cli/fragment/words.fragment.go +0 -12
- package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +0 -36
- package/project/.sdk/src/cmp/go-mcp/fragment/main.fragment.go +0 -20
- package/project/.sdk/src/cmp/go-mcp/fragment/tools.fragment.go +0 -3
- package/project/.sdk/src/cmp/java/Config_java.ts +0 -63
- package/project/.sdk/src/cmp/java/EntityTypes_java.ts +0 -50
- package/project/.sdk/src/cmp/java/Entity_java.ts +0 -6
- package/project/.sdk/src/cmp/java/Main_java.ts +2 -24
- package/project/.sdk/src/cmp/java/PrepareAuth_java.ts +0 -55
- package/project/.sdk/src/cmp/java/ReadmeEntity_java.ts +0 -1
- package/project/.sdk/src/cmp/java/ReadmeExamplesTest_java.ts +0 -20
- package/project/.sdk/src/cmp/java/ReadmeQuick_java.ts +0 -4
- package/project/.sdk/src/cmp/java/ReadmeRef_java.ts +2 -5
- package/project/.sdk/src/cmp/java/ReadmeTopQuick_java.ts +0 -7
- package/project/.sdk/src/cmp/java/Schema_java.ts +106 -0
- package/project/.sdk/src/cmp/java/TestDirect_java.ts +0 -7
- package/project/.sdk/src/cmp/java/TestEntity_java.ts +0 -4
- package/project/.sdk/src/cmp/java/Test_java.ts +0 -6
- package/project/.sdk/src/cmp/java/utility_java.ts +0 -33
- package/project/.sdk/src/cmp/js/Config_js.ts +0 -46
- package/project/.sdk/src/cmp/js/EntityTypes_js.ts +0 -33
- package/project/.sdk/src/cmp/js/Main_js.ts +0 -33
- package/project/.sdk/src/cmp/js/Package_js.ts +2 -7
- package/project/.sdk/src/cmp/js/PrepareAuth_js.ts +0 -57
- package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +0 -9
- package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +0 -2
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +0 -15
- package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +2 -7
- package/project/.sdk/src/cmp/js/ReadmeTopQuick_js.ts +0 -7
- package/project/.sdk/src/cmp/js/Schema_js.ts +0 -21
- package/project/.sdk/src/cmp/js/TestDirect_js.ts +2 -16
- package/project/.sdk/src/cmp/js/TestEntity_js.ts +3 -13
- package/project/.sdk/src/cmp/js/TestLive_js.ts +10 -3
- package/project/.sdk/src/cmp/js/utility_js.ts +0 -58
- package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +0 -46
- package/project/.sdk/src/cmp/kotlin/EntityOperation_kotlin.ts +0 -2
- package/project/.sdk/src/cmp/kotlin/EntityTypes_kotlin.ts +0 -53
- package/project/.sdk/src/cmp/kotlin/Entity_kotlin.ts +0 -4
- package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +2 -46
- package/project/.sdk/src/cmp/kotlin/PrepareAuth_kotlin.ts +0 -113
- package/project/.sdk/src/cmp/kotlin/ReadmeEntity_kotlin.ts +0 -1
- package/project/.sdk/src/cmp/kotlin/ReadmeExamplesTest_kotlin.ts +0 -20
- package/project/.sdk/src/cmp/kotlin/ReadmeRef_kotlin.ts +2 -5
- package/project/.sdk/src/cmp/kotlin/ReadmeTopQuick_kotlin.ts +0 -5
- package/project/.sdk/src/cmp/kotlin/Schema_kotlin.ts +92 -0
- package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +0 -4
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +0 -6
- package/project/.sdk/src/cmp/kotlin/utility_kotlin.ts +0 -33
- package/project/.sdk/src/cmp/lua/Config_lua.ts +0 -56
- package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +0 -30
- package/project/.sdk/src/cmp/lua/Entity_lua.ts +0 -7
- package/project/.sdk/src/cmp/lua/Main_lua.ts +38 -59
- package/project/.sdk/src/cmp/lua/Package_lua.ts +1 -20
- package/project/.sdk/src/cmp/lua/PrepareAuth_lua.ts +0 -61
- package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +0 -8
- package/project/.sdk/src/cmp/lua/ReadmeExamplesTest_lua.ts +0 -24
- package/project/.sdk/src/cmp/lua/ReadmeExplanation_lua.ts +1 -0
- package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +0 -10
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +0 -21
- package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +2 -12
- package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +0 -3
- package/project/.sdk/src/cmp/lua/Schema_lua.ts +56 -0
- package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +0 -2
- package/project/.sdk/src/cmp/lua/utility_lua.ts +0 -30
- package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +18 -93
- package/project/.sdk/src/cmp/ocaml/EntityOperation_ocaml.ts +0 -6
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +27 -84
- package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +0 -13
- package/project/.sdk/src/cmp/ocaml/PrepareAuth_ocaml.ts +0 -145
- package/project/.sdk/src/cmp/ocaml/ReadmeExamplesTest_ocaml.ts +0 -17
- package/project/.sdk/src/cmp/ocaml/ReadmeExplanation_ocaml.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/ReadmeRef_ocaml.ts +2 -5
- package/project/.sdk/src/cmp/ocaml/Schema_ocaml.ts +76 -0
- package/project/.sdk/src/cmp/ocaml/SdkError_ocaml.ts +0 -4
- package/project/.sdk/src/cmp/ocaml/TestEntity_ocaml.ts +0 -5
- package/project/.sdk/src/cmp/ocaml/utility_ocaml.ts +0 -27
- package/project/.sdk/src/cmp/perl/Config_perl.ts +0 -52
- package/project/.sdk/src/cmp/perl/Entity_perl.ts +0 -3
- package/project/.sdk/src/cmp/perl/Main_perl.ts +2 -33
- package/project/.sdk/src/cmp/perl/Package_perl.ts +0 -8
- package/project/.sdk/src/cmp/perl/PrepareAuth_perl.ts +0 -84
- package/project/.sdk/src/cmp/perl/ReadmeEntity_perl.ts +0 -3
- package/project/.sdk/src/cmp/perl/ReadmeExamplesTest_perl.ts +0 -27
- package/project/.sdk/src/cmp/perl/ReadmeExplanation_perl.ts +1 -0
- package/project/.sdk/src/cmp/perl/ReadmeRef_perl.ts +2 -5
- package/project/.sdk/src/cmp/perl/ReadmeTopQuick_perl.ts +0 -2
- package/project/.sdk/src/cmp/perl/Schema_perl.ts +89 -0
- package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +0 -2
- package/project/.sdk/src/cmp/perl/utility_perl.ts +0 -26
- package/project/.sdk/src/cmp/php/Config_php.ts +0 -76
- package/project/.sdk/src/cmp/php/EntityTypes_php.ts +0 -51
- package/project/.sdk/src/cmp/php/MainEntity_php.ts +0 -6
- package/project/.sdk/src/cmp/php/Main_php.ts +2 -15
- package/project/.sdk/src/cmp/php/Package_php.ts +1 -1
- package/project/.sdk/src/cmp/php/PrepareAuth_php.ts +0 -73
- package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +0 -4
- package/project/.sdk/src/cmp/php/ReadmeExamplesTest_php.ts +0 -33
- package/project/.sdk/src/cmp/php/ReadmeExplanation_php.ts +1 -0
- package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +0 -1
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +0 -19
- package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +2 -7
- package/project/.sdk/src/cmp/php/Schema_php.ts +114 -0
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +0 -9
- package/project/.sdk/src/cmp/php/utility_php.ts +0 -22
- package/project/.sdk/src/cmp/py/Config_py.ts +0 -53
- package/project/.sdk/src/cmp/py/EntityTypes_py.ts +0 -55
- package/project/.sdk/src/cmp/py/Entity_py.ts +0 -16
- package/project/.sdk/src/cmp/py/Main_py.ts +3 -61
- package/project/.sdk/src/cmp/py/Package_py.ts +0 -3
- package/project/.sdk/src/cmp/py/PrepareAuth_py.ts +0 -69
- package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +0 -13
- package/project/.sdk/src/cmp/py/ReadmeExamplesTest_py.ts +0 -31
- package/project/.sdk/src/cmp/py/ReadmeExplanation_py.ts +1 -0
- package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +0 -3
- package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +0 -28
- package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +2 -16
- package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +0 -14
- package/project/.sdk/src/cmp/py/Schema_py.ts +53 -0
- package/project/.sdk/src/cmp/py/TestDirect_py.ts +0 -2
- package/project/.sdk/src/cmp/py/utility_py.ts +0 -22
- package/project/.sdk/src/cmp/py-data/Main_py-data.ts +9 -43
- package/project/.sdk/src/cmp/rb/Config_rb.ts +0 -56
- package/project/.sdk/src/cmp/rb/EntityTypes_rb.ts +0 -58
- package/project/.sdk/src/cmp/rb/Entity_rb.ts +0 -3
- package/project/.sdk/src/cmp/rb/Main_rb.ts +2 -10
- package/project/.sdk/src/cmp/rb/Package_rb.ts +0 -5
- package/project/.sdk/src/cmp/rb/PrepareAuth_rb.ts +0 -81
- package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +0 -7
- package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +0 -32
- package/project/.sdk/src/cmp/rb/ReadmeExplanation_rb.ts +1 -0
- package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +0 -9
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +0 -23
- package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +2 -10
- package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +0 -5
- package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +0 -3
- package/project/.sdk/src/cmp/rb/Schema_rb.ts +55 -0
- package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +0 -2
- package/project/.sdk/src/cmp/rb/utility_rb.ts +0 -22
- package/project/.sdk/src/cmp/rust/Config_rust.ts +0 -35
- package/project/.sdk/src/cmp/rust/EntityTypes_rust.ts +0 -34
- package/project/.sdk/src/cmp/rust/Entity_rust.ts +0 -9
- package/project/.sdk/src/cmp/rust/Main_rust.ts +3 -58
- package/project/.sdk/src/cmp/rust/Package_rust.ts +0 -30
- package/project/.sdk/src/cmp/rust/PrepareAuth_rust.ts +0 -84
- package/project/.sdk/src/cmp/rust/ReadmeExamplesTest_rust.ts +0 -16
- package/project/.sdk/src/cmp/rust/ReadmeRef_rust.ts +2 -5
- package/project/.sdk/src/cmp/rust/Schema_rust.ts +89 -0
- package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +0 -7
- package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +0 -9
- package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +0 -14
- package/project/.sdk/src/cmp/rust/fragment/EntityRemoveOp.fragment.rs +0 -4
- package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +0 -20
- package/project/.sdk/src/cmp/rust/fragment/SdkError.fragment.rs +0 -6
- package/project/.sdk/src/cmp/rust/utility_rust.ts +0 -47
- package/project/.sdk/src/cmp/scala/Config_scala.ts +0 -31
- package/project/.sdk/src/cmp/scala/EntityTypes_scala.ts +0 -51
- package/project/.sdk/src/cmp/scala/Main_scala.ts +3 -78
- package/project/.sdk/src/cmp/scala/PrepareAuth_scala.ts +0 -102
- package/project/.sdk/src/cmp/scala/ReadmeEntity_scala.ts +0 -1
- package/project/.sdk/src/cmp/scala/ReadmeExamplesTest_scala.ts +0 -23
- package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +2 -5
- package/project/.sdk/src/cmp/scala/ReadmeTopQuick_scala.ts +0 -5
- package/project/.sdk/src/cmp/scala/Schema_scala.ts +89 -0
- package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +0 -8
- package/project/.sdk/src/cmp/scala/Test_scala.ts +0 -3
- package/project/.sdk/src/cmp/scala/utility_scala.ts +0 -31
- package/project/.sdk/src/cmp/swift/Config_swift.ts +0 -62
- package/project/.sdk/src/cmp/swift/EntityOperation_swift.ts +0 -3
- package/project/.sdk/src/cmp/swift/EntityTypes_swift.ts +0 -39
- package/project/.sdk/src/cmp/swift/Main_swift.ts +3 -42
- package/project/.sdk/src/cmp/swift/Package_swift.ts +0 -69
- package/project/.sdk/src/cmp/swift/PrepareAuth_swift.ts +0 -134
- package/project/.sdk/src/cmp/swift/ReadmeEntity_swift.ts +0 -2
- package/project/.sdk/src/cmp/swift/ReadmeExamplesTest_swift.ts +0 -22
- package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +2 -5
- package/project/.sdk/src/cmp/swift/Schema_swift.ts +74 -0
- package/project/.sdk/src/cmp/swift/TestEntity_swift.ts +0 -4
- package/project/.sdk/src/cmp/swift/utility_swift.ts +0 -51
- package/project/.sdk/src/cmp/ts/Config_ts.ts +0 -46
- package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +0 -34
- package/project/.sdk/src/cmp/ts/Entity_ts.ts +0 -6
- package/project/.sdk/src/cmp/ts/Main_ts.ts +0 -28
- package/project/.sdk/src/cmp/ts/Package_ts.ts +2 -26
- package/project/.sdk/src/cmp/ts/PrepareAuth_ts.ts +0 -55
- package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +0 -9
- package/project/.sdk/src/cmp/ts/ReadmeExampleTest_ts.ts +0 -6
- package/project/.sdk/src/cmp/ts/ReadmeExamplesTest_ts.ts +0 -25
- package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +4 -9
- package/project/.sdk/src/cmp/ts/ReadmeIntro_ts.ts +0 -7
- package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +0 -3
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +0 -43
- package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +2 -20
- package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +0 -11
- package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +6 -9
- package/project/.sdk/src/cmp/ts/Schema_ts.ts +0 -21
- package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +2 -53
- package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +3 -31
- package/project/.sdk/src/cmp/ts/TestLive_ts.ts +10 -4
- package/project/.sdk/src/cmp/ts/Test_ts.ts +0 -4
- package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +0 -27
- package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +0 -7
- package/project/.sdk/src/cmp/ts/fragment/Direct.test.fragment.ts +0 -7
- package/project/.sdk/src/cmp/ts/fragment/Entity.fragment.ts +0 -1
- package/project/.sdk/src/cmp/ts/fragment/Entity.test.fragment.ts +0 -4
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +0 -20
- package/project/.sdk/src/cmp/ts/fragment/EntityCreateOp.fragment.ts +0 -6
- package/project/.sdk/src/cmp/ts/fragment/EntityLoadOp.fragment.ts +0 -6
- package/project/.sdk/src/cmp/ts/fragment/EntityRemoveOp.fragment.ts +0 -15
- package/project/.sdk/src/cmp/ts/fragment/EntityUpdateOp.fragment.ts +0 -6
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +0 -15
- package/project/.sdk/src/cmp/ts/fragment/MainStation.fragment.ts +0 -12
- package/project/.sdk/src/cmp/ts/fragment/SdkError.fragment.ts +0 -9
- package/project/.sdk/src/cmp/ts/utility_ts.ts +0 -59
- package/project/.sdk/src/cmp/zig/Config_zig.ts +0 -70
- package/project/.sdk/src/cmp/zig/Entity_zig.ts +0 -3
- package/project/.sdk/src/cmp/zig/Main_zig.ts +3 -83
- package/project/.sdk/src/cmp/zig/Package_zig.ts +0 -22
- package/project/.sdk/src/cmp/zig/PrepareAuth_zig.ts +0 -136
- package/project/.sdk/src/cmp/zig/ReadmeExamplesTest_zig.ts +0 -18
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +0 -3
- package/project/.sdk/src/cmp/zig/ReadmeRef_zig.ts +2 -5
- package/project/.sdk/src/cmp/zig/Schema_zig.ts +91 -0
- package/project/.sdk/src/cmp/zig/TestDirect_zig.ts +0 -11
- package/project/.sdk/src/cmp/zig/TestEntity_zig.ts +0 -8
- package/project/.sdk/src/cmp/zig/Test_zig.ts +0 -11
- package/project/.sdk/src/cmp/zig/utility_zig.ts +0 -47
- 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/FeatureOptions.cs +18 -5
- 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/core/context.go +0 -9
- package/project/.sdk/tm/go/core/types.go +0 -3
- package/project/.sdk/tm/go/feature/audit_feature.go +0 -9
- package/project/.sdk/tm/go/feature/cache_feature.go +0 -8
- package/project/.sdk/tm/go/feature/clienttrack_feature.go +0 -7
- package/project/.sdk/tm/go/feature/cost_feature.go +0 -51
- package/project/.sdk/tm/go/feature/debug_feature.go +0 -6
- package/project/.sdk/tm/go/feature/feature_options.go +108 -21
- package/project/.sdk/tm/go/feature/idempotency_feature.go +0 -6
- package/project/.sdk/tm/go/feature/metrics_feature.go +0 -6
- package/project/.sdk/tm/go/feature/netsim_feature.go +0 -8
- package/project/.sdk/tm/go/feature/paging_feature.go +0 -9
- package/project/.sdk/tm/go/feature/proxy_feature.go +0 -7
- package/project/.sdk/tm/go/feature/ratelimit_feature.go +0 -6
- package/project/.sdk/tm/go/feature/rbac_feature.go +0 -10
- package/project/.sdk/tm/go/feature/retry_feature.go +0 -6
- 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/secrets_feature.go +0 -173
- package/project/.sdk/tm/go/feature/streaming_feature.go +0 -7
- package/project/.sdk/tm/go/feature/telemetry_feature.go +0 -8
- package/project/.sdk/tm/go/feature/test_feature.go +0 -23
- package/project/.sdk/tm/go/feature/validate_feature.go +280 -0
- package/project/.sdk/tm/go/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/custom_utility_test.go +0 -29
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +0 -100
- package/project/.sdk/tm/go/test/feature_corpus_test.go +1 -60
- package/project/.sdk/tm/go/test/feature_harness_test.go +0 -10
- package/project/.sdk/tm/go/test/feature_test.go +107 -9
- 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/test/omniresolver_test.go +0 -74
- package/project/.sdk/tm/go/test/omnismoke_test.go +0 -4
- package/project/.sdk/tm/go/test/pipeline_test.go +0 -10
- package/project/.sdk/tm/go/test/primary_utility_test.go +0 -32
- package/project/.sdk/tm/go/test/struct_utility_test.go +0 -38
- package/project/.sdk/tm/go/test/testsupport_test.go +0 -25
- package/project/.sdk/tm/go/utility/feature_add.go +0 -6
- package/project/.sdk/tm/go/utility/fetcher.go +0 -6
- package/project/.sdk/tm/go/utility/graphql.go +1 -31
- package/project/.sdk/tm/go/utility/make_options.go +39 -91
- package/project/.sdk/tm/go/utility/make_point.go +0 -11
- package/project/.sdk/tm/go/utility/make_spec.go +0 -15
- package/project/.sdk/tm/go/utility/register.go +0 -28
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +24 -8
- package/project/.sdk/tm/go/utility/transform_request.go +0 -20
- package/project/.sdk/tm/go/utility/transform_response.go +0 -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/feature/test/TestFeature.js +12 -4
- 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/context.rs +0 -5
- package/project/.sdk/tm/rust/core/control.rs +0 -1
- package/project/.sdk/tm/rust/core/helpers.rs +0 -15
- package/project/.sdk/tm/rust/core/mod.rs +3 -2
- package/project/.sdk/tm/rust/core/operation.rs +0 -1
- package/project/.sdk/tm/rust/core/point.rs +0 -3
- package/project/.sdk/tm/rust/core/response.rs +0 -2
- package/project/.sdk/tm/rust/core/result.rs +0 -1
- package/project/.sdk/tm/rust/core/spec.rs +0 -1
- package/project/.sdk/tm/rust/core/types.rs +0 -20
- package/project/.sdk/tm/rust/core/utility_type.rs +0 -5
- package/project/.sdk/tm/rust/feature/audit.rs +0 -9
- package/project/.sdk/tm/rust/feature/base.rs +0 -3
- package/project/.sdk/tm/rust/feature/cache.rs +0 -9
- package/project/.sdk/tm/rust/feature/clienttrack.rs +0 -7
- package/project/.sdk/tm/rust/feature/cost.rs +0 -48
- package/project/.sdk/tm/rust/feature/debug.rs +0 -7
- package/project/.sdk/tm/rust/feature/idempotency.rs +0 -7
- package/project/.sdk/tm/rust/feature/log.rs +0 -3
- package/project/.sdk/tm/rust/feature/metrics.rs +0 -7
- package/project/.sdk/tm/rust/feature/netsim.rs +0 -9
- package/project/.sdk/tm/rust/feature/paging.rs +0 -10
- package/project/.sdk/tm/rust/feature/proxy.rs +0 -8
- package/project/.sdk/tm/rust/feature/ratelimit.rs +0 -6
- package/project/.sdk/tm/rust/feature/rbac.rs +0 -10
- package/project/.sdk/tm/rust/feature/retry.rs +0 -6
- 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/secrets.rs +1 -187
- package/project/.sdk/tm/rust/feature/streaming.rs +0 -7
- package/project/.sdk/tm/rust/feature/support.rs +0 -6
- package/project/.sdk/tm/rust/feature/telemetry.rs +0 -9
- package/project/.sdk/tm/rust/feature/test.rs +0 -19
- package/project/.sdk/tm/rust/feature/timeout.rs +0 -7
- package/project/.sdk/tm/rust/feature/validate.rs +306 -0
- package/project/.sdk/tm/rust/src/feature/validate/.gitkeep +0 -0
- package/project/.sdk/tm/rust/tests/common/mod.rs +0 -35
- package/project/.sdk/tm/rust/tests/custom_utility_test.rs +0 -2
- package/project/.sdk/tm/rust/tests/feature/secrets/main.rs +0 -95
- package/project/.sdk/tm/rust/tests/feature_test.rs +0 -16
- package/project/.sdk/tm/rust/tests/netsim_test.rs +0 -6
- package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +0 -135
- package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +0 -15
- package/project/.sdk/tm/rust/tests/pipeline_test.rs +0 -6
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +0 -22
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +0 -25
- 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/fetcher.rs +0 -5
- package/project/.sdk/tm/rust/utility/graphql.rs +1 -30
- package/project/.sdk/tm/rust/utility/make_error.rs +0 -2
- package/project/.sdk/tm/rust/utility/make_options.rs +1 -98
- package/project/.sdk/tm/rust/utility/make_point.rs +0 -12
- package/project/.sdk/tm/rust/utility/make_spec.rs +10 -7
- package/project/.sdk/tm/rust/utility/voxgigstruct/consts.rs +14 -20
- package/project/.sdk/tm/rust/utility/voxgigstruct/major.rs +0 -13
- package/project/.sdk/tm/rust/utility/voxgigstruct/mini.rs +0 -14
- package/project/.sdk/tm/rust/utility/voxgigstruct/mod.rs +0 -2
- package/project/.sdk/tm/rust/utility/voxgigstruct/ordered_map.rs +0 -18
- package/project/.sdk/tm/rust/utility/voxgigstruct/re.rs +0 -11
- package/project/.sdk/tm/rust/utility/voxgigstruct/value.rs +0 -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/Context.ts +0 -5
- package/project/.sdk/tm/ts/src/feature/audit/AuditFeature.ts +0 -7
- package/project/.sdk/tm/ts/src/feature/cache/CacheFeature.ts +0 -8
- package/project/.sdk/tm/ts/src/feature/clienttrack/ClienttrackFeature.ts +0 -7
- package/project/.sdk/tm/ts/src/feature/cost/CostFeature.ts +0 -52
- package/project/.sdk/tm/ts/src/feature/debug/DebugFeature.ts +0 -6
- package/project/.sdk/tm/ts/src/feature/metrics/MetricsFeature.ts +0 -6
- package/project/.sdk/tm/ts/src/feature/netsim/NetsimFeature.ts +0 -8
- package/project/.sdk/tm/ts/src/feature/paging/PagingFeature.ts +0 -13
- package/project/.sdk/tm/ts/src/feature/proxy/ProxyFeature.ts +0 -8
- package/project/.sdk/tm/ts/src/feature/ratelimit/RatelimitFeature.ts +0 -6
- package/project/.sdk/tm/ts/src/feature/rbac/RbacFeature.ts +0 -9
- package/project/.sdk/tm/ts/src/feature/retry/RetryFeature.ts +0 -6
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +0 -136
- 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/feature/streaming/StreamingFeature.ts +0 -7
- package/project/.sdk/tm/ts/src/feature/telemetry/TelemetryFeature.ts +0 -7
- package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +13 -88
- package/project/.sdk/tm/ts/src/feature/validate/ValidateFeature.ts +0 -87
- package/project/.sdk/tm/ts/src/utility/CleanUtility.ts +0 -12
- package/project/.sdk/tm/ts/src/utility/FeatureAddUtility.ts +0 -1
- package/project/.sdk/tm/ts/src/utility/GraphqlUtility.ts +2 -30
- package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +0 -4
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +0 -46
- package/project/.sdk/tm/ts/src/utility/MakePointUtility.ts +0 -34
- package/project/.sdk/tm/ts/src/utility/MakeRequestUtility.ts +0 -1
- package/project/.sdk/tm/ts/src/utility/MakeSpecUtility.ts +0 -5
- package/project/.sdk/tm/ts/src/utility/MakeUrlUtility.ts +0 -1
- package/project/.sdk/tm/ts/src/utility/ParamUtility.ts +0 -8
- package/project/.sdk/tm/ts/src/utility/PrepareBodyUtility.ts +0 -3
- package/project/.sdk/tm/ts/src/utility/PrepareParamsUtility.ts +0 -6
- package/project/.sdk/tm/ts/src/utility/ResultBasicUtility.ts +0 -1
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +1 -1
- package/project/.sdk/tm/ts/src/utility/TransformRequestUtility.ts +0 -20
- package/project/.sdk/tm/ts/src/utility/TransformResponseUtility.ts +0 -4
- package/project/.sdk/tm/ts/test/exists.test.ts +0 -10
- package/project/.sdk/tm/ts/test/feature/Corpus.test.ts +0 -56
- package/project/.sdk/tm/ts/test/feature/harness.ts +0 -9
- package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +0 -106
- package/project/.sdk/tm/ts/test/live-contract.ts +0 -2
- package/project/.sdk/tm/ts/test/omni.ts +0 -32
- package/project/.sdk/tm/ts/test/pipeline.test.ts +45 -28
- package/project/.sdk/tm/ts/test/utility/Corpus.test.ts +0 -13
- package/project/.sdk/tm/ts/test/utility/PrimaryUtility.test.ts +56 -29
- package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +0 -7
- package/project/.sdk/tm/ts/test/utility.ts +0 -55
- 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/action/action.ts +0 -65
- package/src/action/check.ts +0 -88
- package/src/action/dispatch.ts +0 -27
- package/src/action/doctor.ts +69 -329
- package/src/action/edition.ts +1 -87
- package/src/action/feature.ts +1 -49
- package/src/action/kind.ts +0 -149
- package/src/action/package.ts +0 -228
- package/src/action/resolve.ts +0 -148
- package/src/action/target.ts +0 -177
- package/src/cmp/AgentGuide.ts +0 -7
- package/src/cmp/AgentGuideContent.ts +0 -24
- package/src/cmp/AgentGuideTop.ts +0 -7
- package/src/cmp/Changelog.ts +0 -14
- package/src/cmp/Deploy.ts +1 -31
- package/src/cmp/Entity.ts +0 -4
- package/src/cmp/ExternalTarget.ts +0 -36
- package/src/cmp/Feature.ts +0 -14
- package/src/cmp/FeatureDocs.ts +0 -37
- package/src/cmp/PublishWorkflow.ts +0 -60
- package/src/cmp/ReadmeErrors.ts +0 -17
- package/src/cmp/ReadmeExplanation.ts +2 -11
- package/src/cmp/ReadmeFeatures.ts +0 -10
- package/src/cmp/ReadmeRefFeatures.ts +0 -19
- package/src/cmp/ReadmeStation.ts +0 -19
- package/src/cmp/ReadmeTop.ts +0 -80
- package/src/cmp/ReadmeUnions.ts +0 -15
- package/src/cmp/Registered.ts +0 -30
- package/src/cmp/Security.ts +0 -2
- package/src/cmp/Test.ts +3 -1
- package/src/cmp/TestControl.ts +0 -25
- package/src/helpers/applicability.ts +0 -55
- package/src/helpers/buildIdNames.ts +0 -12
- package/src/helpers/canonSpec.ts +0 -114
- package/src/helpers/canonType.ts +0 -87
- package/src/helpers/collectDeps.ts +21 -23
- package/src/helpers/definition.ts +0 -29
- package/src/helpers/dryrun.ts +0 -8
- package/src/helpers/featureSource.ts +0 -152
- package/src/helpers/getMatchEntries.ts +0 -4
- package/src/helpers/junk.ts +13 -89
- package/src/helpers/manifest.ts +0 -169
- package/src/helpers/modelNames.ts +0 -81
- package/src/helpers/modelcheck.ts +0 -106
- package/src/helpers/naming.ts +2 -305
- package/src/helpers/opExample.ts +0 -56
- package/src/helpers/opShape.ts +0 -200
- package/src/helpers/optspec.ts +0 -77
- package/src/helpers/packageMeta.ts +1 -200
- package/src/helpers/pointPath.ts +0 -55
- package/src/helpers/resolved.ts +50 -0
- package/src/helpers/semver.ts +0 -61
- package/src/helpers/serverVars.ts +0 -44
- package/src/helpers/shipped.ts +0 -14
- package/src/helpers/station.ts +0 -32
- package/src/helpers/stdrep.ts +0 -52
- package/src/helpers/testPolicy.ts +0 -4
- package/src/sdkgen.ts +15 -263
- package/src/testkit.ts +6 -312
- package/src/types.ts +1 -30
- package/src/utility.ts +0 -243
|
@@ -0,0 +1,2072 @@
|
|
|
1
|
+
// VENDORED: @voxgig/sekreto sdk-20260917-1242-0 (c/plugins/minivault.c)
|
|
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
|
+
/* A mini vault: every secret a project owns, encrypted, in ONE FILE.
|
|
5
|
+
*
|
|
6
|
+
* The store to reach for before there is a vault server. There is
|
|
7
|
+
* nothing to run and nothing to reach over a socket - the whole store is
|
|
8
|
+
* a single binary file - and the same chain that reads it in development
|
|
9
|
+
* reads HashiCorp or AWS in production by changing config, which is the
|
|
10
|
+
* reason sekreto exists.
|
|
11
|
+
*
|
|
12
|
+
* It is a plugin rather than a built-in kind because it needs crypto,
|
|
13
|
+
* which is the line the four built-ins stay behind.
|
|
14
|
+
*
|
|
15
|
+
* THE SECOND OBJECT IN THIS LIBRARY THAT NAMES OpenSSL, and the only
|
|
16
|
+
* other one. `tls.c` is the first. AGENTS.md used to confine the
|
|
17
|
+
* dependency exception to cryptographic TRANSPORT, which is why
|
|
18
|
+
* `sha256.c` writes SHA-256 and HMAC-SHA256 out by hand beside a linked
|
|
19
|
+
* libcrypto that has both; the rule now covers cryptography, because a
|
|
20
|
+
* block cipher protecting secrets AT REST has properties no known-answer
|
|
21
|
+
* vector can check - a table-driven AES passes every vector in the world
|
|
22
|
+
* and still hands its key to anyone who can time a cache. `make
|
|
23
|
+
* check-tls` reads the archives and fails if any THIRD object reaches
|
|
24
|
+
* for it.
|
|
25
|
+
*
|
|
26
|
+
* THE KEY DECIDES WHAT THE VAULT HOLDS. A master key reads and writes
|
|
27
|
+
* every name and mints restricted keys. A restricted key reads the names
|
|
28
|
+
* it was granted and CANNOT DERIVE ANY OTHER - the restriction is the
|
|
29
|
+
* cryptography rather than a check this code performs, so a copy of the
|
|
30
|
+
* file plus a restricted passphrase yields exactly what was granted and
|
|
31
|
+
* nothing else. What that does and does not protect is set out in
|
|
32
|
+
* DOCS.md under "What the mini vault protects".
|
|
33
|
+
*
|
|
34
|
+
* THE FILE FORMAT, which is the contract between the ports:
|
|
35
|
+
*
|
|
36
|
+
* magic 4 'SKMV'
|
|
37
|
+
* version 1 FORMAT
|
|
38
|
+
* kdf 1 1 = PBKDF2-HMAC-SHA256
|
|
39
|
+
* cipher 1 1 = AES-256-GCM
|
|
40
|
+
* reserved 1 0
|
|
41
|
+
* keycount 4 uint32
|
|
42
|
+
* per key:
|
|
43
|
+
* id 1 + bytes the key id, PLAINTEXT
|
|
44
|
+
* salt 1 + bytes
|
|
45
|
+
* iters 4 PBKDF2 rounds for this key
|
|
46
|
+
* ring 1 + iv, 4 + bytes sealed under the passphrase
|
|
47
|
+
* meta 1 + iv, 4 + bytes sealed under the vault's meta key
|
|
48
|
+
* entrycount 4 uint32
|
|
49
|
+
* per entry:
|
|
50
|
+
* id 1 + bytes the blinded lookup id
|
|
51
|
+
* name 1 + iv, 4 + bytes sealed under the vault's name key
|
|
52
|
+
* value 1 + iv, 4 + bytes sealed under that secret's own key
|
|
53
|
+
*
|
|
54
|
+
* Integers are big-endian and every length precedes its bytes, so the
|
|
55
|
+
* file is written with the same two primitives it is read with.
|
|
56
|
+
*
|
|
57
|
+
* NOTHING OUTSIDE A KEY RECORD IS PLAINTEXT. Secret names are sealed,
|
|
58
|
+
* and an entry is addressed by a blinded id derived from its own key, so
|
|
59
|
+
* a restricted key finds what it was granted without the file ever
|
|
60
|
+
* naming the rest. What the file does show anyone is the key ids and how
|
|
61
|
+
* many secrets there are.
|
|
62
|
+
*
|
|
63
|
+
* A port of typescript/plugins/minivault.ts, which is canonical. The
|
|
64
|
+
* bytes are pinned by the vaults in ../../test/fixture rather than left
|
|
65
|
+
* to agreement between implementations.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
#define _POSIX_C_SOURCE 200809L
|
|
69
|
+
|
|
70
|
+
#include <errno.h>
|
|
71
|
+
#include <fcntl.h>
|
|
72
|
+
#include <pthread.h>
|
|
73
|
+
#include <stdarg.h>
|
|
74
|
+
#include <stdio.h>
|
|
75
|
+
#include <stdlib.h>
|
|
76
|
+
#include <string.h>
|
|
77
|
+
#include <unistd.h>
|
|
78
|
+
|
|
79
|
+
#include <openssl/evp.h>
|
|
80
|
+
#include <openssl/hmac.h>
|
|
81
|
+
#include <openssl/rand.h>
|
|
82
|
+
|
|
83
|
+
#include "support.h"
|
|
84
|
+
|
|
85
|
+
/* ---- the format ---------------------------------------------------- */
|
|
86
|
+
|
|
87
|
+
#define MV_MAGIC "SKMV"
|
|
88
|
+
#define MV_FORMAT 1
|
|
89
|
+
#define MV_KDF_PBKDF2 1
|
|
90
|
+
#define MV_CIPHER_AESGCM 1
|
|
91
|
+
|
|
92
|
+
/* AES-256-GCM: 32-byte keys, 12-byte nonces, 16-byte tags. */
|
|
93
|
+
#define MV_KEYLEN 32
|
|
94
|
+
#define MV_IVLEN 12
|
|
95
|
+
#define MV_TAGLEN 16
|
|
96
|
+
#define MV_SALTLEN 16
|
|
97
|
+
|
|
98
|
+
/* Additional authenticated data. Every blob is bound to its PLACE in the
|
|
99
|
+
* file, so no ciphertext can be moved: a restricted key's ring cannot be
|
|
100
|
+
* relabelled as the master's, and one secret's value cannot be served
|
|
101
|
+
* under a name it was never written for. */
|
|
102
|
+
#define MV_AAD_RING "skmv1:ring:"
|
|
103
|
+
#define MV_AAD_META "skmv1:meta:"
|
|
104
|
+
#define MV_AAD_NAME "skmv1:name"
|
|
105
|
+
#define MV_AAD_SECRET "skmv1:secret:"
|
|
106
|
+
|
|
107
|
+
/* Everything a master reaches is derived from the root key, so rotating
|
|
108
|
+
* is one new random value rather than a re-wrap of each part. */
|
|
109
|
+
#define MV_LABEL_NAMES "skmv1:names"
|
|
110
|
+
#define MV_LABEL_META "skmv1:meta"
|
|
111
|
+
#define MV_LABEL_ID "skmv1:id"
|
|
112
|
+
|
|
113
|
+
/* The largest key id the format can record.
|
|
114
|
+
*
|
|
115
|
+
* A length is written in ONE byte. A longer id wrapped that byte and the
|
|
116
|
+
* writer then appended the whole thing, so every field after it shifted:
|
|
117
|
+
* a grant with a 300-character id replaced a working vault with an
|
|
118
|
+
* unreadable one, and said nothing. Checked where an id is ACCEPTED, so
|
|
119
|
+
* the refusal names the id rather than the file. */
|
|
120
|
+
#define MV_IDMAX 255
|
|
121
|
+
|
|
122
|
+
static sek_err mvfail(sek_pool *pool, const char *fmt, ...);
|
|
123
|
+
|
|
124
|
+
static sek_err mvfail(sek_pool *pool, const char *fmt, ...) {
|
|
125
|
+
va_list args;
|
|
126
|
+
char body[512];
|
|
127
|
+
|
|
128
|
+
va_start(args, fmt);
|
|
129
|
+
vsnprintf(body, sizeof(body), fmt, args);
|
|
130
|
+
va_end(args);
|
|
131
|
+
|
|
132
|
+
return sek_fmt(pool, "sekreto: minivault: %s", body);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static sek_err mvcheckid(sek_pool *pool, const char *id, const char *what) {
|
|
136
|
+
size_t len = sek_empty(id) ? 0 : strlen(id);
|
|
137
|
+
|
|
138
|
+
if (0 == len) {
|
|
139
|
+
return mvfail(pool, "%s", what);
|
|
140
|
+
}
|
|
141
|
+
if (MV_IDMAX < len) {
|
|
142
|
+
return mvfail(pool, "key id is longer than %d bytes: %.32s...", MV_IDMAX, id);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return NULL;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ---- bytes --------------------------------------------------------- */
|
|
149
|
+
|
|
150
|
+
/* A length-carrying byte string, because a vault holds NULs everywhere
|
|
151
|
+
* and a `char *` would end at the first one. */
|
|
152
|
+
typedef struct {
|
|
153
|
+
unsigned char *data;
|
|
154
|
+
size_t len;
|
|
155
|
+
} mvbytes;
|
|
156
|
+
|
|
157
|
+
static mvbytes mvmake(sek_pool *pool, size_t len) {
|
|
158
|
+
mvbytes out;
|
|
159
|
+
out.data = (unsigned char *)sek_alloc(pool, 0 == len ? 1 : len);
|
|
160
|
+
out.len = len;
|
|
161
|
+
return out;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
static mvbytes mvcopy(sek_pool *pool, const unsigned char *from, size_t len) {
|
|
165
|
+
mvbytes out = mvmake(pool, len);
|
|
166
|
+
if (0 < len) {
|
|
167
|
+
memcpy(out.data, from, len);
|
|
168
|
+
}
|
|
169
|
+
return out;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
static mvbytes mvoftext(sek_pool *pool, const char *text) {
|
|
173
|
+
return mvcopy(pool, (const unsigned char *)text, strlen(text));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* The bytes as a C string. Every plaintext this is used on is a secret
|
|
177
|
+
* name or a secret value, and both are text by the library's own rules. */
|
|
178
|
+
static char *mvtext(sek_pool *pool, mvbytes raw) {
|
|
179
|
+
char *out = (char *)sek_alloc(pool, raw.len + 1);
|
|
180
|
+
memcpy(out, raw.data, raw.len);
|
|
181
|
+
out[raw.len] = '\0';
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
static int mvsame(mvbytes left, mvbytes right) {
|
|
186
|
+
return left.len == right.len && 0 == memcmp(left.data, right.data, left.len);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* ---- keys ---------------------------------------------------------- */
|
|
190
|
+
|
|
191
|
+
static mvbytes mvmac(sek_pool *pool, mvbytes key, const char *text) {
|
|
192
|
+
mvbytes out = mvmake(pool, MV_KEYLEN);
|
|
193
|
+
unsigned int len = 0;
|
|
194
|
+
|
|
195
|
+
HMAC(EVP_sha256(), key.data, (int)key.len, (const unsigned char *)text, strlen(text), out.data,
|
|
196
|
+
&len);
|
|
197
|
+
|
|
198
|
+
return out;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* The key-encryption key a passphrase unwraps a ring with.
|
|
202
|
+
*
|
|
203
|
+
* PBKDF2 refuses a round count below one, which is what a damaged or
|
|
204
|
+
* hostile file records to make the derivation free; that comes back as a
|
|
205
|
+
* refusal rather than as a key derived from nothing. */
|
|
206
|
+
static sek_err mvkek(sek_pool *pool, const char *passphrase, mvbytes salt, int iters,
|
|
207
|
+
mvbytes *out) {
|
|
208
|
+
*out = mvmake(pool, MV_KEYLEN);
|
|
209
|
+
|
|
210
|
+
if (1 > iters) {
|
|
211
|
+
return mvfail(pool, "unusable round count: %d", iters);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (1 != PKCS5_PBKDF2_HMAC(passphrase, (int)strlen(passphrase), salt.data, (int)salt.len, iters,
|
|
215
|
+
EVP_sha256(), MV_KEYLEN, out->data)) {
|
|
216
|
+
return mvfail(pool, "cannot derive a key");
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return NULL;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* The key one named secret's value is encrypted with.
|
|
223
|
+
*
|
|
224
|
+
* DERIVED, never stored, for a master: it holds the root key and so
|
|
225
|
+
* reaches every name, including ones written after it was made. A
|
|
226
|
+
* restricted key holds the derived keys it was granted and nothing that
|
|
227
|
+
* produces another, so every other name is ciphertext to it in exactly
|
|
228
|
+
* the way it is to a stranger. */
|
|
229
|
+
static mvbytes mvsecretkey(sek_pool *pool, mvbytes root, const char *name) {
|
|
230
|
+
return mvmac(pool, root, sek_fmt(pool, "%s%s", MV_AAD_SECRET, name));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Where a secret lives in the file, derived from its own key so that
|
|
234
|
+
* finding it needs no plaintext name. One-way: an id yields nothing
|
|
235
|
+
* about the key that produced it. */
|
|
236
|
+
static mvbytes mventryid(sek_pool *pool, mvbytes key) {
|
|
237
|
+
return mvmac(pool, key, MV_LABEL_ID);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Hex, here rather than `sek_hex`: that one lives in `sha256.c` with the
|
|
241
|
+
* SigV4 digest, and naming it would pull the digest into every binary
|
|
242
|
+
* that links this plugin - which is the boundary `make check-core`
|
|
243
|
+
* measures. Eight random bytes in a temporary file name is the only use
|
|
244
|
+
* it has. */
|
|
245
|
+
static char *mvhex(sek_pool *pool, mvbytes raw) {
|
|
246
|
+
static const char digits[] = "0123456789abcdef";
|
|
247
|
+
char *out = (char *)sek_alloc(pool, raw.len * 2 + 1);
|
|
248
|
+
size_t at;
|
|
249
|
+
|
|
250
|
+
for (at = 0; at < raw.len; at++) {
|
|
251
|
+
out[at * 2] = digits[(raw.data[at] >> 4) & 0x0f];
|
|
252
|
+
out[at * 2 + 1] = digits[raw.data[at] & 0x0f];
|
|
253
|
+
}
|
|
254
|
+
out[raw.len * 2] = '\0';
|
|
255
|
+
|
|
256
|
+
return out;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* A JSON `true`, and nothing else. A missing field, a null and the
|
|
260
|
+
* string "true" are all false: the ring says what a key may do, and
|
|
261
|
+
* reading a damaged one permissively is how a read-only key becomes a
|
|
262
|
+
* writing one. */
|
|
263
|
+
static int mvjsonbool(const sek_json *val) {
|
|
264
|
+
return NULL != val && SEK_JSON_BOOL == val->type && 0 != val->boolval;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
static sek_err mvrandom(sek_pool *pool, size_t len, mvbytes *out) {
|
|
268
|
+
*out = mvmake(pool, len);
|
|
269
|
+
|
|
270
|
+
if (1 != RAND_bytes(out->data, (int)len)) {
|
|
271
|
+
return mvfail(pool, "no randomness available");
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return NULL;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* ---- sealing ------------------------------------------------------- */
|
|
278
|
+
|
|
279
|
+
typedef struct {
|
|
280
|
+
mvbytes iv;
|
|
281
|
+
mvbytes blob;
|
|
282
|
+
} mvsealed;
|
|
283
|
+
|
|
284
|
+
static int mvsameseal(mvsealed left, mvsealed right) {
|
|
285
|
+
return mvsame(left.iv, right.iv) && mvsame(left.blob, right.blob);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* The tag rides at the END of the blob, which is where every other
|
|
289
|
+
* port's AEAD leaves it and therefore what the format records. */
|
|
290
|
+
static sek_err mvseal(sek_pool *pool, mvbytes key, mvbytes plain, const char *aad, mvsealed *out) {
|
|
291
|
+
EVP_CIPHER_CTX *ctx = NULL;
|
|
292
|
+
sek_err err = mvrandom(pool, MV_IVLEN, &out->iv);
|
|
293
|
+
int len = 0;
|
|
294
|
+
int ok = 0;
|
|
295
|
+
|
|
296
|
+
if (NULL != err) {
|
|
297
|
+
return err;
|
|
298
|
+
}
|
|
299
|
+
if (MV_KEYLEN != key.len) {
|
|
300
|
+
return mvfail(pool, "bad key");
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
out->blob = mvmake(pool, plain.len + MV_TAGLEN);
|
|
304
|
+
|
|
305
|
+
ctx = EVP_CIPHER_CTX_new();
|
|
306
|
+
if (NULL == ctx) {
|
|
307
|
+
return mvfail(pool, "cannot seal");
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
ok = 1 == EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL) &&
|
|
311
|
+
1 == EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, MV_IVLEN, NULL) &&
|
|
312
|
+
1 == EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, out->iv.data) &&
|
|
313
|
+
1 == EVP_EncryptUpdate(ctx, NULL, &len, (const unsigned char *)aad, (int)strlen(aad)) &&
|
|
314
|
+
1 == EVP_EncryptUpdate(ctx, out->blob.data, &len, plain.data, (int)plain.len) &&
|
|
315
|
+
1 == EVP_EncryptFinal_ex(ctx, out->blob.data + len, &len) &&
|
|
316
|
+
1 == EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, MV_TAGLEN,
|
|
317
|
+
out->blob.data + plain.len);
|
|
318
|
+
|
|
319
|
+
EVP_CIPHER_CTX_free(ctx);
|
|
320
|
+
|
|
321
|
+
return ok ? NULL : mvfail(pool, "cannot seal");
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* The plaintext, or a refusal. A GCM tag that fails to verify is the
|
|
325
|
+
* only evidence there is, and it cannot tell a wrong passphrase from a
|
|
326
|
+
* damaged file, so `what` names the attempt and the message admits both. */
|
|
327
|
+
static sek_err mvunseal(sek_pool *pool, mvbytes key, mvsealed box, const char *aad,
|
|
328
|
+
const char *what, mvbytes *out) {
|
|
329
|
+
EVP_CIPHER_CTX *ctx = NULL;
|
|
330
|
+
size_t cut;
|
|
331
|
+
int len = 0;
|
|
332
|
+
int ok = 0;
|
|
333
|
+
|
|
334
|
+
if (box.blob.len < MV_TAGLEN || MV_IVLEN != box.iv.len) {
|
|
335
|
+
return mvfail(pool, "%s: truncated", what);
|
|
336
|
+
}
|
|
337
|
+
if (MV_KEYLEN != key.len) {
|
|
338
|
+
return mvfail(pool, "bad key");
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
cut = box.blob.len - MV_TAGLEN;
|
|
342
|
+
*out = mvmake(pool, cut);
|
|
343
|
+
|
|
344
|
+
ctx = EVP_CIPHER_CTX_new();
|
|
345
|
+
if (NULL == ctx) {
|
|
346
|
+
return mvfail(pool, "%s", what);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
ok = 1 == EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL) &&
|
|
350
|
+
1 == EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, MV_IVLEN, NULL) &&
|
|
351
|
+
1 == EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, box.iv.data) &&
|
|
352
|
+
1 == EVP_DecryptUpdate(ctx, NULL, &len, (const unsigned char *)aad, (int)strlen(aad)) &&
|
|
353
|
+
1 == EVP_DecryptUpdate(ctx, out->data, &len, box.blob.data, (int)cut) &&
|
|
354
|
+
1 == EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, MV_TAGLEN,
|
|
355
|
+
(void *)(box.blob.data + cut)) &&
|
|
356
|
+
0 < EVP_DecryptFinal_ex(ctx, out->data + len, &len);
|
|
357
|
+
|
|
358
|
+
EVP_CIPHER_CTX_free(ctx);
|
|
359
|
+
|
|
360
|
+
return ok ? NULL : mvfail(pool, "%s", what);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* ---- base64 -------------------------------------------------------- */
|
|
364
|
+
|
|
365
|
+
static const char MV_B64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
366
|
+
|
|
367
|
+
/* Here rather than in `encode.c`, so that a link of this plugin pulls no
|
|
368
|
+
* percent-encoder and a link of an HTTP store pulls no base64 ENCODER.
|
|
369
|
+
* `sek_unbase64` stays where it is: four HTTP stores need it and this
|
|
370
|
+
* plugin needs a decoder too, so the decoder is shared and the encoder,
|
|
371
|
+
* which only this plugin has ever needed, is not. */
|
|
372
|
+
static char *mvb64(sek_pool *pool, mvbytes raw) {
|
|
373
|
+
size_t groups = (raw.len + 2) / 3;
|
|
374
|
+
char *out = (char *)sek_alloc(pool, groups * 4 + 1);
|
|
375
|
+
size_t at = 0;
|
|
376
|
+
size_t index;
|
|
377
|
+
|
|
378
|
+
for (index = 0; index < raw.len; index += 3) {
|
|
379
|
+
unsigned long triple = (unsigned long)raw.data[index] << 16;
|
|
380
|
+
size_t left = raw.len - index;
|
|
381
|
+
|
|
382
|
+
if (1 < left) {
|
|
383
|
+
triple |= (unsigned long)raw.data[index + 1] << 8;
|
|
384
|
+
}
|
|
385
|
+
if (2 < left) {
|
|
386
|
+
triple |= (unsigned long)raw.data[index + 2];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
out[at++] = MV_B64[(triple >> 18) & 0x3f];
|
|
390
|
+
out[at++] = MV_B64[(triple >> 12) & 0x3f];
|
|
391
|
+
out[at++] = 1 < left ? MV_B64[(triple >> 6) & 0x3f] : '=';
|
|
392
|
+
out[at++] = 2 < left ? MV_B64[triple & 0x3f] : '=';
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
out[at] = '\0';
|
|
396
|
+
|
|
397
|
+
return out;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
static sek_err mvunb64(sek_pool *pool, const char *text, const char *what, mvbytes *out) {
|
|
401
|
+
size_t len = 0;
|
|
402
|
+
unsigned char *raw = sek_empty(text) ? NULL : sek_unbase64(pool, text, &len);
|
|
403
|
+
|
|
404
|
+
out->data = NULL;
|
|
405
|
+
out->len = 0;
|
|
406
|
+
|
|
407
|
+
if (NULL == raw) {
|
|
408
|
+
return mvfail(pool, "missing %s", what);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
out->data = raw;
|
|
412
|
+
out->len = len;
|
|
413
|
+
|
|
414
|
+
return NULL;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* ---- the file ------------------------------------------------------ */
|
|
418
|
+
|
|
419
|
+
typedef struct {
|
|
420
|
+
const char *id;
|
|
421
|
+
mvbytes salt;
|
|
422
|
+
int iters;
|
|
423
|
+
mvsealed ring;
|
|
424
|
+
mvsealed meta;
|
|
425
|
+
} mvkeyrecord;
|
|
426
|
+
|
|
427
|
+
typedef struct {
|
|
428
|
+
mvbytes id;
|
|
429
|
+
mvsealed name;
|
|
430
|
+
mvsealed value;
|
|
431
|
+
} mventryrecord;
|
|
432
|
+
|
|
433
|
+
typedef struct {
|
|
434
|
+
sek_pool *pool;
|
|
435
|
+
mvkeyrecord *keys;
|
|
436
|
+
size_t keylen;
|
|
437
|
+
size_t keycap;
|
|
438
|
+
mventryrecord *entries;
|
|
439
|
+
size_t entrylen;
|
|
440
|
+
size_t entrycap;
|
|
441
|
+
} mvfile;
|
|
442
|
+
|
|
443
|
+
static void mvaddkey(mvfile *file, mvkeyrecord record) {
|
|
444
|
+
if (file->keylen == file->keycap) {
|
|
445
|
+
size_t cap = 0 == file->keycap ? 4 : file->keycap * 2;
|
|
446
|
+
mvkeyrecord *bigger = (mvkeyrecord *)sek_alloc(file->pool, cap * sizeof(mvkeyrecord));
|
|
447
|
+
if (0 < file->keylen) {
|
|
448
|
+
memcpy(bigger, file->keys, file->keylen * sizeof(mvkeyrecord));
|
|
449
|
+
}
|
|
450
|
+
file->keys = bigger;
|
|
451
|
+
file->keycap = cap;
|
|
452
|
+
}
|
|
453
|
+
file->keys[file->keylen++] = record;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
static void mvaddentry(mvfile *file, mventryrecord record) {
|
|
457
|
+
if (file->entrylen == file->entrycap) {
|
|
458
|
+
size_t cap = 0 == file->entrycap ? 8 : file->entrycap * 2;
|
|
459
|
+
mventryrecord *bigger = (mventryrecord *)sek_alloc(file->pool, cap * sizeof(mventryrecord));
|
|
460
|
+
if (0 < file->entrylen) {
|
|
461
|
+
memcpy(bigger, file->entries, file->entrylen * sizeof(mventryrecord));
|
|
462
|
+
}
|
|
463
|
+
file->entries = bigger;
|
|
464
|
+
file->entrycap = cap;
|
|
465
|
+
}
|
|
466
|
+
file->entries[file->entrylen++] = record;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
static mvkeyrecord *mvkeyof(mvfile *file, const char *id) {
|
|
470
|
+
size_t at;
|
|
471
|
+
for (at = 0; at < file->keylen; at++) {
|
|
472
|
+
if (0 == strcmp(id, file->keys[at].id)) {
|
|
473
|
+
return &file->keys[at];
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return NULL;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
static mventryrecord *mventryof(mvfile *file, mvbytes id) {
|
|
480
|
+
size_t at;
|
|
481
|
+
for (at = 0; at < file->entrylen; at++) {
|
|
482
|
+
if (mvsame(id, file->entries[at].id)) {
|
|
483
|
+
return &file->entries[at];
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return NULL;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* A cursor, so that every length check is in one place: a truncated
|
|
490
|
+
* vault is refused rather than read as a short one. */
|
|
491
|
+
typedef struct {
|
|
492
|
+
const unsigned char *bytes;
|
|
493
|
+
size_t len;
|
|
494
|
+
size_t at;
|
|
495
|
+
int bad;
|
|
496
|
+
} mvreader;
|
|
497
|
+
|
|
498
|
+
/* Reads `length` bytes, or records the refusal.
|
|
499
|
+
*
|
|
500
|
+
* The bound is checked AGAINST WHAT IS LEFT, never by adding the length
|
|
501
|
+
* to `at`: a damaged vault can encode a length near 0xffffffff, and the
|
|
502
|
+
* sum would wrap on a 32-bit size_t and hand back a slice the caller had
|
|
503
|
+
* no business seeing. */
|
|
504
|
+
static mvbytes mvtake(mvreader *read, unsigned long length) {
|
|
505
|
+
mvbytes out;
|
|
506
|
+
|
|
507
|
+
out.data = NULL;
|
|
508
|
+
out.len = 0;
|
|
509
|
+
|
|
510
|
+
if (read->bad) {
|
|
511
|
+
return out;
|
|
512
|
+
}
|
|
513
|
+
if ((unsigned long)(read->len - read->at) < length) {
|
|
514
|
+
read->bad = 1;
|
|
515
|
+
return out;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
out.data = (unsigned char *)read->bytes + read->at;
|
|
519
|
+
out.len = (size_t)length;
|
|
520
|
+
read->at += (size_t)length;
|
|
521
|
+
|
|
522
|
+
return out;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
static unsigned int mvu8(mvreader *read) {
|
|
526
|
+
mvbytes out = mvtake(read, 1);
|
|
527
|
+
return 0 == out.len ? 0 : out.data[0];
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
static unsigned long mvu32(mvreader *read) {
|
|
531
|
+
mvbytes out = mvtake(read, 4);
|
|
532
|
+
if (4 != out.len) {
|
|
533
|
+
return 0;
|
|
534
|
+
}
|
|
535
|
+
return ((unsigned long)out.data[0] << 24) | ((unsigned long)out.data[1] << 16) |
|
|
536
|
+
((unsigned long)out.data[2] << 8) | (unsigned long)out.data[3];
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
static mvbytes mvsmall(mvreader *read) { return mvtake(read, mvu8(read)); }
|
|
540
|
+
static mvbytes mvlarge(mvreader *read) { return mvtake(read, mvu32(read)); }
|
|
541
|
+
|
|
542
|
+
static mvsealed mvreadsealed(mvreader *read) {
|
|
543
|
+
mvsealed out;
|
|
544
|
+
/* The iv is read before the blob, and the two statements keep that
|
|
545
|
+
* order; a struct initialiser would not, because C leaves the order of
|
|
546
|
+
* evaluation of its members unspecified. */
|
|
547
|
+
out.iv = mvsmall(read);
|
|
548
|
+
out.blob = mvlarge(read);
|
|
549
|
+
return out;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
static sek_err mvreadfile(sek_pool *pool, mvbytes raw, mvfile *out) {
|
|
553
|
+
mvreader read;
|
|
554
|
+
mvbytes magic;
|
|
555
|
+
unsigned int version, kdf, cipher;
|
|
556
|
+
unsigned long count;
|
|
557
|
+
unsigned long index;
|
|
558
|
+
|
|
559
|
+
memset(&read, 0, sizeof(read));
|
|
560
|
+
read.bytes = raw.data;
|
|
561
|
+
read.len = raw.len;
|
|
562
|
+
|
|
563
|
+
memset(out, 0, sizeof(*out));
|
|
564
|
+
out->pool = pool;
|
|
565
|
+
|
|
566
|
+
magic = mvtake(&read, 4);
|
|
567
|
+
if (4 != magic.len) {
|
|
568
|
+
return mvfail(pool, "the vault file is truncated");
|
|
569
|
+
}
|
|
570
|
+
if (0 != memcmp(MV_MAGIC, magic.data, 4)) {
|
|
571
|
+
return mvfail(pool, "not a vault file");
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
version = mvu8(&read);
|
|
575
|
+
if (read.bad) {
|
|
576
|
+
return mvfail(pool, "the vault file is truncated");
|
|
577
|
+
}
|
|
578
|
+
if (MV_FORMAT != version) {
|
|
579
|
+
return mvfail(pool, "unsupported format version: %u", version);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
kdf = mvu8(&read);
|
|
583
|
+
cipher = mvu8(&read);
|
|
584
|
+
if (read.bad) {
|
|
585
|
+
return mvfail(pool, "the vault file is truncated");
|
|
586
|
+
}
|
|
587
|
+
if (MV_KDF_PBKDF2 != kdf || MV_CIPHER_AESGCM != cipher) {
|
|
588
|
+
return mvfail(pool, "unsupported kdf or cipher: %u/%u", kdf, cipher);
|
|
589
|
+
}
|
|
590
|
+
mvu8(&read);
|
|
591
|
+
|
|
592
|
+
/* A COUNT IS BOUNDED BY WHAT IS LEFT. Each record carries at least a
|
|
593
|
+
* few bytes, so a file claiming four billion of them is damaged; the
|
|
594
|
+
* loop would find that out one truncation at a time, and this never
|
|
595
|
+
* allocates per claimed record before the bytes are there. */
|
|
596
|
+
count = mvu32(&read);
|
|
597
|
+
if ((unsigned long)(read.len - read.at) < count) {
|
|
598
|
+
return mvfail(pool, "the vault file is truncated");
|
|
599
|
+
}
|
|
600
|
+
for (index = 0; index < count && !read.bad; index++) {
|
|
601
|
+
mvkeyrecord record;
|
|
602
|
+
record.id = mvtext(pool, mvsmall(&read));
|
|
603
|
+
record.salt = mvsmall(&read);
|
|
604
|
+
record.iters = (int)mvu32(&read);
|
|
605
|
+
record.ring = mvreadsealed(&read);
|
|
606
|
+
record.meta = mvreadsealed(&read);
|
|
607
|
+
mvaddkey(out, record);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
count = mvu32(&read);
|
|
611
|
+
if ((unsigned long)(read.len - read.at) < count) {
|
|
612
|
+
return mvfail(pool, "the vault file is truncated");
|
|
613
|
+
}
|
|
614
|
+
for (index = 0; index < count && !read.bad; index++) {
|
|
615
|
+
mventryrecord record;
|
|
616
|
+
record.id = mvsmall(&read);
|
|
617
|
+
record.name = mvreadsealed(&read);
|
|
618
|
+
record.value = mvreadsealed(&read);
|
|
619
|
+
mvaddentry(out, record);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
if (read.bad) {
|
|
623
|
+
return mvfail(pool, "the vault file is truncated");
|
|
624
|
+
}
|
|
625
|
+
if (read.at != read.len) {
|
|
626
|
+
return mvfail(pool, "the vault file has trailing bytes");
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
return NULL;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
static void mvwriteu8(sek_buf *buf, unsigned int value) {
|
|
633
|
+
sek_buf_addch(buf, (char)(value & 0xff));
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
static void mvwriteu32(sek_buf *buf, unsigned long value) {
|
|
637
|
+
mvwriteu8(buf, (unsigned int)((value >> 24) & 0xff));
|
|
638
|
+
mvwriteu8(buf, (unsigned int)((value >> 16) & 0xff));
|
|
639
|
+
mvwriteu8(buf, (unsigned int)((value >> 8) & 0xff));
|
|
640
|
+
mvwriteu8(buf, (unsigned int)(value & 0xff));
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
static void mvwritesmall(sek_buf *buf, mvbytes value) {
|
|
644
|
+
mvwriteu8(buf, (unsigned int)value.len);
|
|
645
|
+
sek_buf_addn(buf, (const char *)value.data, value.len);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
static void mvwritelarge(sek_buf *buf, mvbytes value) {
|
|
649
|
+
mvwriteu32(buf, (unsigned long)value.len);
|
|
650
|
+
sek_buf_addn(buf, (const char *)value.data, value.len);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
static void mvwritesealed(sek_buf *buf, mvsealed value) {
|
|
654
|
+
mvwritesmall(buf, value.iv);
|
|
655
|
+
mvwritelarge(buf, value.blob);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
static int mvbyid(const void *left, const void *right) {
|
|
659
|
+
const mventryrecord *a = (const mventryrecord *)left;
|
|
660
|
+
const mventryrecord *b = (const mventryrecord *)right;
|
|
661
|
+
size_t shorter = a->id.len < b->id.len ? a->id.len : b->id.len;
|
|
662
|
+
int order = 0 == shorter ? 0 : memcmp(a->id.data, b->id.data, shorter);
|
|
663
|
+
|
|
664
|
+
if (0 != order) {
|
|
665
|
+
return order;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
return a->id.len < b->id.len ? -1 : (a->id.len > b->id.len ? 1 : 0);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
static mvbytes mvwritefile(sek_pool *pool, mvfile *file) {
|
|
672
|
+
sek_buf buf;
|
|
673
|
+
mventryrecord *sorted;
|
|
674
|
+
mvbytes out;
|
|
675
|
+
size_t at;
|
|
676
|
+
|
|
677
|
+
sek_buf_init(&buf, pool);
|
|
678
|
+
sek_buf_add(&buf, MV_MAGIC);
|
|
679
|
+
mvwriteu8(&buf, MV_FORMAT);
|
|
680
|
+
mvwriteu8(&buf, MV_KDF_PBKDF2);
|
|
681
|
+
mvwriteu8(&buf, MV_CIPHER_AESGCM);
|
|
682
|
+
mvwriteu8(&buf, 0);
|
|
683
|
+
|
|
684
|
+
mvwriteu32(&buf, (unsigned long)file->keylen);
|
|
685
|
+
for (at = 0; at < file->keylen; at++) {
|
|
686
|
+
mvwritesmall(&buf, mvoftext(pool, file->keys[at].id));
|
|
687
|
+
mvwritesmall(&buf, file->keys[at].salt);
|
|
688
|
+
mvwriteu32(&buf, (unsigned long)file->keys[at].iters);
|
|
689
|
+
mvwritesealed(&buf, file->keys[at].ring);
|
|
690
|
+
mvwritesealed(&buf, file->keys[at].meta);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/* SORTED BY ID, which is a blinded value: the file therefore records
|
|
694
|
+
* nothing about the order secrets were written in. */
|
|
695
|
+
sorted = (mventryrecord *)sek_alloc(pool, (0 == file->entrylen ? 1 : file->entrylen) *
|
|
696
|
+
sizeof(mventryrecord));
|
|
697
|
+
if (0 < file->entrylen) {
|
|
698
|
+
memcpy(sorted, file->entries, file->entrylen * sizeof(mventryrecord));
|
|
699
|
+
qsort(sorted, file->entrylen, sizeof(mventryrecord), mvbyid);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
mvwriteu32(&buf, (unsigned long)file->entrylen);
|
|
703
|
+
for (at = 0; at < file->entrylen; at++) {
|
|
704
|
+
mvwritesmall(&buf, sorted[at].id);
|
|
705
|
+
mvwritesealed(&buf, sorted[at].name);
|
|
706
|
+
mvwritesealed(&buf, sorted[at].value);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
out.data = (unsigned char *)buf.data;
|
|
710
|
+
out.len = buf.len;
|
|
711
|
+
|
|
712
|
+
return out;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/* ---- the vault ----------------------------------------------------- */
|
|
716
|
+
|
|
717
|
+
typedef struct {
|
|
718
|
+
const char *name;
|
|
719
|
+
mvbytes key;
|
|
720
|
+
} mvgrant;
|
|
721
|
+
|
|
722
|
+
/* THE LOCK EVERY HANDLE ON ONE FILE SHARES.
|
|
723
|
+
*
|
|
724
|
+
* Each handle is its own object, so two handles on one path did not
|
|
725
|
+
* coordinate: both could finish `mvload` before either saved, and the
|
|
726
|
+
* second rename then discarded the first one's change while reporting
|
|
727
|
+
* success. Keyed by the ABSOLUTE path, so two handles spelled differently
|
|
728
|
+
* still meet.
|
|
729
|
+
*
|
|
730
|
+
* A guarantee WITHIN one process, which is what DOCS.md promises and what
|
|
731
|
+
* the go port arranges the same way. Two processes still race, and the
|
|
732
|
+
* format's answer to that is the exclusive create and the atomic rename:
|
|
733
|
+
* a reader sees one whole vault or the other, never half of one.
|
|
734
|
+
*
|
|
735
|
+
* MALLOC, NOT A POOL. This table outlives every handle in it and every
|
|
736
|
+
* pool a caller owns, and freeing a mutex a thread might still be waiting
|
|
737
|
+
* on is the bug it exists to avoid. A mutex is small and a process opens
|
|
738
|
+
* few vaults, so it is made once and never dropped.
|
|
739
|
+
*
|
|
740
|
+
* THE PORT LINKS -lpthread FOR THIS, and nothing else. On glibc 2.34 and
|
|
741
|
+
* later those symbols are in libc and the flag is a no-op; elsewhere it
|
|
742
|
+
* is what a POSIX program links to hold a lock. */
|
|
743
|
+
typedef struct {
|
|
744
|
+
char *file;
|
|
745
|
+
/* A POINTER, and the table holds pointers rather than mutexes by value:
|
|
746
|
+
* `realloc` MOVES the array, and every caller already holding a lock
|
|
747
|
+
* would be holding one at the old address. */
|
|
748
|
+
pthread_mutex_t *lock;
|
|
749
|
+
} mvheld;
|
|
750
|
+
|
|
751
|
+
static pthread_mutex_t MV_LOCKSMUTEX = PTHREAD_MUTEX_INITIALIZER;
|
|
752
|
+
static mvheld *MV_LOCKS = NULL;
|
|
753
|
+
static size_t MV_LOCKCOUNT = 0;
|
|
754
|
+
|
|
755
|
+
static pthread_mutex_t *mvlockfor(const char *file) {
|
|
756
|
+
char *key = realpath(file, NULL);
|
|
757
|
+
const char *want = NULL == key ? file : key;
|
|
758
|
+
pthread_mutex_t *made = NULL;
|
|
759
|
+
char *owned = NULL;
|
|
760
|
+
mvheld *grown;
|
|
761
|
+
size_t at;
|
|
762
|
+
|
|
763
|
+
pthread_mutex_lock(&MV_LOCKSMUTEX);
|
|
764
|
+
|
|
765
|
+
for (at = 0; at < MV_LOCKCOUNT; at++) {
|
|
766
|
+
if (0 == strcmp(MV_LOCKS[at].file, want)) {
|
|
767
|
+
pthread_mutex_t *found = MV_LOCKS[at].lock;
|
|
768
|
+
pthread_mutex_unlock(&MV_LOCKSMUTEX);
|
|
769
|
+
free(key);
|
|
770
|
+
return found;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (NULL != key) {
|
|
775
|
+
owned = key;
|
|
776
|
+
} else {
|
|
777
|
+
owned = malloc(strlen(want) + 1);
|
|
778
|
+
if (NULL != owned) {
|
|
779
|
+
memcpy(owned, want, strlen(want) + 1);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
made = malloc(sizeof(pthread_mutex_t));
|
|
784
|
+
grown = realloc(MV_LOCKS, (MV_LOCKCOUNT + 1) * sizeof(mvheld));
|
|
785
|
+
|
|
786
|
+
if (NULL == owned || NULL == made || NULL == grown) {
|
|
787
|
+
if (NULL != grown) {
|
|
788
|
+
MV_LOCKS = grown;
|
|
789
|
+
}
|
|
790
|
+
pthread_mutex_unlock(&MV_LOCKSMUTEX);
|
|
791
|
+
free(owned);
|
|
792
|
+
free(made);
|
|
793
|
+
return NULL;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
MV_LOCKS = grown;
|
|
797
|
+
pthread_mutex_init(made, NULL);
|
|
798
|
+
MV_LOCKS[MV_LOCKCOUNT].file = owned;
|
|
799
|
+
MV_LOCKS[MV_LOCKCOUNT].lock = made;
|
|
800
|
+
MV_LOCKCOUNT++;
|
|
801
|
+
|
|
802
|
+
pthread_mutex_unlock(&MV_LOCKSMUTEX);
|
|
803
|
+
|
|
804
|
+
return made;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
struct sek_minivault {
|
|
808
|
+
sek_pool *pool;
|
|
809
|
+
const char *file;
|
|
810
|
+
const char *key;
|
|
811
|
+
const char *passphrase;
|
|
812
|
+
int iterations;
|
|
813
|
+
int create;
|
|
814
|
+
/* Where MV_VAULTS holds this handle, so that a definition can export
|
|
815
|
+
* an index; see MV_VAULTS. */
|
|
816
|
+
size_t slot;
|
|
817
|
+
|
|
818
|
+
/* The derived state, kept between calls: stretching a passphrase once
|
|
819
|
+
* per lookup is what this caching exists to avoid. */
|
|
820
|
+
int opened;
|
|
821
|
+
sek_vaultinfo info;
|
|
822
|
+
int hasroot;
|
|
823
|
+
mvbytes root;
|
|
824
|
+
mvgrant *grants;
|
|
825
|
+
size_t grantlen;
|
|
826
|
+
/* THE SEALED RING THIS WAS DERIVED FROM, kept so that every later call
|
|
827
|
+
* can check the file still says the same thing. A handle that cached
|
|
828
|
+
* its keys and never looked again kept reading a vault after its key
|
|
829
|
+
* was revoked, which is the one thing `revoke` promises. */
|
|
830
|
+
mvsealed ring;
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
/* The vaults this object has built.
|
|
834
|
+
*
|
|
835
|
+
* voxgig/plugin's values are numbers and strings, never pointers, so a
|
|
836
|
+
* definition exports the INDEX of what it made and the reader looks it
|
|
837
|
+
* up - exactly as `provider_define` exports an index into the core's
|
|
838
|
+
* construction slot. That slot is scoped to one `sek_new` and this one
|
|
839
|
+
* is not, because `sek_vaultof` is called afterwards, so this list is
|
|
840
|
+
* malloc'd rather than pool-owned: a pool-owned list would be freed
|
|
841
|
+
* while the file-scope pointer still named it.
|
|
842
|
+
*
|
|
843
|
+
* It never shrinks: one pointer per minivault store ever constructed,
|
|
844
|
+
* which is strictly less than the per-chain growth of voxgig/plugin's
|
|
845
|
+
* own arena that sek_pool_free's comment already documents. A vault
|
|
846
|
+
* itself is pool-owned like everything else here and dies with its pool,
|
|
847
|
+
* and reading one afterwards is the same use-after-free as reading any
|
|
848
|
+
* other pointer this library returned.
|
|
849
|
+
*
|
|
850
|
+
* ONE CONSTRUCTION AT A TIME, as sek_new says of itself. */
|
|
851
|
+
static sek_minivault **MV_VAULTS = NULL;
|
|
852
|
+
static size_t MV_VAULTLEN = 0;
|
|
853
|
+
static size_t MV_VAULTCAP = 0;
|
|
854
|
+
|
|
855
|
+
static int mvkeep(sek_minivault *vault, size_t *out) {
|
|
856
|
+
if (MV_VAULTLEN == MV_VAULTCAP) {
|
|
857
|
+
size_t cap = 0 == MV_VAULTCAP ? 8 : MV_VAULTCAP * 2;
|
|
858
|
+
sek_minivault **bigger =
|
|
859
|
+
(sek_minivault **)realloc(MV_VAULTS, cap * sizeof(sek_minivault *));
|
|
860
|
+
if (NULL == bigger) {
|
|
861
|
+
return 0;
|
|
862
|
+
}
|
|
863
|
+
MV_VAULTS = bigger;
|
|
864
|
+
MV_VAULTCAP = cap;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
MV_VAULTS[MV_VAULTLEN] = vault;
|
|
868
|
+
*out = MV_VAULTLEN++;
|
|
869
|
+
|
|
870
|
+
return 1;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
const char *sek_vault_file(sek_minivault *vault) { return vault->file; }
|
|
874
|
+
const char *sek_vault_key(sek_minivault *vault) { return vault->key; }
|
|
875
|
+
|
|
876
|
+
void sek_vault_close(sek_minivault *vault) {
|
|
877
|
+
vault->opened = 0;
|
|
878
|
+
vault->hasroot = 0;
|
|
879
|
+
vault->grants = NULL;
|
|
880
|
+
vault->grantlen = 0;
|
|
881
|
+
memset(&vault->ring, 0, sizeof(vault->ring));
|
|
882
|
+
memset(&vault->info, 0, sizeof(vault->info));
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
sek_err sek_vault_open(sek_pool *pool, const sek_vaultoptions *options, sek_minivault **out) {
|
|
886
|
+
sek_minivault *vault;
|
|
887
|
+
const char *key;
|
|
888
|
+
sek_err err;
|
|
889
|
+
|
|
890
|
+
*out = NULL;
|
|
891
|
+
|
|
892
|
+
if (NULL == options || sek_empty(options->file)) {
|
|
893
|
+
return mvfail(pool, "a vault needs a file");
|
|
894
|
+
}
|
|
895
|
+
if (sek_empty(options->passphrase)) {
|
|
896
|
+
return mvfail(pool, "a vault needs a passphrase");
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
key = sek_empty(options->key) ? SEK_VAULT_MASTERKEY : options->key;
|
|
900
|
+
|
|
901
|
+
err = mvcheckid(pool, key, "a vault needs a key id");
|
|
902
|
+
if (NULL != err) {
|
|
903
|
+
return err;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
vault = (sek_minivault *)sek_alloc(pool, sizeof(sek_minivault));
|
|
907
|
+
vault->pool = pool;
|
|
908
|
+
vault->file = sek_strdup(pool, options->file);
|
|
909
|
+
vault->key = sek_strdup(pool, key);
|
|
910
|
+
vault->passphrase = sek_strdup(pool, options->passphrase);
|
|
911
|
+
vault->iterations = 0 < options->iterations ? options->iterations : SEK_VAULT_ITERATIONS;
|
|
912
|
+
vault->create = options->create;
|
|
913
|
+
|
|
914
|
+
if (!mvkeep(vault, &vault->slot)) {
|
|
915
|
+
return mvfail(pool, "out of memory");
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
*out = vault;
|
|
919
|
+
|
|
920
|
+
return NULL;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/* ---- reading and writing the file ---------------------------------- */
|
|
924
|
+
|
|
925
|
+
/* The whole file as bytes.
|
|
926
|
+
*
|
|
927
|
+
* `sek_readfile` is the core's, and answers a C string: a vault is binary
|
|
928
|
+
* and full of NULs, so this reads its own. */
|
|
929
|
+
static sek_err mvslurp(sek_pool *pool, const char *path, mvbytes *out, int *why) {
|
|
930
|
+
sek_buf buf;
|
|
931
|
+
char chunk[8192];
|
|
932
|
+
int fd;
|
|
933
|
+
|
|
934
|
+
*why = 0;
|
|
935
|
+
sek_buf_init(&buf, pool);
|
|
936
|
+
|
|
937
|
+
fd = open(path, O_RDONLY);
|
|
938
|
+
if (0 > fd) {
|
|
939
|
+
*why = errno;
|
|
940
|
+
return mvfail(pool, "cannot read %s", path);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
for (;;) {
|
|
944
|
+
ssize_t got = read(fd, chunk, sizeof(chunk));
|
|
945
|
+
if (0 == got) {
|
|
946
|
+
break;
|
|
947
|
+
}
|
|
948
|
+
if (0 > got) {
|
|
949
|
+
if (EINTR == errno) {
|
|
950
|
+
continue;
|
|
951
|
+
}
|
|
952
|
+
*why = errno;
|
|
953
|
+
close(fd);
|
|
954
|
+
return mvfail(pool, "cannot read %s", path);
|
|
955
|
+
}
|
|
956
|
+
sek_buf_addn(&buf, chunk, (size_t)got);
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
close(fd);
|
|
960
|
+
|
|
961
|
+
out->data = (unsigned char *)buf.data;
|
|
962
|
+
out->len = buf.len;
|
|
963
|
+
|
|
964
|
+
return NULL;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/* Every byte, or the errno that stopped it. */
|
|
968
|
+
static sek_err mvspill(sek_pool *pool, const char *path, mvbytes raw, int exclusive, int *why) {
|
|
969
|
+
int fd;
|
|
970
|
+
size_t at = 0;
|
|
971
|
+
|
|
972
|
+
*why = 0;
|
|
973
|
+
|
|
974
|
+
/* Owner-only, because a vault file is the whole store. An exclusive
|
|
975
|
+
* create refuses an existing path and will not follow a symlink to
|
|
976
|
+
* make one, which is what makes the temporary below safe to name in a
|
|
977
|
+
* directory somebody else can write. */
|
|
978
|
+
fd = open(path, O_WRONLY | O_CREAT | (exclusive ? O_EXCL : O_TRUNC), 0600);
|
|
979
|
+
if (0 > fd) {
|
|
980
|
+
*why = errno;
|
|
981
|
+
return mvfail(pool, "cannot write %s", path);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
while (at < raw.len) {
|
|
985
|
+
ssize_t put = write(fd, raw.data + at, raw.len - at);
|
|
986
|
+
if (0 > put) {
|
|
987
|
+
if (EINTR == errno) {
|
|
988
|
+
continue;
|
|
989
|
+
}
|
|
990
|
+
*why = errno;
|
|
991
|
+
close(fd);
|
|
992
|
+
unlink(path);
|
|
993
|
+
return mvfail(pool, "cannot write %s", path);
|
|
994
|
+
}
|
|
995
|
+
at += (size_t)put;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
if (0 != close(fd)) {
|
|
999
|
+
*why = errno;
|
|
1000
|
+
unlink(path);
|
|
1001
|
+
return mvfail(pool, "cannot write %s", path);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
return NULL;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
/* Replaces the file rather than editing it in place. The rename is what
|
|
1008
|
+
* makes a concurrent reader see either the old file or the new one, so a
|
|
1009
|
+
* write interrupted halfway leaves a vault rather than wreckage.
|
|
1010
|
+
*
|
|
1011
|
+
* THE TEMPORARY IS RANDOM AND EXCLUSIVE. `<vault>.<pid>.tmp` is a name
|
|
1012
|
+
* anyone can predict, and an ordinary create FOLLOWS a symlink, so
|
|
1013
|
+
* anyone who could write the vault's directory could point that name at
|
|
1014
|
+
* another file and have the next save truncate it. */
|
|
1015
|
+
static sek_err mvsave(sek_minivault *vault, sek_pool *work, mvfile *file) {
|
|
1016
|
+
mvbytes suffix;
|
|
1017
|
+
const char *temp;
|
|
1018
|
+
sek_err err = mvrandom(work, 8, &suffix);
|
|
1019
|
+
int why = 0;
|
|
1020
|
+
|
|
1021
|
+
if (NULL != err) {
|
|
1022
|
+
return sek_strdup(vault->pool, err);
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
temp = sek_fmt(work, "%s.%s.tmp", vault->file, mvhex(work, suffix));
|
|
1026
|
+
|
|
1027
|
+
err = mvspill(work, temp, mvwritefile(work, file), 1, &why);
|
|
1028
|
+
if (NULL != err) {
|
|
1029
|
+
return mvfail(vault->pool, "cannot write %s", vault->file);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
if (0 != rename(temp, vault->file)) {
|
|
1033
|
+
/* The vault is unchanged either way, and the write error is what the
|
|
1034
|
+
* caller needs to be told about. */
|
|
1035
|
+
unlink(temp);
|
|
1036
|
+
return mvfail(vault->pool, "cannot write %s", vault->file);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
return NULL;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/* Writes a vault file that is not there yet, and REFUSES one that is.
|
|
1043
|
+
*
|
|
1044
|
+
* Straight to the target under an exclusive create rather than through a
|
|
1045
|
+
* temporary and a rename. A rename REPLACES its destination, so two
|
|
1046
|
+
* processes creating the same vault both succeeded and the second
|
|
1047
|
+
* discarded the first one's secrets; a stat beforehand only narrows that
|
|
1048
|
+
* window. There is nothing to lose by writing the target directly here,
|
|
1049
|
+
* because there is no file to damage: either this call creates it or it
|
|
1050
|
+
* fails. */
|
|
1051
|
+
static sek_err mvputnew(sek_minivault *vault, sek_pool *work, mvfile *file) {
|
|
1052
|
+
int why = 0;
|
|
1053
|
+
sek_err err = mvspill(work, vault->file, mvwritefile(work, file), 1, &why);
|
|
1054
|
+
|
|
1055
|
+
if (NULL == err) {
|
|
1056
|
+
return NULL;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
if (EEXIST == why) {
|
|
1060
|
+
return mvfail(vault->pool, "vault file already exists: %s", vault->file);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
return mvfail(vault->pool, "cannot write %s", vault->file);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
static sek_err mvsealkey(sek_pool *pool, mvbytes root, const char *id, const char *passphrase,
|
|
1067
|
+
int iters, const char *ring, const char *meta, mvkeyrecord *out) {
|
|
1068
|
+
sek_err err;
|
|
1069
|
+
|
|
1070
|
+
memset(out, 0, sizeof(*out));
|
|
1071
|
+
out->id = sek_strdup(pool, id);
|
|
1072
|
+
out->iters = iters;
|
|
1073
|
+
|
|
1074
|
+
err = mvrandom(pool, MV_SALTLEN, &out->salt);
|
|
1075
|
+
if (NULL == err) {
|
|
1076
|
+
mvbytes kek;
|
|
1077
|
+
err = mvkek(pool, passphrase, out->salt, iters, &kek);
|
|
1078
|
+
if (NULL == err) {
|
|
1079
|
+
err = mvseal(pool, kek, mvoftext(pool, ring), sek_fmt(pool, "%s%s", MV_AAD_RING, id),
|
|
1080
|
+
&out->ring);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
if (NULL == err) {
|
|
1084
|
+
err = mvseal(pool, mvmac(pool, root, MV_LABEL_META), mvoftext(pool, meta),
|
|
1085
|
+
sek_fmt(pool, "%s%s", MV_AAD_META, id), &out->meta);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
return err;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/* The one key record a new or rotated vault starts with: a master
|
|
1092
|
+
* holding the root, granted nothing because it needs nothing. */
|
|
1093
|
+
static sek_err mvmasterkey(sek_pool *pool, mvbytes root, const char *id, const char *passphrase,
|
|
1094
|
+
int iters, mvkeyrecord *out) {
|
|
1095
|
+
const char *ring = sek_fmt(pool, "{\"v\":%d,\"write\":true,\"root\":%s}", MV_FORMAT,
|
|
1096
|
+
sek_json_quote(pool, mvb64(pool, root)));
|
|
1097
|
+
const char *meta =
|
|
1098
|
+
sek_fmt(pool, "{\"v\":%d,\"master\":true,\"write\":true,\"grants\":[]}", MV_FORMAT);
|
|
1099
|
+
|
|
1100
|
+
return mvsealkey(pool, root, id, passphrase, iters, ring, meta, out);
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
static sek_err mvnewvault(sek_minivault *vault, sek_pool *work, const char *keyid,
|
|
1104
|
+
const char *passphrase, int iterations, mvfile *out) {
|
|
1105
|
+
mvbytes root;
|
|
1106
|
+
mvkeyrecord record;
|
|
1107
|
+
sek_err err = mvrandom(work, MV_KEYLEN, &root);
|
|
1108
|
+
|
|
1109
|
+
memset(out, 0, sizeof(*out));
|
|
1110
|
+
out->pool = work;
|
|
1111
|
+
|
|
1112
|
+
if (NULL == err) {
|
|
1113
|
+
err = mvmasterkey(work, root, keyid, passphrase, iterations, &record);
|
|
1114
|
+
}
|
|
1115
|
+
if (NULL != err) {
|
|
1116
|
+
return sek_strdup(vault->pool, err);
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
mvaddkey(out, record);
|
|
1120
|
+
|
|
1121
|
+
return NULL;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
static sek_err mvbytesof(sek_minivault *vault, sek_pool *work, mvbytes *out) {
|
|
1125
|
+
int why = 0;
|
|
1126
|
+
sek_err err = mvslurp(work, vault->file, out, &why);
|
|
1127
|
+
|
|
1128
|
+
if (NULL == err) {
|
|
1129
|
+
return NULL;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/* A vault is configured deliberately, with a key. Its absence is a
|
|
1133
|
+
* broken deployment and never "no secrets here": answering a miss
|
|
1134
|
+
* would send the chain on to a weaker store, which is the failure mode
|
|
1135
|
+
* this library most has to avoid. `create` is the caller saying the
|
|
1136
|
+
* opposite, in writing. */
|
|
1137
|
+
if (sek_absent(why)) {
|
|
1138
|
+
mvfile fresh;
|
|
1139
|
+
|
|
1140
|
+
if (!vault->create) {
|
|
1141
|
+
return mvfail(vault->pool, "no vault file: %s", vault->file);
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
err = mvnewvault(vault, work, vault->key, vault->passphrase, vault->iterations, &fresh);
|
|
1145
|
+
if (NULL == err) {
|
|
1146
|
+
err = mvputnew(vault, work, &fresh);
|
|
1147
|
+
}
|
|
1148
|
+
if (NULL != err) {
|
|
1149
|
+
return err;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
err = mvslurp(work, vault->file, out, &why);
|
|
1153
|
+
return NULL == err ? NULL : mvfail(vault->pool, "cannot read %s", vault->file);
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
return mvfail(vault->pool, "cannot read %s", vault->file);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
/* The file as this key sees it: the parse into `work`, and - the first
|
|
1160
|
+
* time, or whenever the file's record for this key has changed - this
|
|
1161
|
+
* key's ring unwrapped into the vault's own pool. */
|
|
1162
|
+
static sek_err mvload(sek_minivault *vault, sek_pool *work, mvfile *file) {
|
|
1163
|
+
sek_pool *keep = vault->pool;
|
|
1164
|
+
mvkeyrecord *record;
|
|
1165
|
+
mvbytes raw, kek, plain;
|
|
1166
|
+
sek_json *held, *grants;
|
|
1167
|
+
const char *root;
|
|
1168
|
+
sek_err err;
|
|
1169
|
+
size_t at;
|
|
1170
|
+
|
|
1171
|
+
err = mvbytesof(vault, work, &raw);
|
|
1172
|
+
if (NULL != err) {
|
|
1173
|
+
return err;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
err = mvreadfile(work, raw, file);
|
|
1177
|
+
if (NULL != err) {
|
|
1178
|
+
return sek_strdup(keep, err);
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
record = mvkeyof(file, vault->key);
|
|
1182
|
+
if (NULL == record) {
|
|
1183
|
+
/* REVOKED, or never there. Either way this handle is finished, and
|
|
1184
|
+
* dropping what it derived is what stops the next call answering
|
|
1185
|
+
* from memory. */
|
|
1186
|
+
sek_vault_close(vault);
|
|
1187
|
+
return mvfail(keep, "no such key: %s", vault->key);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/* The file still holds this key, and holds the SAME ring: a key
|
|
1191
|
+
* revoked and re-granted under another passphrase is a different key
|
|
1192
|
+
* wearing the id, and re-deriving is what refuses it. */
|
|
1193
|
+
if (vault->opened && mvsameseal(vault->ring, record->ring)) {
|
|
1194
|
+
return NULL;
|
|
1195
|
+
}
|
|
1196
|
+
sek_vault_close(vault);
|
|
1197
|
+
|
|
1198
|
+
err = mvkek(work, vault->passphrase, record->salt, record->iters, &kek);
|
|
1199
|
+
if (NULL != err) {
|
|
1200
|
+
return sek_strdup(keep, err);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
err = mvunseal(work, kek, record->ring, sek_fmt(work, "%s%s", MV_AAD_RING, vault->key),
|
|
1204
|
+
sek_fmt(work, "wrong passphrase for key %s, or a damaged vault", vault->key),
|
|
1205
|
+
&plain);
|
|
1206
|
+
if (NULL != err) {
|
|
1207
|
+
return sek_strdup(keep, err);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
held = sek_json_parse(work, mvtext(work, plain));
|
|
1211
|
+
if (NULL == held || SEK_JSON_OBJ != held->type) {
|
|
1212
|
+
return mvfail(keep, "unreadable key ring for %s", vault->key);
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
grants = sek_json_dig(held, "grants", NULL);
|
|
1216
|
+
vault->info.grants = sek_list_new(keep);
|
|
1217
|
+
|
|
1218
|
+
if (NULL != grants && SEK_JSON_OBJ == grants->type) {
|
|
1219
|
+
vault->grants = (mvgrant *)sek_alloc(keep, (0 == grants->maplen ? 1 : grants->maplen) *
|
|
1220
|
+
sizeof(mvgrant));
|
|
1221
|
+
for (at = 0; at < grants->maplen; at++) {
|
|
1222
|
+
mvbytes key;
|
|
1223
|
+
const char *text = sek_json_asstr(grants->vals[at]);
|
|
1224
|
+
err = mvunb64(work, text, "a granted key", &key);
|
|
1225
|
+
if (NULL != err) {
|
|
1226
|
+
sek_vault_close(vault);
|
|
1227
|
+
return sek_strdup(keep, err);
|
|
1228
|
+
}
|
|
1229
|
+
vault->grants[vault->grantlen].name = sek_strdup(keep, grants->keys[at]);
|
|
1230
|
+
vault->grants[vault->grantlen].key = mvcopy(keep, key.data, key.len);
|
|
1231
|
+
vault->grantlen++;
|
|
1232
|
+
sek_list_add(vault->info.grants, grants->keys[at]);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
sek_list_sort(vault->info.grants);
|
|
1237
|
+
|
|
1238
|
+
root = sek_json_asstr(sek_json_dig(held, "root", NULL));
|
|
1239
|
+
if (NULL != root) {
|
|
1240
|
+
mvbytes raw_root;
|
|
1241
|
+
err = mvunb64(work, root, "the root key", &raw_root);
|
|
1242
|
+
if (NULL != err) {
|
|
1243
|
+
sek_vault_close(vault);
|
|
1244
|
+
return sek_strdup(keep, err);
|
|
1245
|
+
}
|
|
1246
|
+
vault->root = mvcopy(keep, raw_root.data, raw_root.len);
|
|
1247
|
+
vault->hasroot = 1;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
vault->ring.iv = mvcopy(keep, record->ring.iv.data, record->ring.iv.len);
|
|
1251
|
+
vault->ring.blob = mvcopy(keep, record->ring.blob.data, record->ring.blob.len);
|
|
1252
|
+
|
|
1253
|
+
vault->info.key = vault->key;
|
|
1254
|
+
vault->info.master = vault->hasroot;
|
|
1255
|
+
vault->info.write = vault->hasroot || mvjsonbool(sek_json_dig(held, "write", NULL));
|
|
1256
|
+
vault->opened = 1;
|
|
1257
|
+
|
|
1258
|
+
return NULL;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/* The root key, or a refusal naming what needed it. */
|
|
1262
|
+
static sek_err mvrootof(sek_minivault *vault, const char *what, mvbytes *out) {
|
|
1263
|
+
if (!vault->hasroot) {
|
|
1264
|
+
return mvfail(vault->pool, "%s needs a master key, and %s is restricted", what, vault->key);
|
|
1265
|
+
}
|
|
1266
|
+
*out = vault->root;
|
|
1267
|
+
return NULL;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
/* The key for one name, or zero when this key cannot reach it. */
|
|
1271
|
+
static int mvkeyfor(sek_minivault *vault, sek_pool *work, const char *name, mvbytes *out) {
|
|
1272
|
+
size_t at;
|
|
1273
|
+
|
|
1274
|
+
if (vault->hasroot) {
|
|
1275
|
+
*out = mvsecretkey(work, vault->root, name);
|
|
1276
|
+
return 1;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
for (at = 0; at < vault->grantlen; at++) {
|
|
1280
|
+
if (0 == strcmp(name, vault->grants[at].name)) {
|
|
1281
|
+
*out = vault->grants[at].key;
|
|
1282
|
+
return 1;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
return 0;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
/* ---- what a caller asks ---------------------------------------------- */
|
|
1290
|
+
|
|
1291
|
+
/* A COPY. `set` asks this whether the key may write, and handing back the
|
|
1292
|
+
* record that answer lives in let a caller flip its own permission. */
|
|
1293
|
+
sek_err sek_vault_info(sek_minivault *vault, sek_vaultinfo **out) {
|
|
1294
|
+
sek_pool *work = sek_pool_new();
|
|
1295
|
+
mvfile file;
|
|
1296
|
+
sek_err err = mvload(vault, work, &file);
|
|
1297
|
+
sek_vaultinfo *copy;
|
|
1298
|
+
size_t at;
|
|
1299
|
+
|
|
1300
|
+
*out = NULL;
|
|
1301
|
+
sek_pool_free(work);
|
|
1302
|
+
|
|
1303
|
+
if (NULL != err) {
|
|
1304
|
+
return err;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
copy = (sek_vaultinfo *)sek_alloc(vault->pool, sizeof(sek_vaultinfo));
|
|
1308
|
+
copy->key = vault->info.key;
|
|
1309
|
+
copy->master = vault->info.master;
|
|
1310
|
+
copy->write = vault->info.write;
|
|
1311
|
+
copy->grants = sek_list_new(vault->pool);
|
|
1312
|
+
for (at = 0; at < vault->info.grants->len; at++) {
|
|
1313
|
+
sek_list_add(copy->grants, vault->info.grants->items[at]);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
*out = copy;
|
|
1317
|
+
|
|
1318
|
+
return NULL;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
sek_err sek_vault_list(sek_minivault *vault, sek_list **out) {
|
|
1322
|
+
sek_pool *work = sek_pool_new();
|
|
1323
|
+
sek_list *names = sek_list_new(vault->pool);
|
|
1324
|
+
mvfile file;
|
|
1325
|
+
sek_err err = mvload(vault, work, &file);
|
|
1326
|
+
size_t at;
|
|
1327
|
+
|
|
1328
|
+
*out = NULL;
|
|
1329
|
+
|
|
1330
|
+
if (NULL == err && vault->hasroot) {
|
|
1331
|
+
mvbytes namekey = mvmac(work, vault->root, MV_LABEL_NAMES);
|
|
1332
|
+
for (at = 0; at < file.entrylen && NULL == err; at++) {
|
|
1333
|
+
mvbytes plain;
|
|
1334
|
+
err = mvunseal(work, namekey, file.entries[at].name, MV_AAD_NAME, "a secret name is damaged",
|
|
1335
|
+
&plain);
|
|
1336
|
+
if (NULL == err) {
|
|
1337
|
+
sek_list_add(names, mvtext(work, plain));
|
|
1338
|
+
} else {
|
|
1339
|
+
err = sek_strdup(vault->pool, err);
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
} else if (NULL == err) {
|
|
1343
|
+
/* A restricted key has no name key, so it reports the grants it can
|
|
1344
|
+
* actually find: the vault never tells it what else is there. */
|
|
1345
|
+
for (at = 0; at < vault->info.grants->len; at++) {
|
|
1346
|
+
const char *name = vault->info.grants->items[at];
|
|
1347
|
+
mvbytes key;
|
|
1348
|
+
if (mvkeyfor(vault, work, name, &key) && NULL != mventryof(&file, mventryid(work, key))) {
|
|
1349
|
+
sek_list_add(names, name);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
sek_pool_free(work);
|
|
1355
|
+
|
|
1356
|
+
if (NULL != err) {
|
|
1357
|
+
return err;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
sek_list_sort(names);
|
|
1361
|
+
*out = names;
|
|
1362
|
+
|
|
1363
|
+
return NULL;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
sek_err sek_vault_get(sek_minivault *vault, const char *name, char **out) {
|
|
1367
|
+
sek_pool *work;
|
|
1368
|
+
mvfile file;
|
|
1369
|
+
mvbytes key, plain;
|
|
1370
|
+
mventryrecord *entry;
|
|
1371
|
+
sek_err err = sek_checkname(vault->pool, name);
|
|
1372
|
+
|
|
1373
|
+
*out = NULL;
|
|
1374
|
+
|
|
1375
|
+
if (NULL != err) {
|
|
1376
|
+
return err;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
work = sek_pool_new();
|
|
1380
|
+
err = mvload(vault, work, &file);
|
|
1381
|
+
|
|
1382
|
+
/* OUTSIDE THE GRANT IS A MISS, deliberately. The vault answers as the
|
|
1383
|
+
* key that opened it, so a name this key cannot read is a name this
|
|
1384
|
+
* store does not hold for this caller - the same answer a stranger's
|
|
1385
|
+
* vault gives, and the one that makes a restricted key in front of a
|
|
1386
|
+
* broader store a workable chain. */
|
|
1387
|
+
if (NULL == err && mvkeyfor(vault, work, name, &key)) {
|
|
1388
|
+
entry = mventryof(&file, mventryid(work, key));
|
|
1389
|
+
if (NULL != entry) {
|
|
1390
|
+
err = mvunseal(work, key, entry->value, sek_fmt(work, "%s%s", MV_AAD_SECRET, name),
|
|
1391
|
+
sek_fmt(work, "the value of %s is damaged", name), &plain);
|
|
1392
|
+
if (NULL == err) {
|
|
1393
|
+
*out = mvtext(vault->pool, plain);
|
|
1394
|
+
} else {
|
|
1395
|
+
err = sek_strdup(vault->pool, err);
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
sek_pool_free(work);
|
|
1401
|
+
|
|
1402
|
+
return err;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
sek_err sek_vault_has(sek_minivault *vault, const char *name, int *out) {
|
|
1406
|
+
char *found = NULL;
|
|
1407
|
+
sek_err err = sek_vault_get(vault, name, &found);
|
|
1408
|
+
|
|
1409
|
+
*out = NULL != found;
|
|
1410
|
+
|
|
1411
|
+
return err;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
static sek_err mvset(sek_minivault *vault, const char *name, const char *value) {
|
|
1415
|
+
sek_pool *work;
|
|
1416
|
+
mvfile file;
|
|
1417
|
+
mvbytes key, id;
|
|
1418
|
+
mvsealed box;
|
|
1419
|
+
mventryrecord *entry;
|
|
1420
|
+
sek_err err = sek_checkname(vault->pool, name);
|
|
1421
|
+
|
|
1422
|
+
if (NULL != err) {
|
|
1423
|
+
return err;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
work = sek_pool_new();
|
|
1427
|
+
err = mvload(vault, work, &file);
|
|
1428
|
+
|
|
1429
|
+
if (NULL == err && !vault->info.write) {
|
|
1430
|
+
err = mvfail(vault->pool, "key %s is read-only", vault->key);
|
|
1431
|
+
}
|
|
1432
|
+
if (NULL == err && !mvkeyfor(vault, work, name, &key)) {
|
|
1433
|
+
err = mvfail(vault->pool, "key %s was not granted %s", vault->key, name);
|
|
1434
|
+
}
|
|
1435
|
+
if (NULL == err) {
|
|
1436
|
+
err = mvseal(work, key, mvoftext(work, value), sek_fmt(work, "%s%s", MV_AAD_SECRET, name),
|
|
1437
|
+
&box);
|
|
1438
|
+
if (NULL != err) {
|
|
1439
|
+
err = sek_strdup(vault->pool, err);
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
if (NULL == err) {
|
|
1444
|
+
id = mventryid(work, key);
|
|
1445
|
+
entry = mventryof(&file, id);
|
|
1446
|
+
|
|
1447
|
+
if (NULL != entry) {
|
|
1448
|
+
entry->value = box;
|
|
1449
|
+
} else {
|
|
1450
|
+
/* A NEW NAME NEEDS THE NAME KEY, which only a master holds. So a
|
|
1451
|
+
* restricted key with `write` updates what it was granted and
|
|
1452
|
+
* cannot grow the vault, which is what "restricted" has to mean
|
|
1453
|
+
* for the grant list to stay the whole story. */
|
|
1454
|
+
mvbytes root;
|
|
1455
|
+
err = mvrootof(vault, sek_fmt(vault->pool, "creating the secret %s", name), &root);
|
|
1456
|
+
if (NULL == err) {
|
|
1457
|
+
mventryrecord made;
|
|
1458
|
+
mvsealed sealedname;
|
|
1459
|
+
err = mvseal(work, mvmac(work, root, MV_LABEL_NAMES), mvoftext(work, name), MV_AAD_NAME,
|
|
1460
|
+
&sealedname);
|
|
1461
|
+
if (NULL == err) {
|
|
1462
|
+
made.id = id;
|
|
1463
|
+
made.name = sealedname;
|
|
1464
|
+
made.value = box;
|
|
1465
|
+
mvaddentry(&file, made);
|
|
1466
|
+
} else {
|
|
1467
|
+
err = sek_strdup(vault->pool, err);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
if (NULL == err) {
|
|
1474
|
+
err = mvsave(vault, work, &file);
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
sek_pool_free(work);
|
|
1478
|
+
|
|
1479
|
+
return err;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
/* Every write on this file, from any handle in this process, serializes
|
|
1483
|
+
* here; see mvlockfor. */
|
|
1484
|
+
sek_err sek_vault_set(sek_minivault *vault, const char *name, const char *value) {
|
|
1485
|
+
sek_err err;
|
|
1486
|
+
pthread_mutex_t *one = mvlockfor(vault->file);
|
|
1487
|
+
|
|
1488
|
+
if (NULL == one) {
|
|
1489
|
+
return mvfail(vault->pool, "out of memory");
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
pthread_mutex_lock(one);
|
|
1493
|
+
err = mvset(vault, name, value);
|
|
1494
|
+
pthread_mutex_unlock(one);
|
|
1495
|
+
|
|
1496
|
+
return err;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
static sek_err mvremove(sek_minivault *vault, const char *name) {
|
|
1500
|
+
sek_pool *work;
|
|
1501
|
+
mvfile file;
|
|
1502
|
+
mvbytes root, want;
|
|
1503
|
+
sek_err err = sek_checkname(vault->pool, name);
|
|
1504
|
+
size_t at, kept = 0;
|
|
1505
|
+
int found = 0;
|
|
1506
|
+
|
|
1507
|
+
if (NULL != err) {
|
|
1508
|
+
return err;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
work = sek_pool_new();
|
|
1512
|
+
err = mvload(vault, work, &file);
|
|
1513
|
+
|
|
1514
|
+
if (NULL == err) {
|
|
1515
|
+
err = mvrootof(vault, "removing a secret", &root);
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
if (NULL == err) {
|
|
1519
|
+
want = mventryid(work, mvsecretkey(work, root, name));
|
|
1520
|
+
|
|
1521
|
+
for (at = 0; at < file.entrylen; at++) {
|
|
1522
|
+
if (!found && mvsame(want, file.entries[at].id)) {
|
|
1523
|
+
found = 1;
|
|
1524
|
+
continue;
|
|
1525
|
+
}
|
|
1526
|
+
file.entries[kept++] = file.entries[at];
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
if (found) {
|
|
1530
|
+
file.entrylen = kept;
|
|
1531
|
+
err = mvsave(vault, work, &file);
|
|
1532
|
+
} else {
|
|
1533
|
+
err = mvfail(vault->pool, "no such secret: %s", name);
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
sek_pool_free(work);
|
|
1538
|
+
|
|
1539
|
+
return err;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
/* Every write on this file, from any handle in this process, serializes
|
|
1543
|
+
* here; see mvlockfor. */
|
|
1544
|
+
sek_err sek_vault_remove(sek_minivault *vault, const char *name) {
|
|
1545
|
+
sek_err err;
|
|
1546
|
+
pthread_mutex_t *one = mvlockfor(vault->file);
|
|
1547
|
+
|
|
1548
|
+
if (NULL == one) {
|
|
1549
|
+
return mvfail(vault->pool, "out of memory");
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
pthread_mutex_lock(one);
|
|
1553
|
+
err = mvremove(vault, name);
|
|
1554
|
+
pthread_mutex_unlock(one);
|
|
1555
|
+
|
|
1556
|
+
return err;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
sek_err sek_vault_keys(sek_minivault *vault, sek_vaultinfo ***out, size_t *count) {
|
|
1560
|
+
sek_pool *work = sek_pool_new();
|
|
1561
|
+
mvfile file;
|
|
1562
|
+
mvbytes root, metakey;
|
|
1563
|
+
sek_err err = mvload(vault, work, &file);
|
|
1564
|
+
sek_vaultinfo **made = NULL;
|
|
1565
|
+
size_t at;
|
|
1566
|
+
|
|
1567
|
+
*out = NULL;
|
|
1568
|
+
*count = 0;
|
|
1569
|
+
|
|
1570
|
+
if (NULL == err) {
|
|
1571
|
+
err = mvrootof(vault, "listing the keys", &root);
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
if (NULL == err) {
|
|
1575
|
+
metakey = mvmac(work, root, MV_LABEL_META);
|
|
1576
|
+
made = (sek_vaultinfo **)sek_alloc(vault->pool, (0 == file.keylen ? 1 : file.keylen) *
|
|
1577
|
+
sizeof(sek_vaultinfo *));
|
|
1578
|
+
|
|
1579
|
+
for (at = 0; at < file.keylen && NULL == err; at++) {
|
|
1580
|
+
sek_vaultinfo *info = (sek_vaultinfo *)sek_alloc(vault->pool, sizeof(sek_vaultinfo));
|
|
1581
|
+
mvbytes plain;
|
|
1582
|
+
|
|
1583
|
+
info->key = sek_strdup(vault->pool, file.keys[at].id);
|
|
1584
|
+
info->grants = sek_list_new(vault->pool);
|
|
1585
|
+
|
|
1586
|
+
/* A record written under a root key this one has replaced is still
|
|
1587
|
+
* in the file and still opens with its own passphrase, so it is
|
|
1588
|
+
* reported rather than hidden - with what it can do unknown. */
|
|
1589
|
+
if (NULL == mvunseal(work, metakey, file.keys[at].meta,
|
|
1590
|
+
sek_fmt(work, "%s%s", MV_AAD_META, file.keys[at].id), "metadata",
|
|
1591
|
+
&plain)) {
|
|
1592
|
+
sek_json *noted = sek_json_parse(work, mvtext(work, plain));
|
|
1593
|
+
sek_json *grants;
|
|
1594
|
+
|
|
1595
|
+
if (NULL == noted || SEK_JSON_OBJ != noted->type) {
|
|
1596
|
+
err = mvfail(vault->pool, "unreadable metadata for key %s", file.keys[at].id);
|
|
1597
|
+
} else {
|
|
1598
|
+
info->master = mvjsonbool(sek_json_dig(noted, "master", NULL));
|
|
1599
|
+
info->write = mvjsonbool(sek_json_dig(noted, "write", NULL));
|
|
1600
|
+
|
|
1601
|
+
grants = sek_json_dig(noted, "grants", NULL);
|
|
1602
|
+
if (NULL != grants && SEK_JSON_ARR == grants->type) {
|
|
1603
|
+
size_t index;
|
|
1604
|
+
for (index = 0; index < grants->itemlen; index++) {
|
|
1605
|
+
const char *name = sek_json_asstr(grants->items[index]);
|
|
1606
|
+
if (NULL != name) {
|
|
1607
|
+
sek_list_add(info->grants, name);
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
sek_list_sort(info->grants);
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
made[at] = info;
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
if (NULL == err) {
|
|
1620
|
+
*out = made;
|
|
1621
|
+
*count = file.keylen;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
sek_pool_free(work);
|
|
1625
|
+
|
|
1626
|
+
return err;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
static sek_err mvmakegrant(sek_minivault *vault, const sek_vaultgrant *spec) {
|
|
1630
|
+
sek_pool *work = sek_pool_new();
|
|
1631
|
+
mvfile file;
|
|
1632
|
+
mvbytes root;
|
|
1633
|
+
sek_err err = mvload(vault, work, &file);
|
|
1634
|
+
sek_buf ring, meta;
|
|
1635
|
+
sek_list *names;
|
|
1636
|
+
mvkeyrecord record;
|
|
1637
|
+
size_t at;
|
|
1638
|
+
|
|
1639
|
+
if (NULL == err) {
|
|
1640
|
+
err = mvrootof(vault, "granting a key", &root);
|
|
1641
|
+
}
|
|
1642
|
+
if (NULL == err) {
|
|
1643
|
+
err = mvcheckid(vault->pool, NULL == spec ? NULL : spec->key, "a grant needs a key id");
|
|
1644
|
+
}
|
|
1645
|
+
if (NULL == err && sek_empty(spec->passphrase)) {
|
|
1646
|
+
err = mvfail(vault->pool, "a grant needs a passphrase");
|
|
1647
|
+
}
|
|
1648
|
+
if (NULL == err && NULL != mvkeyof(&file, spec->key)) {
|
|
1649
|
+
err = mvfail(vault->pool, "key already exists: %s", spec->key);
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
if (NULL != err) {
|
|
1653
|
+
sek_pool_free(work);
|
|
1654
|
+
return err;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
names = sek_list_new(work);
|
|
1658
|
+
if (NULL != spec->names) {
|
|
1659
|
+
for (at = 0; at < spec->names->len; at++) {
|
|
1660
|
+
sek_list_add(names, spec->names->items[at]);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
sek_list_sort(names);
|
|
1664
|
+
|
|
1665
|
+
/* Written out rather than built as a sek_json and stringified, because
|
|
1666
|
+
* `false` and `true` must be literals and the two documents are three
|
|
1667
|
+
* fields each. Every string goes through the JSON quoter: a name is
|
|
1668
|
+
* `[a-z0-9_.]` by the time it reaches here, but "this cannot contain a
|
|
1669
|
+
* quote" is exactly the assumption that stops being true when a rule
|
|
1670
|
+
* moves. */
|
|
1671
|
+
sek_buf_init(&ring, work);
|
|
1672
|
+
sek_buf_addfmt(&ring, "{\"v\":%d,\"write\":%s,\"grants\":{", MV_FORMAT,
|
|
1673
|
+
spec->write ? "true" : "false");
|
|
1674
|
+
|
|
1675
|
+
sek_buf_init(&meta, work);
|
|
1676
|
+
sek_buf_addfmt(&meta, "{\"v\":%d,\"master\":false,\"write\":%s,\"grants\":[", MV_FORMAT,
|
|
1677
|
+
spec->write ? "true" : "false");
|
|
1678
|
+
|
|
1679
|
+
for (at = 0; at < names->len && NULL == err; at++) {
|
|
1680
|
+
const char *name = names->items[at];
|
|
1681
|
+
|
|
1682
|
+
err = sek_checkname(vault->pool, name);
|
|
1683
|
+
if (NULL != err) {
|
|
1684
|
+
break;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
if (0 < at) {
|
|
1688
|
+
sek_buf_addch(&ring, ',');
|
|
1689
|
+
sek_buf_addch(&meta, ',');
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
sek_buf_addfmt(&ring, "%s:%s", sek_json_quote(work, name),
|
|
1693
|
+
sek_json_quote(work, mvb64(work, mvsecretkey(work, root, name))));
|
|
1694
|
+
sek_buf_add(&meta, sek_json_quote(work, name));
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
sek_buf_add(&ring, "}}");
|
|
1698
|
+
sek_buf_add(&meta, "]}");
|
|
1699
|
+
|
|
1700
|
+
if (NULL == err) {
|
|
1701
|
+
err = mvsealkey(work, root, spec->key, spec->passphrase,
|
|
1702
|
+
0 < spec->iterations ? spec->iterations : vault->iterations, ring.data,
|
|
1703
|
+
meta.data, &record);
|
|
1704
|
+
if (NULL != err) {
|
|
1705
|
+
err = sek_strdup(vault->pool, err);
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
if (NULL == err) {
|
|
1710
|
+
mvaddkey(&file, record);
|
|
1711
|
+
err = mvsave(vault, work, &file);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
sek_pool_free(work);
|
|
1715
|
+
|
|
1716
|
+
return err;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
/* Every write on this file, from any handle in this process, serializes
|
|
1720
|
+
* here; see mvlockfor. */
|
|
1721
|
+
sek_err sek_vault_grant(sek_minivault *vault, const sek_vaultgrant *spec) {
|
|
1722
|
+
sek_err err;
|
|
1723
|
+
pthread_mutex_t *one = mvlockfor(vault->file);
|
|
1724
|
+
|
|
1725
|
+
if (NULL == one) {
|
|
1726
|
+
return mvfail(vault->pool, "out of memory");
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
pthread_mutex_lock(one);
|
|
1730
|
+
err = mvmakegrant(vault, spec);
|
|
1731
|
+
pthread_mutex_unlock(one);
|
|
1732
|
+
|
|
1733
|
+
return err;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
static sek_err mvrevoke(sek_minivault *vault, const char *key) {
|
|
1737
|
+
sek_pool *work = sek_pool_new();
|
|
1738
|
+
mvfile file;
|
|
1739
|
+
mvbytes root;
|
|
1740
|
+
sek_err err = mvload(vault, work, &file);
|
|
1741
|
+
size_t at, kept = 0;
|
|
1742
|
+
|
|
1743
|
+
if (NULL == err) {
|
|
1744
|
+
err = mvrootof(vault, "revoking a key", &root);
|
|
1745
|
+
}
|
|
1746
|
+
if (NULL == err && !sek_empty(key) && 0 == strcmp(key, vault->key)) {
|
|
1747
|
+
err = mvfail(vault->pool, "a key cannot revoke itself: %s", key);
|
|
1748
|
+
}
|
|
1749
|
+
if (NULL == err && (sek_empty(key) || NULL == mvkeyof(&file, key))) {
|
|
1750
|
+
err = mvfail(vault->pool, "no such key: %s", sek_orempty(key));
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
if (NULL == err) {
|
|
1754
|
+
for (at = 0; at < file.keylen; at++) {
|
|
1755
|
+
if (0 != strcmp(key, file.keys[at].id)) {
|
|
1756
|
+
file.keys[kept++] = file.keys[at];
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
file.keylen = kept;
|
|
1760
|
+
|
|
1761
|
+
err = mvsave(vault, work, &file);
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
sek_pool_free(work);
|
|
1765
|
+
|
|
1766
|
+
return err;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
/* Every write on this file, from any handle in this process, serializes
|
|
1770
|
+
* here; see mvlockfor. */
|
|
1771
|
+
sek_err sek_vault_revoke(sek_minivault *vault, const char *key) {
|
|
1772
|
+
sek_err err;
|
|
1773
|
+
pthread_mutex_t *one = mvlockfor(vault->file);
|
|
1774
|
+
|
|
1775
|
+
if (NULL == one) {
|
|
1776
|
+
return mvfail(vault->pool, "out of memory");
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
pthread_mutex_lock(one);
|
|
1780
|
+
err = mvrevoke(vault, key);
|
|
1781
|
+
pthread_mutex_unlock(one);
|
|
1782
|
+
|
|
1783
|
+
return err;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
static sek_err mvrotate(sek_minivault *vault) {
|
|
1787
|
+
sek_pool *work = sek_pool_new();
|
|
1788
|
+
mvfile file, fresh;
|
|
1789
|
+
mvbytes oldroot, oldnamekey, root, namekey;
|
|
1790
|
+
sek_err err = mvload(vault, work, &file);
|
|
1791
|
+
sek_list *names = NULL;
|
|
1792
|
+
sek_list *values = NULL;
|
|
1793
|
+
mvkeyrecord record;
|
|
1794
|
+
int iters = 0;
|
|
1795
|
+
size_t at;
|
|
1796
|
+
|
|
1797
|
+
if (NULL == err) {
|
|
1798
|
+
err = mvrootof(vault, "rotating the vault", &oldroot);
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
if (NULL == err) {
|
|
1802
|
+
iters = mvkeyof(&file, vault->key)->iters;
|
|
1803
|
+
names = sek_list_new(work);
|
|
1804
|
+
values = sek_list_new(work);
|
|
1805
|
+
|
|
1806
|
+
/* Read everything out under the old root before anything changes:
|
|
1807
|
+
* once the root is replaced the old derived keys are unreachable. */
|
|
1808
|
+
oldnamekey = mvmac(work, oldroot, MV_LABEL_NAMES);
|
|
1809
|
+
|
|
1810
|
+
for (at = 0; at < file.entrylen && NULL == err; at++) {
|
|
1811
|
+
mvbytes plain, value;
|
|
1812
|
+
err = mvunseal(work, oldnamekey, file.entries[at].name, MV_AAD_NAME,
|
|
1813
|
+
"a secret name is damaged", &plain);
|
|
1814
|
+
if (NULL == err) {
|
|
1815
|
+
const char *name = mvtext(work, plain);
|
|
1816
|
+
err = mvunseal(work, mvsecretkey(work, oldroot, name), file.entries[at].value,
|
|
1817
|
+
sek_fmt(work, "%s%s", MV_AAD_SECRET, name),
|
|
1818
|
+
sek_fmt(work, "the value of %s is damaged", name), &value);
|
|
1819
|
+
if (NULL == err) {
|
|
1820
|
+
sek_list_add(names, name);
|
|
1821
|
+
sek_list_add(values, mvtext(work, value));
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
if (NULL != err) {
|
|
1825
|
+
err = sek_strdup(vault->pool, err);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
if (NULL == err) {
|
|
1831
|
+
err = mvrandom(work, MV_KEYLEN, &root);
|
|
1832
|
+
if (NULL != err) {
|
|
1833
|
+
err = sek_strdup(vault->pool, err);
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
if (NULL == err) {
|
|
1838
|
+
memset(&fresh, 0, sizeof(fresh));
|
|
1839
|
+
fresh.pool = work;
|
|
1840
|
+
namekey = mvmac(work, root, MV_LABEL_NAMES);
|
|
1841
|
+
|
|
1842
|
+
for (at = 0; at < names->len && NULL == err; at++) {
|
|
1843
|
+
const char *name = names->items[at];
|
|
1844
|
+
mvbytes key = mvsecretkey(work, root, name);
|
|
1845
|
+
mventryrecord made;
|
|
1846
|
+
|
|
1847
|
+
err = mvseal(work, namekey, mvoftext(work, name), MV_AAD_NAME, &made.name);
|
|
1848
|
+
if (NULL == err) {
|
|
1849
|
+
err = mvseal(work, key, mvoftext(work, values->items[at]),
|
|
1850
|
+
sek_fmt(work, "%s%s", MV_AAD_SECRET, name), &made.value);
|
|
1851
|
+
}
|
|
1852
|
+
if (NULL == err) {
|
|
1853
|
+
made.id = mventryid(work, key);
|
|
1854
|
+
mvaddentry(&fresh, made);
|
|
1855
|
+
} else {
|
|
1856
|
+
err = sek_strdup(vault->pool, err);
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
if (NULL == err) {
|
|
1862
|
+
err = mvmasterkey(work, root, vault->key, vault->passphrase, iters, &record);
|
|
1863
|
+
if (NULL != err) {
|
|
1864
|
+
err = sek_strdup(vault->pool, err);
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
if (NULL == err) {
|
|
1869
|
+
mvaddkey(&fresh, record);
|
|
1870
|
+
|
|
1871
|
+
/* SAVE FIRST, adopt second. A handle holding the new root over a
|
|
1872
|
+
* file that still holds the old one reads nothing and says the vault
|
|
1873
|
+
* is damaged, which is the wrong story about a failed write. */
|
|
1874
|
+
err = mvsave(vault, work, &fresh);
|
|
1875
|
+
|
|
1876
|
+
/* Dropped rather than replaced: the next call re-derives from the
|
|
1877
|
+
* file this one just wrote, which is the same rule every other
|
|
1878
|
+
* change follows. */
|
|
1879
|
+
if (NULL == err) {
|
|
1880
|
+
sek_vault_close(vault);
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
sek_pool_free(work);
|
|
1885
|
+
|
|
1886
|
+
return err;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
/* Every write on this file, from any handle in this process, serializes
|
|
1890
|
+
* here; see mvlockfor. */
|
|
1891
|
+
sek_err sek_vault_rotate(sek_minivault *vault) {
|
|
1892
|
+
sek_err err;
|
|
1893
|
+
pthread_mutex_t *one = mvlockfor(vault->file);
|
|
1894
|
+
|
|
1895
|
+
if (NULL == one) {
|
|
1896
|
+
return mvfail(vault->pool, "out of memory");
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
pthread_mutex_lock(one);
|
|
1900
|
+
err = mvrotate(vault);
|
|
1901
|
+
pthread_mutex_unlock(one);
|
|
1902
|
+
|
|
1903
|
+
return err;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
sek_err sek_vault_create(sek_pool *pool, const sek_vaultoptions *options, sek_minivault **out) {
|
|
1907
|
+
sek_pool *work;
|
|
1908
|
+
mvfile fresh;
|
|
1909
|
+
sek_err err = sek_vault_open(pool, options, out);
|
|
1910
|
+
|
|
1911
|
+
if (NULL != err) {
|
|
1912
|
+
return err;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
work = sek_pool_new();
|
|
1916
|
+
|
|
1917
|
+
/* No stat first: the check and the write would be two steps, and
|
|
1918
|
+
* `mvputnew` refuses an existing file in ONE, which is what makes two
|
|
1919
|
+
* processes racing to create a vault leave one vault. */
|
|
1920
|
+
err = mvnewvault(*out, work, (*out)->key, (*out)->passphrase, (*out)->iterations, &fresh);
|
|
1921
|
+
if (NULL == err) {
|
|
1922
|
+
err = mvputnew(*out, work, &fresh);
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
sek_pool_free(work);
|
|
1926
|
+
|
|
1927
|
+
if (NULL != err) {
|
|
1928
|
+
*out = NULL;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
return err;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
/* ---- the provider -------------------------------------------------- */
|
|
1935
|
+
|
|
1936
|
+
/* The provider is the READ half and nothing more: a chain resolves
|
|
1937
|
+
* secrets, and writing one is a deliberate act with an API of its own.
|
|
1938
|
+
* That API is the same handle, reached with `sek_vaultof` off a chain or
|
|
1939
|
+
* built directly with `sek_vault_open`. */
|
|
1940
|
+
typedef struct {
|
|
1941
|
+
sek_minivault *vault;
|
|
1942
|
+
char *described;
|
|
1943
|
+
} minivaultdata;
|
|
1944
|
+
|
|
1945
|
+
static sek_err minivault_lookup(sek_provider *self, const char *name, char **out) {
|
|
1946
|
+
return sek_vault_get(((minivaultdata *)self->data)->vault, name, out);
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
static const char *minivault_describe(sek_provider *self) {
|
|
1950
|
+
return ((minivaultdata *)self->data)->described;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
/* Written out rather than built by `sek_providerplugin`, because this
|
|
1954
|
+
* definition publishes TWO exports: `provider`, the read half every kind
|
|
1955
|
+
* publishes, and `vault`, the programmatic API. voxgig/plugin's exports
|
|
1956
|
+
* are how a definition offers an application more than the host's own
|
|
1957
|
+
* vocabulary, and a store that can only be read is half a vault.
|
|
1958
|
+
*
|
|
1959
|
+
* The `sekreto_error` wrapping is what `sek_providerplugin` would have
|
|
1960
|
+
* done: plugin wraps a code-less error raised in `define` as
|
|
1961
|
+
* `plugin_define_failed` and keeps one that already carries a code, so a
|
|
1962
|
+
* refusal of this provider's own configuration travels under
|
|
1963
|
+
* `sekreto_error` and comes back out of the host as itself. */
|
|
1964
|
+
static void minivault_define(Inst *inst) {
|
|
1965
|
+
sek_pool *pool = sek_build_pool();
|
|
1966
|
+
sek_spec spec = sek_specof(pool, inst_options(inst));
|
|
1967
|
+
sek_vaultoptions options;
|
|
1968
|
+
sek_minivault *vault = NULL;
|
|
1969
|
+
minivaultdata *data;
|
|
1970
|
+
sek_err err;
|
|
1971
|
+
|
|
1972
|
+
memset(&options, 0, sizeof(options));
|
|
1973
|
+
options.file = spec.file;
|
|
1974
|
+
options.key = spec.vaultkey;
|
|
1975
|
+
options.passphrase = spec.passphrase;
|
|
1976
|
+
options.iterations = spec.iterations;
|
|
1977
|
+
options.create = spec.create;
|
|
1978
|
+
|
|
1979
|
+
/* Configuration is refused HERE, so a mistyped chain fails at
|
|
1980
|
+
* construction. Reaching the file is not configuration: the handle is
|
|
1981
|
+
* lazy, and nothing is read or stretched until a lookup. */
|
|
1982
|
+
err = sek_vault_open(pool, &options, &vault);
|
|
1983
|
+
if (NULL != err) {
|
|
1984
|
+
fail(SEK_ERROR_CODE, err, details2("ref", vstr(inst_ref(inst)), "cause", vstr(err)));
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
data = (minivaultdata *)sek_alloc(pool, sizeof(minivaultdata));
|
|
1988
|
+
data->vault = vault;
|
|
1989
|
+
data->described = sek_fmt(pool, "minivault:%s", vault->file);
|
|
1990
|
+
|
|
1991
|
+
inst_export(inst, SEK_PROVIDER_EXPORT,
|
|
1992
|
+
vnum(sek_build_keep(sek_provider_new(pool, minivault_lookup, minivault_describe,
|
|
1993
|
+
data))));
|
|
1994
|
+
inst_export(inst, SEK_VAULT_EXPORT, vnum((double)vault->slot));
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
static Definition MINIVAULT_DEF;
|
|
1998
|
+
|
|
1999
|
+
Definition *sek_plugin_minivault(void) {
|
|
2000
|
+
memset(&MINIVAULT_DEF, 0, sizeof(MINIVAULT_DEF));
|
|
2001
|
+
|
|
2002
|
+
MINIVAULT_DEF.name = "minivault";
|
|
2003
|
+
MINIVAULT_DEF.define = minivault_define;
|
|
2004
|
+
|
|
2005
|
+
return &MINIVAULT_DEF;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
/* The vault behind a store in a chain, as its programmatic API.
|
|
2009
|
+
*
|
|
2010
|
+
* `sek_host` is the voxgig/plugin host the chain is made of, and a
|
|
2011
|
+
* definition's exports are readable off it by ref. This is the one call
|
|
2012
|
+
* that turns a store into an API, and it lives here rather than in the
|
|
2013
|
+
* core because the core knows no plugin.
|
|
2014
|
+
*
|
|
2015
|
+
* With no store named, the unqualified alias answers: one vault in the
|
|
2016
|
+
* chain resolves whatever it is called, and two raise rather than
|
|
2017
|
+
* picking one.
|
|
2018
|
+
*
|
|
2019
|
+
* THE INDEX IS RANGE-CHECKED AS A DOUBLE, BEFORE THE CAST, for the reason
|
|
2020
|
+
* `sek_build_at` states: an export is a plugin number, so a hand-written
|
|
2021
|
+
* definition may put any double under this key, and converting one that
|
|
2022
|
+
* does not fit a size_t is undefined. `!(index < len)` rather than
|
|
2023
|
+
* `index >= len` so that a NaN, which compares false with everything, is
|
|
2024
|
+
* refused too. */
|
|
2025
|
+
static sek_err mvslotof(sek_pool *pool, Value *found, const char *missing, sek_minivault **out) {
|
|
2026
|
+
double index;
|
|
2027
|
+
|
|
2028
|
+
if (NULL == found || VNUM != found->kind) {
|
|
2029
|
+
return sek_strdup(pool, missing);
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
index = found->num;
|
|
2033
|
+
if (!(0 <= index) || !(index < (double)MV_VAULTLEN)) {
|
|
2034
|
+
return sek_strdup(pool, missing);
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
*out = MV_VAULTS[(size_t)index];
|
|
2038
|
+
|
|
2039
|
+
return NULL;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
sek_err sek_vaultof(sek_pool *pool, sek_sekreto *sek, const char *store, sek_minivault **out) {
|
|
2043
|
+
const char *missing;
|
|
2044
|
+
const char *ref;
|
|
2045
|
+
Value *found;
|
|
2046
|
+
|
|
2047
|
+
*out = NULL;
|
|
2048
|
+
|
|
2049
|
+
if (sek_empty(store)) {
|
|
2050
|
+
missing = "sekreto: minivault: no minivault store in this chain";
|
|
2051
|
+
return mvslotof(pool, host_exports(sek_host(sek), "minivault/" SEK_VAULT_EXPORT), missing,
|
|
2052
|
+
out);
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
/* A NAMED STORE MUST EXIST, and the alias must not stand in for it.
|
|
2056
|
+
* `host_exports` falls back to the alias when the exact ref misses, so
|
|
2057
|
+
* asking for `minivault` in a chain whose only vault is named `app`
|
|
2058
|
+
* used to hand back the `app` vault - and then write to it. Naming a
|
|
2059
|
+
* store that is not there refuses, which is the rule the whole library
|
|
2060
|
+
* follows: `sek_try` already means "may not have it", so it cannot
|
|
2061
|
+
* also mean "may not exist". */
|
|
2062
|
+
missing = sek_fmt(pool, "sekreto: minivault: no minivault store named %s in this chain", store);
|
|
2063
|
+
ref = 0 == strcmp("minivault", store) ? "minivault" : sek_fmt(pool, "minivault$%s", store);
|
|
2064
|
+
|
|
2065
|
+
if (NULL == host_instance(sek_host(sek), ref)) {
|
|
2066
|
+
return sek_strdup(pool, missing);
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
found = host_exports(sek_host(sek), sek_fmt(pool, "%s/%s", ref, SEK_VAULT_EXPORT));
|
|
2070
|
+
|
|
2071
|
+
return mvslotof(pool, found, missing, out);
|
|
2072
|
+
}
|