diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2e910151..e3e84ed2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -8,7 +8,7 @@ on: - main jobs: scriptcheck: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: 🦪 ✔ 🧼🧼🧼 diff --git a/.github/workflows/xtest.yml b/.github/workflows/xtest.yml index c842205d..efbcf3a8 100644 --- a/.github/workflows/xtest.yml +++ b/.github/workflows/xtest.yml @@ -42,7 +42,7 @@ on: jobs: cross-client-test: timeout-minutes: 60 - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest permissions: contents: read packages: read diff --git a/xtest/requirements.txt b/xtest/requirements.txt index e79421da..73b17ff9 100644 --- a/xtest/requirements.txt +++ b/xtest/requirements.txt @@ -8,7 +8,6 @@ cryptography==43.0.1 idna==3.8 iniconfig==2.0.0 jsonschema==4.23.0 -opentdf==1.5.5 packaging==24.1 pluggy==1.5.0 pycparser==2.22 diff --git a/xtest/sdk/py/cli.py b/xtest/sdk/py/cli.py deleted file mode 100644 index 53071896..00000000 --- a/xtest/sdk/py/cli.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import sys -import logging -from opentdf import TDFClient, NanoTDFClient, OIDCCredentials, LogLevel, TDFStorageType - -logger = logging.getLogger("xtest") -logging.basicConfig() -logging.getLogger().setLevel(logging.DEBUG) - -CLIENT_ID = os.getenv("CLIENTID", "opentdf") -CLIENT_SECRET = os.getenv("CLIENTSECRET", "secret") -OIDC_ENDPOINT = os.getenv("KCHOST", "http://localhost:8888") -KAS_URL = os.getenv("KASHOST", "http://localhost:8080/kas") -REALM = os.getenv("REALM", "opentdf") - - -def main(): - function, source, target, fileformat = sys.argv[1:5] - - oidc_creds = OIDCCredentials() - oidc_creds.set_client_credentials_client_secret( - client_id=CLIENT_ID, - client_secret=CLIENT_SECRET, - organization_name=REALM, - oidc_endpoint=OIDC_ENDPOINT, - ) - if fileformat.lower() == "nano": - client = NanoTDFClient(oidc_credentials=oidc_creds, kas_url=KAS_URL) - else: - client = TDFClient(oidc_credentials=oidc_creds, kas_url=KAS_URL) - client.enable_console_logging(LogLevel.Info) - - if function == "encrypt": - encrypt_file(client, source, target) - elif function == "decrypt": - decrypt_file(client, source, target) - else: - logger.error("Python -- invalid function type provided") - sys.exit(1) - - -def encrypt_file(client, source, target): - logger.info(f"Python -- Encrypting file {source} to {target}") - sample_txt_storage = TDFStorageType() - sample_txt_storage.set_tdf_storage_file_type(source) - client.encrypt_file(sample_txt_storage, target) - - -def decrypt_file(client, source, target): - logger.info(f"Python -- Decrypting file {source} to {target}") - sample_tdf_storage = TDFStorageType() - sample_tdf_storage.set_tdf_storage_file_type(source) - client.decrypt_file(sample_tdf_storage, target) - - -if __name__ == "__main__": - main() diff --git a/xtest/sdk/py/cli.sh b/xtest/sdk/py/cli.sh deleted file mode 100755 index 088d3306..00000000 --- a/xtest/sdk/py/cli.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# shellcheck disable=SC2206,SC1091 - -# Common shell wrapper used to interface to SDK implementation. -# -# Usage: ./cli.sh -# -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -# shellcheck source=../../test.env -source "$SCRIPT_DIR"/../../test.env - -python3 "$SCRIPT_DIR"/cli.py "$1" "$2" "$3" "$4" "${@:5}"