fle-java
Field-Level Encryption with the Couchbase Java SDK — CryptoManager setup, @Encrypted annotation, encrypting and decrypting document fields
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Field-Level Encryption with the Couchbase Java SDK — CryptoManager setup, @Encrypted annotation, encrypting and decrypting document fields
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-java |
| summary | Field-Level Encryption with the Couchbase Java SDK — CryptoManager setup, @Encrypted annotation, encrypting and decrypting document fields |
| description | Field-Level Encryption with the Couchbase Java SDK — CryptoManager setup, @Encrypted annotation, encrypting and decrypting document fields |
| compatibility | Java SDK 3.x. couchbase-encryption artifact required. |
| metadata | {"last_verified":"2026-05","min_server_version":"6.0","handoff":[{"condition":"user asks about FLE concepts or supported SDKs","skill":"fle"},{"condition":"user asks about connection setup","skill":"server-connection-java"}]} |
<!-- pom.xml -->
<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>couchbase-encryption</artifactId>
<version>3.0.0</version>
</dependency>
import com.couchbase.client.encryption.AeadAes256CbcHmacSha512Provider;
import com.couchbase.client.encryption.DefaultCryptoManager;
import com.couchbase.client.encryption.Keyring;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.ClusterOptions;
import com.couchbase.client.java.env.ClusterEnvironment;
byte[] keyBytes = new byte[64]; // 64-byte key for AES-256
Keyring keyring = Keyring.fromMap(Map.of("my-key-id", keyBytes));
AeadAes256CbcHmacSha512Provider provider =
AeadAes256CbcHmacSha512Provider.builder().keyring(keyring).build();
CryptoManager cryptoManager = DefaultCryptoManager.builder()
.decrypter(provider.decrypter())
.defaultEncrypter(provider.encrypterForKey("my-key-id"))
.build();
ClusterEnvironment env = ClusterEnvironment.builder()
.cryptoManager(cryptoManager)
.build();
Cluster cluster = Cluster.connect("couchbase://localhost",
ClusterOptions.clusterOptions("username", "Password!123").environment(env));
import com.couchbase.client.java.encryption.annotation.Encrypted;
public class UserDocument {
public String name;
@Encrypted
public String ssn;
@Encrypted
public String creditCard;
}
// Write
UserDocument user = new UserDocument();
user.name = "Alice";
user.ssn = "123-45-6789";
user.creditCard = "4111111111111111";
collection.upsert("user::alice", user);
// Read — decryption is automatic
UserDocument result = collection.get("user::alice").contentAs(UserDocument.class);
System.out.println(result.ssn); // "123-45-6789"
JsonObject doc = JsonObject.create()
.put("name", "Alice")
.put("ssn", "123-45-6789");
collection.upsert("user::alice", doc,
UpsertOptions.upsertOptions().encryptFields(Set.of("ssn")));
fle for full concept reference