Skip to content

WIP: Pluggable datastore design doc and proof of concept implementation#6888

Draft
tjons wants to merge 10 commits into
spiffe:mainfrom
geico:tjons/pluggable-datastore-cassandra
Draft

WIP: Pluggable datastore design doc and proof of concept implementation#6888
tjons wants to merge 10 commits into
spiffe:mainfrom
geico:tjons/pluggable-datastore-cassandra

Conversation

@tjons

@tjons tjons commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality
This pull request advances #5993 by providing a proof of concept and a running (with some issues) implementation of pluggability in the SPIRE Server's datastore layer. This pull request is a proof of concept, not a proposed change in its current state.

Description of change
Design doc (also WIP, needs some fleshing out) can be found in pkg/server/plugin/datastore/README.md.

This is a proof-of-concept implementation of supporting datastore plugins in the SPIRE server. It makes core changes to spire and spire-plugin-sdk to support "pluggability" of the datastore. Included is a prototype reference implementation using Apache Cassandra as a backing datastore for SPIRE server. It leverages Cassandra 5.0 and is not compatible with earlier versions of Cassandra due to heavily leveraging Storage-Attached Indexes to improve query performance.

Related changes to https://github.com/spiffe/spire-plugin-sdk in support of this POC can be found here: geico/spire-plugin-sdk@b38c1ed. To avoid unnecessary noise, I did not include a PR for this part of the POC as I felt it was not justified to propose official SDK changes at the POC stage.

@tjons tjons marked this pull request as draft April 18, 2026 17:03
tjons added 10 commits April 18, 2026 13:17
Proof of concept for using pluggable datastores

Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
@tjons tjons force-pushed the tjons/pluggable-datastore-cassandra branch from c1a1dce to fedf7e5 Compare April 18, 2026 17:18
existingBundle, err := p.fetchBundle(ctx, req.Bundle.TrustDomainId)
if err != nil {
return nil, err
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To prefix this, I'm not familiar with Cassandra at all. How does this handle concurrent updates of the bundle. E.g. two spire-server deciding they need to renew their keys at the same time. Is there something preventing them for overwriting their changes? Does it have something like transactions or compare and swap?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants