Skip to content

Commit 21d210e

Browse files
committed
chore: Merge branch 'release/v6.0.0'
2 parents 6dcfe47 + b7103c4 commit 21d210e

33 files changed

+815
-382
lines changed

.classpath

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/maven.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
KMS_SHARED_PATH: /tmp
5858
ports:
5959
- 9998:9998
60+
findex_cloud:
61+
image: ghcr.io/cosmian/findex_cloud:0.1.0
62+
ports:
63+
- 8080:8080
6064

6165
redis:
6266
image: redis
@@ -97,27 +101,44 @@ jobs:
97101
run: mvn compile
98102
env:
99103
COSMIAN_SERVER_URL: http://kms:9998
104+
COSMIAN_FINDEX_CLOUD_BASE_URL: http://findex_cloud:8080
100105
REDIS_HOSTNAME: redis
101106
REDIS_PORT: 6379
102107
LANG: en_US.UTF-8
103108
LANGUAGE: en_US:en
104109
LC_ALL: en_US.UTF-8
105110

106-
- name: Test with Maven
107-
run: mvn test
111+
- name: Package and test with Maven
112+
run: |
113+
mvn package
114+
mvn dependency:copy-dependencies
108115
env:
109116
COSMIAN_SERVER_URL: http://kms:9998
117+
COSMIAN_FINDEX_CLOUD_BASE_URL: http://findex_cloud:8080
110118
REDIS_HOSTNAME: redis
111119
REDIS_PORT: 6379
112120
LANG: en_US.UTF-8
113121
LANGUAGE: en_US:en
114122
LC_ALL: en_US.UTF-8
115123

