Skip to content

How to pass custom encryption key to RavenDB client? #19619

Answered by ayende
dtaalbers asked this question in Q&A
Discussion options

You must be logged in to vote

That isn't quite how this work. The master key for a database is not part of the global state of the cluster.
Instead, it is a local state for each node, and you mark the database as encrypted.

In other words, we create a secret key with the name of the database, and then create the database for that.

fetch("https://a.books.ravendb.run/admin/secrets/distribute?name=test&node=A", {
  "referrer": "https://a.books.ravendb.run/studio/index.html",
  "body": "XqkQTscDtg2V22HEhxNfrWMA1qdHuppV3jNgegXKZx8=",
  "method": "POST"
});

The reason for that is that we keep strict separation of the secrets from anything else, and you can run with different keys for each node in the cluster.
The Distribute

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ayende
Comment options

@dtaalbers
Comment options

@georgiosd
Comment options

@ayende
Comment options

Answer selected by dtaalbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants