Skip to content

Commit c3bfa5f

Browse files
Update contribution link and clarify encrypted field configuration.
Updated README.adoc to reflect the current contribution process, replacing the outdated CLA link with the new Developer Certificate of Origin (DCO) instructions. In mongo-encryption.adoc, updated the code sample to include the required `keyId(...)` call when configuring a field with Queryable Encryption. Signed-off-by: Ricardo Mello <[email protected]>
1 parent fca17fc commit c3bfa5f

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ Now you are ready to build Spring Data MongoDB. Simply enter the following `mvnw
211211

212212
If you want to build with the regular `mvn` command, you will need https://maven.apache.org/run-maven/index.html[Maven v3.8.0 or above].
213213

214-
_Also see link:CONTRIBUTING.adoc[CONTRIBUTING.adoc] if you wish to submit pull requests, and in particular, please sign
215-
the https://cla.pivotal.io/sign/spring[Contributor’s Agreement] before your first non-trivial change._
214+
_Also see link:CONTRIBUTING.adoc[CONTRIBUTING.adoc] if you wish to submit pull requests.
215+
Before your first non-trivial change, please make sure your commits include a Signed-off-by line to indicate
216+
agreement with the https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring#how-to-use-developer-certificate-of-origin[Developer Certificate of Origin]._
216217

217218
=== Building reference documentation
218219

src/main/antora/modules/ROOT/pages/mongodb/mongo-encryption.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,14 @@ Manual Collection Setup::
140140
====
141141
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
142142
----
143+
BsonBinary ssnDK = clientEncryption.createDataKey("local", new com.mongodb.client.model.vault.DataKeyOptions());
144+
BsonBinary ageDK = clientEncryption.createDataKey("local", new com.mongodb.client.model.vault.DataKeyOptions());
145+
BsonBinary signDK = clientEncryption.createDataKey("local", new com.mongodb.client.model.vault.DataKeyOptions());
146+
143147
CollectionOptions collectionOptions = CollectionOptions.encryptedCollection(options -> options
144-
.queryable(encrypted(string("ssn")).algorithm("Indexed"), equality().contention(0))
145-
.queryable(encrypted(int32("age")).algorithm("Range"), range().contention(8).min(0).max(150))
146-
.queryable(encrypted(int64("address.sign")).algorithm("Range"), range().contention(2).min(-10L).max(10L))
148+
.queryable(encrypted(string("ssn")).algorithm("Indexed").keyId(ssnDK.asUuid()), equality().contention(0))
149+
.queryable(encrypted(int32("age")).algorithm("Range").keyId(ageDK.asUuid()), range().contention(8).min(0).max(150))
150+
.queryable(encrypted(int64("address.sign")).algorithm("Range").keyId(signDK.asUuid()), range().contention(2).min(-10L).max(10L))
147151
);
148152
149153
mongoTemplate.createCollection(Patient.class, collectionOptions); <1>

0 commit comments

Comments
 (0)