124+
- name: Upload dependencies and source
125+
if: startsWith(github.ref, 'refs/tags/')
126+
uses: actions/upload-artifact@v3
127+
with:
128+
name: cloudproof_java_${{ github.ref_name }}
129+
path: |
130+
.
131+
!.git
132+
!.mypy_cache
133+
retention-days: 1
134+
if-no-files-found: error
135+
116136
- name: Bench with Maven
117137
if: startsWith(github.ref, 'refs/tags/')
118138
run: mvn test -Dtest='TestBenchesCoverCrypt'
119139
env:
120140
COSMIAN_SERVER_URL: http://kms:9998
141+
COSMIAN_FINDEX_CLOUD_BASE_URL: http://findex_cloud:8080
121142
REDIS_HOSTNAME: redis
122143
REDIS_PORT: 6379
123144
LANG: en_US.UTF-8
@@ -162,7 +183,7 @@ jobs:
162183
needs: build_in_docker
163184
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_flutter.yml@develop
164185
with:
165-
branch: develop
186+
branch: v7.0.0
166187
target: x86_64-unknown-linux-gnu
167188
extension: so
168189
copy_fresh_build: false

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ project/
77
.settings/org.*
88
.project
99
cloudproof_java.code-workspace
10+
.classpath
11+
.settings/*.prefs

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ repos:
2121
- id: htmlhint
2222
- id: dockerfile_lint
2323
- id: markdown-toc
24-
args: [--bullets="-"] # comment this to refresh TOC
2524

2625
- repo: https://github.com/pre-commit/mirrors-prettier
2726
rev: v3.0.0-alpha.4
@@ -36,7 +35,7 @@ repos:
3635
rev: v0.32.2
3736
hooks:
3837
- id: markdownlint-fix
39-
args: [--disable=MD013, --disable=MD024, --disable=MD041]
38+
args: [--disable=MD004, --disable=MD013, --disable=MD024, --disable=MD041]
4039

4140
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
4241
rev: 0.2.2

CHANGELOG.md

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

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

5+
## [6.0.0] - 2023-06-01
6+
7+
### Features
8+
9+
- upgrade Findex (v3.0.0 -> v4.0.0):
10+
- change indexed values size (require a reset of the index database)
11+
- change search interface
12+
- remove `maxResultsPerKeyword`
13+
- remove `maxDepth`
14+
- remove `insecureFetchChainsBatchSize`
15+
- searching for a non indexed keyword leads to an empty `Set` for this
16+
keyword in the search results instead of this keyword being missing from
17+
the results.
18+
- change upsert interface:
19+
- add deletions parameter
20+
- change compact interface:
21+
- change parameter order
22+
523
---
624

725
## [5.0.0] - 2023-03-08

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ Cloudproof Encryption secures data repositories and applications in the cloud wi
99
<!-- toc -->
1010

1111
- [Licensing](#licensing)
12+
- [Cryptographic primitives](#cryptographic-primitives)
1213
- [Getting started](#getting-started)
1314
- [Benchmarks](#benchmarks)
1415
- [Versions Correspondence](#versions-correspondence)
1516
- [Using in Java projects](#using-in-java-projects)
16-
- [Download required native libraries](#download-required-native-libraries)
17-
- [Building the native libraries on your own](#building-the-native-libraries-on-your-own)
17+
* [Download required native libraries](#download-required-native-libraries)
18+
* [Building the native libraries on your own](#building-the-native-libraries-on-your-own)
1819

1920
<!-- tocstop -->
2021

@@ -103,6 +104,7 @@ From the version 5.0.0, `cloudproof_java` depends on [cloudproof_rust](https://g
103104
| This lib | KMS Server | Cloudproof Rust lib |
104105
|----------|------------|---------------------|
105106
| 5.0.0 | 4.3.3 | 1.0.0 |
107+
| 6.0.0 | 4.3.3 | 2.0.1 |
106108

107109
## Using in Java projects
108110

@@ -112,7 +114,7 @@ This library is open-source software and is available on Maven Central.
112114
<dependency>
113115
<groupId>com.cosmian</groupId>
114116
<artifactId>cloudproof_java</artifactId>
115-
<version>5.0.0</version>
117+
<version>6.0.0</version>
116118
</dependency>
117119
```
118120

bump_version.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

pom.xml

Lines changed: 2 additions & 7 deletions
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>5.0.0</version>
8+
<version>6.0.0</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>
@@ -40,7 +40,7 @@
4040
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4141
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
4242
<jna.version>5.12.1</jna.version>
43-
<jackson.version>2.14.1</jackson.version>
43+
<jackson.version>2.14.2</jackson.version>
4444
</properties>
4545
<dependencies>
4646
<dependency>
@@ -74,11 +74,6 @@
7474
<artifactId>jna</artifactId>
7575
<version>${jna.version}</version>
7676
</dependency>
77-
<!-- <dependency>
78-
<groupId>com.rover12421.android</groupId>
79-
<artifactId>dx</artifactId>
80-
<version>1.16</version>
81-
</dependency> -->
8277
<!-- Scope test -->
8378
<dependency>
8479
<groupId>org.junit.jupiter</groupId>

scripts/get_native_libraries.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,21 @@
55
from os import getenv, path, remove
66

77

8-
def files_to_be_copied(name: str):
8+
def files_to_be_copied():
99
"""
1010
Returns the list of files to be copied
1111
"""
1212
destination = 'src/main/resources'
1313
return {
14-
f'tmp/x86_64-apple-darwin/x86_64-apple-darwin/release/libcloudproof_{name}.dylib': f'{destination}/darwin-x86-64/libcloudproof_{name}.dylib',
15-
f'tmp/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/release/libcloudproof_{name}.so': f'{destination}/linux-x86-64/libcloudproof_{name}.so',
16-
f'tmp/x86_64-pc-windows-gnu/x86_64-pc-windows-gnu/release/cloudproof_{name}.dll': f'{destination}/win32-x86-64/cloudproof_{name}.dll',
14+
'tmp/x86_64-apple-darwin/x86_64-apple-darwin/release/libcloudproof.dylib': f'{destination}/darwin-x86-64/libcloudproof.dylib',
15+
'tmp/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/release/libcloudproof.so': f'{destination}/linux-x86-64/libcloudproof.so',
16+
'tmp/x86_64-pc-windows-gnu/x86_64-pc-windows-gnu/release/cloudproof.dll': f'{destination}/win32-x86-64/cloudproof.dll',
1717
}
1818

1919

2020
def download_native_libraries(version: str) -> bool:
2121
"""Download and extract native libraries"""
22-
to_be_copied = files_to_be_copied('findex')
23-
cover_crypt_files = files_to_be_copied('cover_crypt')
24-
to_be_copied.update(cover_crypt_files)
22+
to_be_copied = files_to_be_copied()
2523

2624
missing_files = False
2725
for key, value in to_be_copied.items():
@@ -39,6 +37,7 @@ def download_native_libraries(version: str) -> bool:
3937
(status code: {request.getcode()})'
4038
)
4139
else:
40+
print(f'Copying new files from cloudproof_rust {version}')
4241
if path.exists('tmp'):
4342
shutil.rmtree('tmp')
4443
if path.exists('all.zip'):
@@ -63,6 +62,6 @@ def download_native_libraries(version: str) -> bool:
6362

6463

6564
if __name__ == '__main__':
66-
ret = download_native_libraries('v1.0.0')
65+
ret = download_native_libraries('v2.0.1')
6766
if ret is False and getenv('GITHUB_ACTIONS'):
68-
download_native_libraries('last_build/feature/add_findex')
67+
download_native_libraries('last_build/release/v2.0.1')

src/main/java/com/cosmian/jna/covercrypt/structs/Ffi.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
import java.nio.charset.StandardCharsets;
44
import java.util.Arrays;
5-
import com.sun.jna.ptr.IntByReference;
5+
66
import com.cosmian.jna.covercrypt.ffi.CoverCryptWrapper;
77
import com.cosmian.utils.CloudproofException;
88
import com.sun.jna.Native;
9+
import com.sun.jna.ptr.IntByReference;
910

1011
public class Ffi {
1112

12-
protected static final CoverCryptWrapper instance = (CoverCryptWrapper) Native.load("cloudproof_cover_crypt",
13+
protected static final CoverCryptWrapper instance = (CoverCryptWrapper) Native.load("cloudproof",
1314
CoverCryptWrapper.class);
1415

1516
/**

0 commit comments

Comments
 (0)