vault icon indicating copy to clipboard operation
vault copied to clipboard

Document API to write plugins in other languages

Open swarmer opened this issue 6 years ago • 4 comments

Is your feature request related to a problem? Please describe. I would like to have the ability to implement plugins in any language, but I didn't find any kind of documentation on the protocol used for this. I also would like to know, just how much of an effort would it be to implement a library for plugin writing in a new language?

Describe the solution you'd like A documentation or a specification of the RPC protocol used for plugins.

Describe alternatives you've considered Writing plugins in Go is always an ok option and it could be argued that for popular tools like, say, Cassandra it makes little sense to implement them in 10 different languages, but what I have in mind is rather more obscure company-specific internal functionality (see below).

Explain any additional use-cases Generally speaking, an ability to make plugins in whatever language a project happens to be using can make vault a central part of project's workflows, rather that "just a tool". When I'm considering possibility of using Vault, its ability to manage/rotate PostgreSQL credentials, for instance, is quite nice, but to really achieve maximum utility I want Vault to be able:

  • Manage credentials for obscure third party APIs that only I and five other people in the world use
  • Integrate with my own internal systems and, more importantly, my own code, build systems, etc

Unless a project just happens to be written in Go, it's somewhat unlikely that it will want to find Go expertise, setup tooling, etc, just to integrate with Vault. Then, if there's no confidence that Vault can be easily integrated with internal workflows, I think it loses a very big part of its advantage over services like AWS Secrets Manager or Parameter Store.

swarmer avatar Sep 02 '19 20:09 swarmer

@michelvocks Is there update on this issue?

callensm avatar Aug 19 '20 01:08 callensm

I think a little exploration of the common gRPC protocol as well the code in the repository and along with other publicly available material on the web can already help. The gRPC in Vault is also similar to that used in Consul - which you can also find examples out there for - like:

Other repos of interest if you're striving in porting calls to other languages would be:

I feel this request should be closed - @swarmer can you confirm if you agree or if not what literature you may have pursued since raising this request and how this may still be relevant for you?

aphorise avatar Aug 31 '22 21:08 aphorise

I did not actually embark upon writing a plugin, so I can't really evaluate how easy it would be to follow these examples. I see that even the C++ link has some Go code? I didn't research this that deeply, but my impression is I would not attempt to write a plugin without knowing Go.

swarmer avatar Sep 09 '22 14:09 swarmer

I guess you're going to get some level of tool-chaining but if you'd want to do it in pure C / C++ I dont see why it wouldn't be possible given the avaible grpc specs

  • https://www.grpc.io/docs/what-is-grpc/introduction/
  • Another example: https://github.com/MengJingsong/grpc

Maybe you can do a write up on C / C++ if you are going to embark on this @swarmer?

aphorise avatar Sep 09 '22 19:09 aphorise