nats-server icon indicating copy to clipboard operation
nats-server copied to clipboard

Provide equivalent to S3 SSE-C for JetStream Object Store

Open udf2457 opened this issue 2 years ago • 3 comments

What motivated this proposal?

At present, JS only supports encryption at rest on a global level, e.g.

jetstream : {
  cipher: chachapoly
  key : "6dYfBV0zzEkR3vxZCNjxmnVh/aIqgid1"
}

It would be useful if NATS provided an equivalent to S3 SSE-C whereby you can have object-level encryption based on a provided key (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html)

What is the proposed change?

Add object-level encryption support for JS Object Store

Who benefits from this change?

No response

What alternatives have you evaluated?

DIY encryption prior to NATS calls. Which is clearly fine, but messy to implement and maintain.

Also when attempting to submit a PR to third-party projects, I have been rejected by maintainers because they consider a thin-wrapper prior to NATS being "DIY crypto" even if it is nothing but a wrapper around stdlib. So if NATS had built-in first-class support for SSE-C then this would clearly silence third-party maintainer objections.

udf2457 avatar Oct 04 '23 08:10 udf2457

BTW: has NATS Objectstore a S3 compatible API?

hwinkel avatar Nov 15 '23 04:11 hwinkel

We are considering but have not made any firm decisions.

derekcollison avatar Nov 15 '23 04:11 derekcollison

We are considering but have not made any firm decisions.

Good to hear, especially if 3rd party apps, not adapted to NATS APIs, need to access Object Data the S3 API might be a way to go.

hwinkel avatar Nov 15 '23 10:11 hwinkel