Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Server Side Encryption

chrislusf edited this page Sep 16, 2025 · 3 revisions

Server-Side Encryption (SSE)

If you're using SeaweedFS with the S3 API, you can encrypt objects at rest without changing your apps. We support the same server-side encryption (SSE) options as Amazon S3, so you can pick the one that fits how you already manage keys.

Overview

Use this quick guide to choose the right option:

Encryption Type Key Management Use Case
SSE-KMS External KMS providers Enterprise key management, audit trails
SSE-C Customer-provided Full customer control, regulatory compliance
SSE-S3 SeaweedFS-managed Simple server-managed encryption, bucket defaults

Encryption Types

SSE-KMS (Server-Side Encryption with Key Management Service)

  • Pick this if: You already use a KMS and want strong audit trails
  • Keys live in: External providers (AWS KMS, Google Cloud KMS, OpenBao/Vault, Azure Key Vault [experimental])
  • Why teams like it: Centralized key management, detailed audit logs, per-bucket key assignment, optional Bucket Key optimization
  • Configuration: Requires KMS provider setup in the S3 config
  • Documentation: SSE-KMS Guide

SSE-C (Server-Side Encryption with Customer-Provided Keys)

  • Pick this if: You want to bring your own keys and keep full control
  • Keys live in: Your application (sent per request)
  • Why teams like it: No key storage on the server; maximum control for compliance-heavy environments
  • Configuration: Keys provided via HTTP headers
  • Documentation: SSE-C Guide

SSE-S3 (Server-Managed Keys)

  • Pick this if: You want simple, fully managed encryption with minimal setup
  • Keys live in: SeaweedFS (we handle the key management for you)
  • Why teams like it: Works with explicit x-amz-server-side-encryption: AES256 and bucket default encryption; supports multipart uploads and range requests
  • Configuration: Optional bucket-level default encryption via the standard S3 bucket encryption API

Quick Start

SSE-KMS (Enterprise)

# Configure KMS in s3 config file (see KMS Providers Integration guide)
# Then upload with KMS encryption
aws s3 cp file.txt s3://mybucket/file.txt \
  --server-side-encryption aws:kms \
  --ssekms-key-id test-key-123

SSE-C (Customer Keys)

# Generate customer key
openssl rand 32 > customer-key.bin

# Upload with customer-provided key
aws s3 cp file.txt s3://mybucket/file.txt \
  --sse-c AES256 \
  --sse-c-key fileb://customer-key.bin

SSE-S3 (Server-Managed)

# Explicit SSE-S3 on upload (or configure bucket default encryption)
aws s3 cp file.txt s3://mybucket/file.txt \
  --server-side-encryption AES256

Configuration

Basic Setup

Configure KMS providers and IAM settings in your S3 config file:

{
  "identities": [
    {
      "name": "admin",
      "credentials": [{"accessKey": "admin", "secretKey": "password"}],
      "actions": ["Admin", "Read", "Write"]
    }
  ],
  "kms": {
    "default_provider": "openbao",
    "providers": {
      "openbao": {
        "type": "openbao",
        "address": "http://localhost:8200",
        "token": "root-token",
        "transit_path": "transit"
      }
    }
  }
}

Note: The S3 config JSON file contains both KMS encryption settings AND IAM-style access control (user identities, credentials, permissions).

Start S3 API with Encryption Support

# Start with KMS config
weed s3 -config=s3_kms_config.json

Features

Supported Operations:

  • All standard S3 operations (PUT, GET, HEAD, COPY, DELETE)
  • Multipart uploads with consistent encryption
  • Cross-encryption copy operations
  • Object metadata preservation
  • Range requests for SSE-C, SSE-KMS, and SSE-S3

AWS S3 Compatibility:

  • Identical API behavior and headers
  • Compatible with all S3 clients and SDKs
  • Same error codes and responses

Implementation Notes

  • SSE-KMS: Supports AWS KMS, Google Cloud KMS, OpenBao/Vault; Azure Key Vault is available behind the azurekms build tag (experimental)
  • SSE-C: Full support with security best practices
  • SSE-S3: Supported with SeaweedFS-managed keys and bucket default encryption

For hands-on setup guides and examples, see the individual encryption method docs linked above.

Introduction

API

Configuration

Filer

Management

Advanced Filer Configurations

Cloud Drive

AWS S3 API

S3 Authentication & IAM

Server-Side Encryption

S3 Client Tools

Machine Learning

HDFS

Replication and Backup

Metadata Change Events

Messaging

Use Cases

Operations

Advanced

Security

Misc Use Case Examples

Clone this wiki locally