fle-rust
Field-Level Encryption is not supported by the Couchbase Rust SDK 1.0 — alternatives and workarounds
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Field-Level Encryption is not supported by the Couchbase Rust SDK 1.0 — alternatives and workarounds
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Couchbase SDK error handling — UnambiguousTimeoutException vs AmbiguousTimeoutException, DocumentNotFoundException, CasMismatchException, DurabilityImpossibleException, SDK debug logging, sdk-doctor connectivity diagnostics, retryable vs non-retryable errors, circuit breaker, error best practices
Couchbase SDK patterns for Rust — CAS optimistic locking, retry on CasMismatch, tokio bulk operations with join_all/FuturesUnordered, atomic counters, sub-document (MutateInSpec/LookupInSpec), array operations, exists, replica reads, touch/getAndTouch, preserve_expiry, error handling
Configure and optimize Couchbase SDK connections in Rust — async/tokio cluster setup, singleton pattern, wait_until_ready, timeouts, KV CRUD (upsert/insert/get/replace/remove), expiry, durability, sub-document operations
SQL++ queries with the Couchbase Rust SDK — scope.query, cluster.query, positional and named parameters, scan consistency, deserializing rows into structs, DML (INSERT/UPDATE/DELETE/UPSERT), MutationState RYOW
Testing Couchbase Rust applications — unit testing with mockall, integration testing with testcontainers-rs, scope/collection isolation
Distributed ACID transactions are not supported by the Couchbase Rust SDK 1.x — alternatives and workarounds
| name | fle-rust |
| summary | Field-Level Encryption is not supported by the Couchbase Rust SDK 1.0 — alternatives and workarounds |
| description | Field-Level Encryption is not supported by the Couchbase Rust SDK 1.0 — alternatives and workarounds |
| compatibility | Rust SDK 1.0. FLE not supported. |
| metadata | {"last_verified":"2026-05","handoff":[{"condition":"user asks about FLE concepts or supported SDKs","skill":"fle"},{"condition":"user asks about server-side encryption at rest","skill":"security"}]} |
Rust SDK 1.0 does not support Field-Level Encryption. There is no CryptoManager API.
Option 1 — Encrypt in application code before writing:
use aes_gcm::{Aes256Gcm, Key, Nonce};
use aes_gcm::aead::{Aead, NewAead};
// Encrypt the sensitive field value before building the document
let key = Key::from_slice(b"an example very very secret key."); // 32 bytes
let cipher = Aes256Gcm::new(key);
let nonce = Nonce::from_slice(b"unique nonce"); // 12 bytes
let ciphertext = cipher.encrypt(nonce, ssn.as_bytes()).unwrap();
let encrypted_ssn = base64::encode(&ciphertext);
let doc = serde_json::json!({
"name": "Alice",
"ssn": encrypted_ssn, // store ciphertext
});
collection.upsert("user::alice", doc, None).await?;
Option 2 — Server-side encryption at rest (Couchbase Server 8.x):
Couchbase Server 8.x supports transparent encryption at rest for all data. This protects data on disk without SDK changes. See the security skill.
Monitor the Couchbase Rust SDK release notes for FLE support in future versions.