Skip to content

Commit 988bd93

Browse files
committed
chore: merge branch 'release/v4.0.1'
2 parents 99c8d95 + 1c0ae94 commit 988bd93

6 files changed

Lines changed: 51 additions & 21 deletions

File tree

.github/workflows/maven.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ jobs:
135135
python-version: 3.7
136136
- run: python scripts/get_native_libraries.py
137137

138+
- name: Import GPG key
139+
id: import_gpg
140+
uses: crazy-max/ghaction-import-gpg@v5
141+
with:
142+
gpg_private_key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
143+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
144+
138145
- name: Maven deploy
139146
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
140147
run: |
@@ -143,7 +150,6 @@ jobs:
143150
mkdir -p ~/.m2 ~/.gpg
144151
echo "$M2_SETTINGS" > ~/.m2/settings.xml
145152
echo "$MAVEN_GPG_PRIVATE_KEY" > ~/.gpg/maven_gpg_private_key.asc
146-
gpg --import ~/.gpg/maven_gpg_private_key.asc
147153
mvn clean deploy -Dmaven.test.skip
148154
env:
149155
M2_SETTINGS: ${{ secrets.M2_SETTINGS }}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.0.1] - 2023-02-17
6+
7+
### Bug Fixes
8+
9+
- Maven central publish
10+
11+
### Documentation
12+
13+
- Add comments on exposed code from public_doc
14+
15+
---
16+
517
## [4.0.0] - 2023-01-31
618

719
### Documentation

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ This table shows the compatible versions of the various components
9595
| 3.0.2 | 4.0.1 | 8.0.1 | 2.0.0 |
9696
| 3.0.3 | 4.0.1 | 8.0.2 | 2.0.0 |
9797
| 4.0.0 | 4.2.0 | 10.0.0 | 2.0.1 |
98+
| 4.0.1 | 4.2.0 | 10.0.0 | 2.0.1 |
9899

99100
## Using in Java projects
100101

@@ -104,7 +105,7 @@ This library is open-source software and is available on Maven Central.
104105
<dependency>
105106
<groupId>com.cosmian</groupId>
106107
<artifactId>cloudproof_java</artifactId>
107-
<version>4.0.0</version>
108+
<version>4.0.1</version>
108109
</dependency>
109110
```
110111

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.cosmian</groupId>
77
<artifactId>cloudproof_java</artifactId>
8-
<version>4.0.0</version>
8+
<version>4.0.1</version>
99

1010
<name>cloudproof_java</name>
1111
<description>The Cloudproof Java Lib secures data repositories in the cloud with attributes-based access control encryption and encrypted search</description>

src/test/java/com/cosmian/TestDemo.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ public void testDocDemoKMS() throws CloudproofException {
6565

6666
// Master Keys can be exported from the KMS
6767
// export the private master key
68-
// PrivateKey privateMasterKey =
69-
// kmsClient.retrieveCoverCryptPrivateMasterKey(privateMasterKeyUniqueIdentifier);
70-
// byte[] _privateMasterKeyBytes = privateMasterKey.bytes();
68+
PrivateKey privateMasterKey =
69+
kmsClient.retrieveCoverCryptPrivateMasterKey(privateMasterKeyUniqueIdentifier);
70+
byte[] _privateMasterKeyBytes = privateMasterKey.bytes();
7171
// export the public key
72-
// PublicKey publicKey =
73-
// kmsClient.retrieveCoverCryptPublicMasterKey(publicMasterKeyUniqueIdentifier);
74-
// byte[] _publicKeyBytes = publicKey.bytes();
72+
PublicKey publicKey =
73+
kmsClient.retrieveCoverCryptPublicMasterKey(publicMasterKeyUniqueIdentifier);
74+
byte[] _publicKeyBytes = publicKey.bytes();
7575

7676
byte[] protectedMkgData = "protectedMkgMessage".getBytes(StandardCharsets.UTF_8);
7777
String protectedMkgEncryptionPolicy = "Department::MKG && Security Level::Protected";
@@ -106,10 +106,10 @@ public void testDocDemoKMS() throws CloudproofException {
106106

107107
// as with the master keys, the user keys can be exported to be used with the
108108
// native library
109-
// PrivateKey confidentialMkgUserKey_ =
110-
// kmsClient.retrieveCoverCryptUserDecryptionKey(confidentialMkgUserKeyUid);
111-
// PrivateKey topSecretMkgFinUserKey =
112-
// kmsClient.retrieveCoverCryptUserDecryptionKey(topSecretMkgFinUserKeyUid);
109+
PrivateKey confidentialMkgUserKey_ =
110+
kmsClient.retrieveCoverCryptUserDecryptionKey(confidentialMkgUserKeyUid);
111+
PrivateKey topSecretMkgFinUserKey =
112+
kmsClient.retrieveCoverCryptUserDecryptionKey(topSecretMkgFinUserKeyUid);
113113

114114
// The confidential marketing user can successfully decrypt a low-security
115115
// marketing message
@@ -180,7 +180,8 @@ public void testDocDemoKMS() throws CloudproofException {
180180
assert !Arrays.equals(oldConfidentialMkgUserKey.bytes(), rekeyedConfidentialMkgUserKey.bytes());
181181

182182
// Decrypting the "old" `protected marketing` message
183-
DecryptedData protectedMkg__ = CoverCrypt.decrypt(rekeyedConfidentialMkgUserKey.bytes(), protectedMkgCT, Optional.empty());
183+
DecryptedData protectedMkg__ =
184+
CoverCrypt.decrypt(rekeyedConfidentialMkgUserKey.bytes(), protectedMkgCT, Optional.empty());
184185
assert Arrays.equals(protectedMkgData, protectedMkg__.getPlaintext());
185186

186187
// Decrypting the "new" `confidential marketing` message

src/test/java/com/cosmian/TestNativeCoverCrypt.java

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,23 @@ public void testHybridCryptoWithHeaderMetadata() throws Exception {
267267
}
268268

269269
public static Policy policy() throws CloudproofException {
270-
return new Policy(20, new PolicyAxis[] {
271-
new PolicyAxis("Security Level",
272-
new PolicyAxisAttribute[] {new PolicyAxisAttribute("Protected", false),
273-
new PolicyAxisAttribute("Confidential", false), new PolicyAxisAttribute("Top Secret", true)},
274-
true),
275-
new PolicyAxis("Department", new PolicyAxisAttribute[] {new PolicyAxisAttribute("FIN", false),
276-
new PolicyAxisAttribute("MKG", false), new PolicyAxisAttribute("HR", false)}, false)});
270+
return new Policy(20, // maximum number of creation of partition values
271+
new PolicyAxis[] {
272+
new PolicyAxis("Security Level",
273+
new PolicyAxisAttribute[] {
274+
new PolicyAxisAttribute("Protected", false),
275+
new PolicyAxisAttribute("Confidential", false),
276+
// the following attribute is hybridized allowing post-quantum resistance
277+
new PolicyAxisAttribute("Top Secret", true)},
278+
true // this axis is hierarchical
279+
),
280+
new PolicyAxis("Department",
281+
new PolicyAxisAttribute[] {
282+
new PolicyAxisAttribute("FIN", false),
283+
new PolicyAxisAttribute("MKG", false),
284+
new PolicyAxisAttribute("HR", false)},
285+
false // this axis is NOT hierarchical
286+
)});
277287
}
278288

279289
private String accessPolicyConfidential() throws CloudproofException {

0 commit comments

Comments
 (0)