Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ea52d30
encryption draft
moderakh Apr 8, 2020
bfdceec
added sample code
moderakh Apr 8, 2020
68a98c0
Merge branch 'master' into users/moderakh/v4-encryption-merge-master
moderakh Apr 14, 2020
e1452a4
undo changes for bom
moderakh Apr 14, 2020
21e98da
encryption and storing key in cosmos container
moderakh Apr 20, 2020
ed26d12
minor cleanup
moderakh Apr 20, 2020
91c5435
Merge branch 'master' into users/moderakh/merge-master-to-encryption
moderakh Apr 20, 2020
b13ee3a
minor cleanup
moderakh Apr 20, 2020
408d76b
Merge branch 'master' into users/moderakh/encryption-20200618
moderakh Jun 23, 2020
d805672
Merge branch 'master' into feature/cosmos/v4-encryption
moderakh Jun 24, 2020
a05704f
added back removed files
moderakh Jun 24, 2020
d308e38
Merge branch 'master' into feature/cosmos/v4-encryption
moderakh Jun 25, 2020
ce4f3ea
address code review comments
moderakh Jun 25, 2020
90db035
decrypt on write as well
moderakh Jun 25, 2020
0e0ce5b
review comments
moderakh Jul 6, 2020
e43a3c7
code review
moderakh Jul 8, 2020
7aca1fe
Merge branch 'master' into feature/cosmos/v4-encryption
moderakh Jul 8, 2020
d1ce16d
spotbug issues
moderakh Jul 9, 2020
d989e13
checkstyle rules
moderakh Jul 10, 2020
811b035
fixed checkstyle
moderakh Jul 10, 2020
b7578b9
code style rule
moderakh Jul 10, 2020
38226cc
infra update
moderakh Jul 10, 2020
9fad903
Merge branch 'master' into feature/cosmos/v4-encryption
moderakh Jul 10, 2020
903d43d
fixed typo
moderakh Jul 10, 2020
590a810
fixed gate ci
moderakh Jul 10, 2020
902acf8
pom file
moderakh Jul 10, 2020
1efcf5b
dependency fix
moderakh Jul 10, 2020
bde97d0
code review
moderakh Jul 10, 2020
9ea0a6e
removed bcprov-ext-jdk15on
moderakh Jul 10, 2020
86d25ff
code review comment
moderakh Jul 10, 2020
ec628f6
code review comment addressed
moderakh Jul 10, 2020
f8d0a37
fixed version mismatch
moderakh Jul 10, 2020
5e97dd8
code review comments
moderakh Jul 10, 2020
bf0829d
readme
moderakh Jul 10, 2020
de10a87
readme update
moderakh Jul 10, 2020
1904fbd
readme update
moderakh Jul 10, 2020
bc87616
readme update
moderakh Jul 10, 2020
89aa6ee
changelog added
moderakh Jul 10, 2020
1a4b69f
readme update
moderakh Jul 10, 2020
36e325e
one word
moderakh Jul 10, 2020
eea0781
readme verifier skip
moderakh Jul 10, 2020
cd8f025
run only unit tests in unit test phase
moderakh Jul 10, 2020
3feb427
minor test fix
moderakh Jul 14, 2020
6e97928
update
moderakh Jul 15, 2020
5d21d9b
Merge branch 'master' into feature/cosmos/v4-encryption
moderakh Jul 15, 2020
f0175b6
version update
moderakh Jul 15, 2020
17ba37d
fixed a few tests
moderakh Jul 15, 2020
ec27fbf
fixed test
moderakh Jul 15, 2020
d45fd99
fix NPE
moderakh Jul 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ known_content_issues:
- ['sdk/cosmos/azure-cosmos-benchmark/README.md', '#3113']
- ['sdk/cosmos/azure-cosmos-examples/README.md', '#3113']
- ['sdk/cosmos/azure-cosmos/README.md', '#3113']
- ['sdk/cosmos/azure-cosmos-encryption/README.md', '#3113']
- ['sdk/e2e/README.md', '#3113']
- ['sdk/eventgrid/microsoft-azure-eventgrid/README.md', '#3113']
- ['sdk/eventhubs/microsoft-azure-eventhubs-eph/README.md', '#3113']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@

<!-- Cosmos sdk suppressions -->
<suppress checks="[a-zA-Z0-9]*" files="[/\\]azure-cosmos[/\\]src[/\\]test[/\\]"/>
<suppress checks="[a-zA-Z0-9]*" files="[/\\]azure-cosmos-encryption[/\\]src[/\\]test[/\\]"/>
<suppress checks="[a-zA-Z0-9]*" files="[/\\]cosmos[/\\]examples[/\\]"/>
<suppress checks="[a-zA-Z0-9]*" files="[/\\]cosmos[/\\]implementation[/\\]"/>
<suppress checks="[a-zA-Z0-9]*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,25 @@
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>

<Match>
<Class name="com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256Algorithm"/>
<Method name="decryptData"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>

<Match>
<Class name="com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256Algorithm"/>
<Method name="encryptData"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>


<Match>
<Class name="com.azure.cosmos.implementation.encryption.SecurityUtility"/>
<Method name="getSHA256Hash"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>

