-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds polyfill to suppress screensaver fails - Simplifies ability to set attributes in TDF3Encrypt (no longer require attribute objects with KAS url) - Removes ability to pass in an output stream to TDF3Client.encrypt
- Loading branch information
1 parent
091d5e3
commit 9d344cb
Showing
29 changed files
with
9,091 additions
and
10,262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,41 @@ jobs: | |
- run: npm run lint | ||
- run: npm pack | ||
|
||
cli: | ||
needs: | ||
- lib | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./cli | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
cache: 'npm' | ||
cache-dependency-path: './cli/package-lock.json' | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: opentdf-client-lib | ||
path: lib/ | ||
- run: npm uninstall @opentdf/client && npm ci && npm i ../lib/opentdf-client-*.tgz | ||
- run: npm test | ||
- run: npm audit --omit dev && npm audit --audit-level high | ||
- run: npm run license-check | ||
- run: npm run lint | ||
- run: npm pack | ||
- name: Setup BATS | ||
uses: mig4/setup-bats@v1 | ||
with: | ||
bats-version: 1.2.1 | ||
- run: bats bin/opentdf.bats | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: opentdf-cli | ||
path: ./cli/opentdf-cli-*.tgz | ||
|
||
web-app: | ||
needs: | ||
- lib | ||
|
@@ -126,6 +161,8 @@ jobs: | |
backend-roundtrip: | ||
needs: | ||
- cli | ||
- lib | ||
- web-app | ||
runs-on: ubuntu-latest | ||
defaults: | ||
|
@@ -143,6 +180,10 @@ jobs: | |
with: | ||
name: opentdf-client-lib | ||
path: lib/ | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: opentdf-cli | ||
path: cli/ | ||
- uses: yokawasa/[email protected] | ||
with: | ||
setup-tools: | | ||
|
@@ -174,6 +215,7 @@ jobs: | |
deliver-ghp: | ||
needs: | ||
- lib | ||
- cli | ||
- web-app | ||
- scripts | ||
- backend-roundtrip | ||
|
@@ -222,9 +264,8 @@ jobs: | |
${{ steps.guess-build-metadata.outputs.DIST_TAG }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: | ||
echo "- [Client | ||
Library](https://github.com/opentdf/client-web/pkgs/npm/client)">>$GITHUB_STEP_SUMMARY | ||
- run: echo "- [Client Library](https://github.com/opentdf/client-web/pkgs/npm/client)">>$GITHUB_STEP_SUMMARY | ||
- run: echo "- [Command Line Tool](https://github.com/opentdf/client-web/pkgs/npm/cli)">>$GITHUB_STEP_SUMMARY | ||
- name: trigger xtest | ||
run: >- | ||
curl -XPOST -u "virtru-cloudnative:${{secrets.PERSONAL_ACCESS_TOKEN}}" | ||
|
@@ -235,7 +276,7 @@ jobs: | |
env: | ||
FULL_VERSION: ${{ steps.guess-build-metadata.outputs.FULL_VERSION }} | ||
- name: Publish documentation to gh-pages | ||
uses: JamesIves/github-pages-deploy-action@v4.4.1 | ||
uses: JamesIves/github-pages-deploy-action@v4.6.0 | ||
with: | ||
branch: gh-pages | ||
folder: lib/dist/docs | ||
|
@@ -262,11 +303,10 @@ jobs: | |
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: >- | ||
echo "- [Client Library](https://www.npmjs.com/package/@opentdf/client/v/${{ | ||
needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY | ||
echo "- [Client Library](https://www.npmjs.com/package/@opentdf/client/v/${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY | ||
- run: >- | ||
echo "- [Remote Store](https://www.npmjs.com/package/@opentdf/remote-store/v/${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY | ||
- run: >- | ||
echo "- [Remote Store](https://www.npmjs.com/package/@opentdf/remote-store/v/${{ | ||
needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY | ||
echo "- [Command Line Tool](https://www.npmjs.com/package/@opentdf/cli/v/${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY | ||
- run: >- | ||
echo "- [unpkg](https://unpkg.com/browse/@opentdf/client@${{ | ||
needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY | ||
echo "- [unpkg](https://unpkg.com/browse/@opentdf/client@${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env bash | ||
set -exuo pipefail | ||
|
||
APP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" | ||
|
||
cd "$APP_DIR" | ||
|
||
counter=0 | ||
|
||
_nano_test() { | ||
counter=$((counter + 1)) | ||
plain="./sample-${counter}.txt" | ||
echo "Hello World ${counter}" >"./${plain}" | ||
npx "$1" --log-level DEBUG \ | ||
--kasEndpoint http://localhost:65432/api/kas \ | ||
--oidcEndpoint http://localhost:65432/auth/realms/tdf \ | ||
--auth tdf-client:123-456 \ | ||
--output sample.txt.ntdf \ | ||
encrypt "${plain}" \ | ||
--attributes https://example.com/attr/Classification/value/S,https://example.com/attr/COI/value/PRX | ||
|
||
[ -f sample.txt.ntdf ] | ||
|
||
npx "$2" --log-level DEBUG \ | ||
--kasEndpoint http://localhost:65432/api/kas \ | ||
--oidcEndpoint http://localhost:65432/auth/realms/tdf \ | ||
--auth tdf-client:123-456 \ | ||
--output sample_out.txt \ | ||
decrypt sample.txt.ntdf | ||
|
||
[ -f sample_out.txt ] && diff "${plain}" sample_out.txt | ||
|
||
echo "Roundtrip nanotdf $1 -> $2 successful!" | ||
rm -f "${plain}" sample.txt.ntdf sample_out.txt | ||
} | ||
|
||
_nano_test @opentdf/cli @opentdf/cli | ||
|
||
_tdf3_test() { | ||
counter=$((counter + 1)) | ||
plain="./sample-${counter}.txt" | ||
echo "Hello World ${counter}" >"${plain}" | ||
npx "$1" --log-level DEBUG \ | ||
--kasEndpoint http://localhost:65432/api/kas \ | ||
--oidcEndpoint http://localhost:65432/auth/realms/tdf \ | ||
--auth tdf-client:123-456 \ | ||
--output sample.txt.tdf \ | ||
encrypt "${plain}" \ | ||
--containerType tdf3 \ | ||
--attributes https://example.com/attr/Classification/value/S,https://example.com/attr/COI/value/PRX | ||
|
||
[ -f sample.txt.tdf ] | ||
|
||
npx "$2" --log-level DEBUG \ | ||
--kasEndpoint http://localhost:65432/api/kas \ | ||
--oidcEndpoint http://localhost:65432/auth/realms/tdf \ | ||
--auth tdf-client:123-456 \ | ||
--output sample_out.txt \ | ||
--containerType tdf3 \ | ||
decrypt sample.txt.tdf | ||
|
||
[ -f sample_out.txt ] && diff "${plain}" sample_out.txt | ||
|
||
echo "Roundtrip tdf3 $1 -> $2 successful!" | ||
rm -f "${plain}" sample.txt.tdf sample_out.txt | ||
} | ||
|
||
_tdf3_test @opentdf/cli @opentdf/cli |
Oops, something went wrong.