sqlite database plugin for vault

234 views
Skip to first unread message

Rowan Cannaday

unread,
Jul 6, 2018, 3:14:39 PM7/6/18
to Vault
I'm not too familiar w/ the code base of vault ( i looked through the mysql database plugin briefly). But is there any interest in a sqlite storage backend? Is this even feasible?

This would be very useful to me personally because I could integrate vault into my existing tools.

Jeff Mitchell

unread,
Jul 6, 2018, 5:07:03 PM7/6/18
to Vault
Hi Rowan,

I think it's certainly an interesting concept, however, as of now it would only be accessible in a fork since AFAIK all Go sqlite database drivers require cgo. (https://github.com/golang/go/wiki/SQLDrivers)

Best,
Jeff

On Fri, Jul 6, 2018 at 3:14 PM Rowan Cannaday <cann...@gmail.com> wrote:
I'm not too familiar w/ the code base of vault ( i looked through the mysql database plugin briefly). But is there any interest in a sqlite storage backend? Is this even feasible?

This would be very useful to me personally because I could integrate vault into my existing tools.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/1c0faaf3-5b45-4494-855c-fbd0d4d0889c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rowan Cannaday

unread,
Jul 6, 2018, 5:35:07 PM7/6/18
to Vault
ah, so basically the project has it as a goal to not add any plugins that would require gcc compiled component? I can understand that.

I may look into adding a 3rd party plugin if its not a crazy amount of work.

this seems to be the primary issue preventing golang from implementing a sqlite driver w/o cgo
https://github.com/golang/go/issues/18296

Jeff Mitchell

unread,
Jul 6, 2018, 5:48:10 PM7/6/18
to Vault
We avoid cgo to avoid dynamic linking. It has some nice security benefits, makes the binary more portable, is 1000x easier to cross-compile, and is something our users generally appreciate. :-)

Best,
Jeff

Rowan Cannaday

unread,
Jul 8, 2018, 10:49:46 PM7/8/18
to Vault
could we use golang build constraints to enable/disable cgo+sqlite at compilation?

this might make it easier to integrate w/o forking codebase

https://golang.org/pkg/go/build/#hdr-Build_Constraints

Rowan Cannaday

unread,
Jul 9, 2018, 7:11:41 AM7/9/18
to Vault
You can disregard this. I was playing around w/ different storage backends, and don't see much benefit in using a relational database vs the filesystem, for me, at this moment.

thanks for your time! vault looks neat.
Reply all
Reply to author
Forward
0 new messages