Skip to content

Commit df4682d

Browse files
Copilotmkleene
andauthored
chore(fips): merge main into fips
Merges main (v0.15.0) into the fips branch. Conflict resolution: - ECKeyPair.java: Combined main's structure (ECCurve enum, KeyPair field, new methods like getPEMPublicKeyFromX509Cert) with fips's FIPS-compatible crypto changes (no explicit BouncyCastle provider, standard Java interfaces for ECPublicKey/ECPrivateKey, KeyFactory.getInstance("EC")). - ECKeyPairTest.java: Kept fips's removal of extractPemPubKeyFromX509 test (which used BC-specific .getQ()), incorporated main's new createSymmetricKeysWithOtherCurves test, and enabled publicKeyFromECPoint assertion using ECCurve.getCurveName(). - NanoTDF.java: Accepted main's deletion since all NanoTDF dependencies (ECCMode, NanoTDFType, etc.) were also removed in main. Signed-off-by: GitHub <noreply@github.com> Co-authored-by: mkleene <262667+mkleene@users.noreply.github.com>
2 parents b4327f4 + 9991b07 commit df4682d

94 files changed

Lines changed: 5280 additions & 3828 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

release-please_main-branch.json renamed to .github/release-please/release-please-config.main.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
{
1313
"type": "generic",
1414
"path": "cmdline/src/main/java/io/opentdf/platform/Command.java"
15+
},
16+
{
17+
"type": "generic",
18+
"path": "sdk/src/main/java/io/opentdf/platform/sdk/Version.java"
1519
}
1620
]
1721
}

release-please_release-branches.json renamed to .github/release-please/release-please-config.release_branches.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
{
1313
"type": "generic",
1414
"path": "cmdline/src/main/java/io/opentdf/platform/Command.java"
15+
},
16+
{
17+
"type": "generic",
18+
"path": "sdk/src/main/java/io/opentdf/platform/sdk/Version.java"
1519
}
1620
]
1721
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.15.0"
3+
}

.github/workflows/checks.yaml

Lines changed: 17 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- main
7+
- 'release/**'
78
push:
89
branches:
910
- main
@@ -42,18 +43,22 @@ jobs:
4243
revert
4344
# Scopes include:
4445
# - ci: anything related to ci
45-
# - cmdline: changes to @opentdf/ctl
46+
# - cmdline: changes to cmdline
4647
# - docs: anything related solely to documentation
4748
# - main: bot generated commits
48-
# - sdk: changes to @opentdf/sdk (was lib)
49+
# - sdk: changes to sdk
4950
# - tests: test only changes
51+
# - examples: examples only changes
52+
# - release/v0.\d+: release-please release branch PRs
5053
scopes: |
5154
ci
5255
cmdline
5356
docs
5457
main
5558
sdk
5659
tests
60+
examples
61+
release/v0\.\d+
5762
5863
mavenverify:
5964
runs-on: ubuntu-latest
@@ -72,7 +77,7 @@ jobs:
7277
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
7378
with:
7479
java-version: "17"
75-
distribution: "adopt"
80+
distribution: "temurin"
7681
server-id: github
7782
- name: Cache SonarCloud packages
7883
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
@@ -100,7 +105,7 @@ jobs:
100105
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
101106
with:
102107
java-version: "17"
103-
distribution: "adopt"
108+
distribution: "temurin"
104109
server-id: github
105110
- name: Build java SDK
106111
run: |
@@ -114,14 +119,14 @@ jobs:
114119
uses: opentdf/platform/test/start-up-with-containers@main
115120
with:
116121
platform-ref: main
117-
122+
118123
- name: Get grpcurl
119124
run: go install github.com/fullstorydev/grpcurl/cmd/grpcurl@v1.8.9
120125
- name: Make sure that the platform is up
121126
run: |
122127
grpcurl -plaintext localhost:8080 list && \
123128
grpcurl -plaintext localhost:8080 kas.AccessService/PublicKey
124-
129+
125130
- name: Validate the SDK through the command line interface
126131
run: |
127132
printf 'here is some data to encrypt' > data
@@ -158,30 +163,6 @@ jobs:
158163
fi
159164
working-directory: cmdline
160165