<!-- Suppress false positive, there is no null in the flagged code -->
<Match>
<Class name="com.azure.cosmos.implementation.TestConfigurations"/>
Expand Down Expand Up @@ -1452,6 +1471,12 @@
<Bug pattern="DLS_DEAD_LOCAL_STORE_OF_NULL"/>
</Match>

<Match>
<Class name="com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256Algorithm"/>
<Method name="encryptData"/>
<Bug pattern="DLS_DEAD_LOCAL_STORE"/>
</Match>

<!-- Bug: https://github.com/Azure/azure-sdk-for-java/issues/9093 -->
<Match>
<Class name="com.azure.cosmos.implementation.QueryMetrics"/>
Expand Down Expand Up @@ -1647,13 +1672,56 @@
<Bug pattern="EI_EXPOSE_REP"/>
</Match>

<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.encryption.EncryptionKeyUnwrapResult"/>
<Method name="getDataEncryptionKey"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>

<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.encryption.EncryptionKeyUnwrapResult"/>
<Method name="getWrappedDataEncryptionKey"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>


<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.encryption.EncryptionKeyUnwrapResult"/>
<Method name="&lt;init&gt;"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>

<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.directconnectivity.StoreResponse"/>
<Method name="&lt;init&gt;"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>

<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.encryption.EncryptionKeyWrapResult"/>
<Method name="getWrappedDataEncryptionKey"/>
<Bug pattern="EI_EXPOSE_REP2,EI_EXPOSE_REP"/>
</Match>

<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.encryption.EncryptionKeyWrapResult"/>
<Method name="getEncryptionKeyWrapMetadata"/>
<Bug pattern="EI_EXPOSE_REP2,EI_EXPOSE_REP"/>
</Match>

<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.encryption.EncryptionKeyWrapResult"/>
<Method name="&lt;init&gt;"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>

<!-- Returning a new copy of the object is not necessary -->
<Match>
<Class name="com.azure.cosmos.implementation.RxDocumentServiceRequest"/>
Expand Down Expand Up @@ -1817,6 +1885,12 @@
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>

<Match>
<Class name="com.azure.cosmos.implementation.encryption.CosmosDataEncryptionKeyProvider"/>
<Method name="initialize"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>

<!-- https://github.com/Azure/azure-sdk-for-java/issues/9179 -->
<Match>
<Class name="com.azure.cosmos.implementation.SessionContainer"/>
Expand Down
5 changes: 5 additions & 0 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
<artifactId>azure-cosmos</artifactId>
<version>4.3.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos-encryption</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-data-appconfiguration</artifactId>
Expand Down
1 change: 1 addition & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ com.azure:azure-core-test;1.3.1;1.4.0-beta.1
com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.5;1.0.0-beta.6
com.azure:azure-cosmos;4.2.0;4.3.0-beta.1
com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure:azure-cosmos-encryption;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-data-appconfiguration;1.1.3;1.2.0-beta.1
com.azure:azure-data-schemaregistry;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-data-schemaregistry-avro;1.0.0-beta.2;1.0.0-beta.3
Expand Down
6 changes: 6 additions & 0 deletions sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Release History

# Release History
## 1.0.0-beta.1 (Unreleased)


69 changes: 69 additions & 0 deletions sdk/cosmos/azure-cosmos-encryption/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Azure CosmosDB client library for Java
TODO

## Getting started
### Include the package

[//]: # ({x-version-update-start;com.azure:azure-cosmos-encryption;current})
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos-encryption</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})


### Prerequisites
TODO

## Key concepts
TODO

## Examples
TODO

## Troubleshooting
TODO

## Next steps
TODO

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
[Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights
to use your contribution.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate
the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to
do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq]
or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.

<!-- LINKS -->
[source_code]: src
[cosmos_introduction]: https://docs.microsoft.com/en-us/azure/cosmos-db/
[api_documentation]: https://azuresdkdocs.blob.core.windows.net/$web/java/azure-cosmos/latest/index.html
[cosmos_docs]: https://docs.microsoft.com/en-us/azure/cosmos-db/introduction
[jdk]: https://docs.microsoft.com/java/azure/java-supported-jdk-runtime?view=azure-java-stable
[maven]: https://maven.apache.org/
[cosmos_maven]: https://search.maven.org/artifact/com.azure/azure-cosmos
[cosmos_maven_svg]: https://img.shields.io/maven-central/v/com.azure/azure-cosmos.svg
[cla]: https://cla.microsoft.com
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:opencode@microsoft.com
[azure_subscription]: https://azure.microsoft.com/free/
[samples]: https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples
[samples_readme]: https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples/blob/master/README.md
[troubleshooting]: https://docs.microsoft.com/en-us/azure/cosmos-db/troubleshoot-java-sdk-v4-sql
[perf_guide]: https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips-java-sdk-v4-sql?tabs=api-async
[sql_api_query]: https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-sql-query
[getting_started]: https://github.com/Azure-Samples/azure-cosmos-java-getting-started
[quickstart]: https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-java?tabs=sync
[project_reactor_schedulers]: https://projectreactor.io/docs/core/release/api/reactor/core/scheduler/Schedulers.html

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcosmos%2FREADME.png)
Loading