Service definitions, code generated stubs and infrastructure for running and testing KCM plugins.
External plugins are separate processes and use go-plugin under the covers.
KMS communicates with plugins over gRPC. As such, the various interfaces are defined via gRPC service definitions.
Several tools are required to generate the code:
protoc compiler: see the instruction on the official web site or install using homebrewbrew install protobuf.protoc-gen-go: install viago install google.golang.org/protobuf/cmd/protoc-gen-go@latest.protoc-gen-go-grpc: install viago install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest.protoc-gen-grpc-gateway: install viago install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway.protoc-gen-openapiv2: install viago install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2.protofetch: download from the releases page of the GitHub repository or install viacargo install protofetchornpm install -g @coralogix/protofetch, or using any similar tool compatible with the npm registry.
Optionally, the buf CLI tool can be used to validate, detect breaking changes, and format .proto files:
buf breaking --against https://github.com/openkcm/api-sdk.git#branch=main: detect breaking changes against the main branch of the remote repository.buf format -w: format.protofiles.buf lint: lint.protofiles.
There are several make targets defined in the Makefile:
fetch-protos: download.protodependencies usingprotofetch.generate: fetches.protodependencies, formats.protofiles, and generates Go code.install-proto-tools: installs the tools (including optional) from the following sources: Homebrew, Go registry (viago install), NPM registry (vianpm install -g). See the target definition for the details.validate-proto: formats and lints.protofiles, detects breaking changes.
For the rest make targets see Makefile.
.proto dependencies are managed with the protofetch tool. This tool downloads .proto files from a specified location of a git repository and places them into the vendor-proto directory. The dependencies are specified in the protofetch.toml file.
For instance, a dependency on the protovalidate proto definitions can be specified as follow:
name = "github.com/openkcm/plugin-sdk"
description = "Plugins SDK of the OpenKCM project"
[protovalidate]
url = "github.com/bufbuild/protovalidate"
revision = "v1.1.1"
content_roots = ["/proto/protovalidate"]
allow_policies = ["buf/validate/*"]In order to fetch dependencies, execute:
$ protofetch -o vendor-proto fetchThe code can be generated with executing the following Make target
$ make generateThis project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
If you find any bug that may be a security problem, please follow our instructions at in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Copyright 2025 SAP SE or an SAP affiliate company and OpenKCM contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.