161-
- name: Encrypt/Decrypt NanoTDF
162-
run: |
163-
echo 'here is some data to encrypt' > data
164-
165-
java -jar target/cmdline.jar \
166-
--client-id=opentdf-sdk \
167-
--client-secret=secret \
168-
--platform-endpoint=http://localhost:8080 \
169-
-h\
170-
encryptnano --kas-url=http://localhost:8080 --attr https://example.com/attr/attr1/value/value1 -f data -m 'here is some metadata' > nano.ntdf
171-
172-
java -jar target/cmdline.jar \
173-
--client-id=opentdf-sdk \
174-
--client-secret=secret \
175-
--platform-endpoint=http://localhost:8080 \
176-
-h\
177-
decryptnano -f nano.ntdf > decrypted
178-
179-
if ! diff -q data decrypted; then
180-
printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
181-
exit 1
182-
fi
183-
working-directory: cmdline
184-
185166
- name: Encrypt/Decrypt Assertions
186167
run: |
187168
echo "basic assertions"
@@ -202,7 +183,7 @@ jobs:
202183
--platform-endpoint=http://localhost:8080 \
203184
-h\
204185
decrypt -f test.tdf > decrypted
205-
186+
206187
if ! diff -q data decrypted; then
207188
printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
208189
exit 1
@@ -233,7 +214,7 @@ jobs:
233214
--platform-endpoint=http://localhost:8080 \
234215
-h\
235216
decrypt --with-assertion-verification-keys="$SIGNED_ASSERTION_VERIFICATON_HS256" -f test.tdf > decrypted
236-
217+
237218
if ! diff -q data decrypted; then
238219
printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
239220
exit 1
@@ -254,69 +235,25 @@ jobs:
254235
--platform-endpoint=http://localhost:8080 \
255236
-h\
256237
decrypt --with-assertion-verification-keys "$SIGNED_ASSERTION_VERIFICATON_RS256" -f test.tdf > decrypted
257-
258-
if ! diff -q data decrypted; then
259-
printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
260-
exit 1
261-
fi
262-
working-directory: cmdline
263-
264-
- name: Start additional kas
265-
uses: opentdf/platform/test/start-additional-kas@main
266-
with:
267-
kas-port: 8282
268-
kas-name: beta
269-
270-
- name: Make sure that the second platform is up
271-
run: |
272-
grpcurl -plaintext localhost:8282 kas.AccessService/PublicKey
273-
- name: Validate multikas through the command line interface
274-
run: |
275-
printf 'here is some data to encrypt' > data
276-
277-
java -jar target/cmdline.jar \
278-
--client-id=opentdf-sdk \
279-
--client-secret=secret \
280-
--platform-endpoint=http://localhost:8080 \
281-
-h\
282-
encrypt --kas-url=http://localhost:8080,http://localhost:8282 -f data -m 'here is some metadata' > test.tdf
283-
284-
java -jar target/cmdline.jar \
285-
--client-id=opentdf-sdk \
286-
--client-secret=secret \
287-
--platform-endpoint=http://localhost:8080 \
288-
-h\
289-
decrypt -f test.tdf --kas-allowlist http://localhost:8080,http://localhost:8282 > decrypted
290-
291-
java -jar target/cmdline.jar \
292-
--client-id=opentdf-sdk \
293-
--client-secret=secret \
294-
--platform-endpoint=http://localhost:8080 \
295-
-h\
296-
metadata -f test.tdf --kas-allowlist http://localhost:8080,http://localhost:8282 > metadata
297238
298239
if ! diff -q data decrypted; then
299240
printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
300241
exit 1
301242
fi
302-
303-
if [ "$(< metadata)" != 'here is some metadata' ]; then
304-
printf 'metadata is incorrect [%s]\n' "$(< metadata)"
305-
exit 1
306-
fi
307243
working-directory: cmdline
308244

309245
platform-xtest:
310246
permissions:
311247
contents: read
312248
packages: read
313-
needs: platform-integration
249+
checks: write
250+
pull-requests: write
314251
uses: opentdf/tests/.github/workflows/xtest.yml@main
315252
with:
316253
focus-sdk: java
317254
java-ref: ${{ github.ref }} latest
318-
platform-ref: main lts
319-
255+
platform-ref: main latest
256+
320257
ci:
321258
needs:
322259
- platform-integration

.github/workflows/codeql.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
schedule:
55
- cron: '0 13 * * 1' # At 1:00 PM UTC every Monday
66
pull_request:
7-
paths:
8-
- '.github/workflows/codeql.yaml'
97

108
jobs:
119
analyze:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish Dev Artifact
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
publish-dev-artifact:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
16+
- name: Setup Buf
17+
uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99 # v1.50.0
18+
with:
19+
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Cache Maven packages
22+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
23+
with:
24+
path: ~/.m2
25+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
26+
restore-keys: ${{ runner.os }}-m2
27+
28+
- name: Set up JDK
29+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
30+
with:
31+
java-version: "17"
32+
distribution: "temurin"
33+
34+
- name: Build cmdline
35+
run: mvn --batch-mode clean package -DskipTests
36+
env:
37+
BUF_INPUT_HTTPS_USERNAME: opentdf-bot
38+
BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN_OPENTDF }}
39+
40+
- name: Update dev tag
41+
run: |
42+
git tag -f dev
43+
git push origin dev -f
44+
45+
- name: Publish dev release
46+
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
47+
with:
48+
tag_name: dev
49+
name: "dev (${{ github.sha }})"
50+
body: |
51+
Development build from main branch.
52+
53+
**Commit:** [`${{ github.sha }}`](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
54+
prerelease: true
55+
files: cmdline/target/cmdline.jar

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
if: github.ref == 'refs/heads/main'
3636
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3737
with:
38-
java-version: "11"
39-
distribution: "adopt"
38+
java-version: "17"
39+
distribution: "temurin"
4040
# write settings.xml
4141
server-id: github-pkg
4242
server-username: GITHUB_ACTOR
@@ -57,8 +57,8 @@ jobs:
5757
if: startsWith(github.ref, 'refs/tags/')
5858
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
5959
with:
60-
java-version: "11"
61-
distribution: "adopt"
60+
java-version: "17"
61+
distribution: "temurin"
6262
# write settings.xml
6363
server-id: central
6464
server-username: MAVEN_USERNAME

0 commit comments

Comments
 (0)