Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-golang-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: true
matrix:
go-version: [1.22.x]
go-version: [1.24.x]
python3_version: [ "3.11", "3.12" ]

steps:
Expand Down Expand Up @@ -47,4 +47,4 @@ jobs:

# - uses: ./.github/workflows/platform-integration-test.yaml
# with:
# wheel: dist/otdf_python-0.2.12-py3-none-any.whl
# wheel: dist/otdf_python-0.2.14-py3-none-any.whl
8 changes: 4 additions & 4 deletions .github/workflows/build-golang-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: true
matrix:
go-version: [1.22.x]
go-version: [1.24.x]
python3_version: [ "3.11", "3.12" ]

steps:
Expand Down Expand Up @@ -43,12 +43,12 @@ jobs:

- uses: actions/cache/restore@v4
with:
path: dist/otdf_python-0.2.12-py3-none-any.whl
path: dist/otdf_python-0.2.14-py3-none-any.whl
key: ${{ runner.os }}${{ matrix.python3_version }}-data-${{ github.sha }}

- uses: actions/cache/save@v4
with:
path: dist/otdf_python-0.2.12-py3-none-any.whl
path: dist/otdf_python-0.2.14-py3-none-any.whl
key: ${{ runner.os }}${{ matrix.python3_version }}-data-${{ github.sha }}
restore-keys: |
${{ runner.os }}${{ matrix.python3_version }}-data-
Expand All @@ -61,5 +61,5 @@ jobs:
needs: build
uses: ./.github/workflows/platform-integration-test.yaml
with:
wheel: dist/otdf_python-0.2.12-py3-none-any.whl
wheel: dist/otdf_python-0.2.14-py3-none-any.whl
python_version: ${{ matrix.python3_version }}
3 changes: 1 addition & 2 deletions .github/workflows/build-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
go-version: [1.22.x]
# go-version: [ '1.19', '1.20', '1.22.x' ]
go-version: [1.24.x]

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lint-on-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
strategy:
fail-fast: true
matrix:
go-version: [1.22.x]
# go-version: [ '1.19', '1.20', '1.22.x' ]
go-version: [1.24.x]

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lint-on-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
strategy:
fail-fast: true
matrix:
go-version: [1.22.x]
# go-version: [ '1.19', '1.20', '1.22.x' ]
go-version: [1.24.x]

steps:
- uses: actions/checkout@v4
Expand Down
117 changes: 3 additions & 114 deletions .github/workflows/platform-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/cache/restore@v4
with:
path: dist/otdf_python-0.2.12-py3-none-any.whl
path: dist/otdf_python-0.2.14-py3-none-any.whl
key: ${{ runner.os }}${{ inputs.python_version }}-data-${{ github.sha }}

- name: Prove that the input file is available
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: "1.22.x"
go-version: "1.24.x"
check-latest: false
cache-dependency-path: |
platform/service/go.sum
Expand Down Expand Up @@ -125,6 +125,7 @@ jobs:
OPENTDF_HOSTNAME: "localhost:8080"
OIDC_TOKEN_ENDPOINT: "http://localhost:8888/auth/realms/opentdf/protocol/openid-connect/token"
OPENTDF_KAS_URL: "http://localhost:8080/kas"
INSECURE_SKIP_VERIFY: "TRUE"
run: |
mkdir validation
wheel="$(basename ${{ inputs.wheel }} )"
Expand All @@ -136,119 +137,7 @@ jobs:
pip install ./"$wheel"
python validate_otdf_python.py

# - name: Validate the SDK through the command line interface
# run: |
# printf 'here is some data to encrypt' > data

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# encrypt --kas-url=localhost:8080 --mime-type=text/plain --attr https://example.com/attr/attr1/value/value1 --autoconfigure=false -f data -m 'here is some metadata' > test.tdf

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# decrypt -f test.tdf > decrypted

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# metadata -f test.tdf > metadata

# if ! diff -q data decrypted; then
# printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
# exit 1
# fi

# if [ "$(< metadata)" != 'here is some metadata' ]; then
# printf 'metadata is incorrect [%s]\n' "$(< metadata)"
# exit 1
# fi
# working-directory: cmdline

# - name: Encrypt/Decrypt NanoTDF
# run: |
# echo 'here is some data to encrypt' > data

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# encryptnano --kas-url=http://localhost:8080 --attr https://example.com/attr/attr1/value/value1 -f data -m 'here is some metadata' > nano.ntdf

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# decryptnano -f nano.ntdf > decrypted

# if ! diff -q data decrypted; then
# printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
# exit 1
# fi
# working-directory: cmdline

# - uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635
# name: start another KAS server in background
# with:
# run: >
# <opentdf.yaml >opentdf-beta.yaml yq e '
# (.server.port = 8282)
# | (.mode = ["kas"])
# | (.sdk_config = {"endpoint":"http://localhost:8080","plaintext":true,"client_id":"opentdf","client_secret":"secret"})
# '
# && go run ./service --config-file ./opentdf-beta.yaml start
# wait-on: |
# tcp:localhost:8282
# log-output-if: true
# wait-for: 90s
# working-directory: platform
# - name: Make sure that the second platform is up
# run: |
# grpcurl -plaintext localhost:8282 kas.AccessService/PublicKey
# - name: Validate multikas through the command line interface
# run: |
# printf 'here is some data to encrypt' > data

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# encrypt --kas-url=localhost:8080,localhost:8282 -f data -m 'here is some metadata' > test.tdf

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# decrypt -f test.tdf > decrypted

# java -jar target/cmdline.jar \
# --client-id=opentdf-sdk \
# --client-secret=secret \
# --platform-endpoint=localhost:8080 \
# -i \
# metadata -f test.tdf > metadata

# if ! diff -q data decrypted; then
# printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
# exit 1
# fi

# if [ "$(< metadata)" != 'here is some metadata' ]; then
# printf 'metadata is incorrect [%s]\n' "$(< metadata)"
# exit 1
# fi
# working-directory: cmdline

# platform-xtest:
# permissions:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22.x"
go-version: "1.24.x"

- name: Setup project files
run: |
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.24.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/gopy@v0.4.10
go install golang.org/x/tools/cmd/goimports@latest
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-arm64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.24.3.linux-arm64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/gopy@v0.4.10
go install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -181,7 +181,7 @@ jobs:
# - name: set up Go
# uses: actions/setup-go@v3
# with:
# go-version: "1.22.x"
# go-version: "1.24.x"

# - name: install gopy
# run: go install github.com/go-python/gopy@v0.4.10
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22.x"
go-version: "1.24.x"

- name: Setup project files
run: |
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.24.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/gopy@v0.4.10
go install golang.org/x/tools/cmd/goimports@latest
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-arm64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.24.3.linux-arm64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/gopy@v0.4.10
go install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -181,7 +181,7 @@ jobs:
# - name: set up Go
# uses: actions/setup-go@v3
# with:
# go-version: "1.22.x"
# go-version: "1.24.x"

# - name: install gopy
# run: go install github.com/go-python/gopy@v0.4.10
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Install from the [Python Package Index (PyPI)](https://pypi.org):
pip install otdf_python

# Install a pinned version
pip install otdf-python==0.2.12
pip install otdf-python==0.2.14

# Install a pinned version, from test.pypi.org
pip install -i https://test.pypi.org/simple/ otdf-python==0.2.12
pip install -i https://test.pypi.org/simple/ otdf-python==0.2.14
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ echo "✨✨✨ Build wheel"
poetry run python3 setup.py bdist_wheel

echo "✨✨✨ Install wheel"
pip install dist/otdf_python-0.2.12-py3-none-any.whl
pip install dist/otdf_python-0.2.14-py3-none-any.whl
2 changes: 1 addition & 1 deletion build-scripts/make_and_validate_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ python3 -m pip install --upgrade setuptools wheel
python3 setup.py bdist_wheel

# Prove that the wheel can be installed
pip install dist/otdf_python-0.2.12-py3-none-any.whl
pip install dist/otdf_python-0.2.14-py3-none-any.whl

if [[ "$SKIP_TESTS" == "-s" || "$SKIP_TESTS" == "--skip-tests" ]]; then
echo "Build is complete, skipping tests."
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/uv_make_and_validate_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ loud_print "Installing wheel"
uv venv .venv-wheel --python 3.12 "$PY_TYPE"
source "${BUILD_ROOT}/.venv-wheel/bin/activate"
pip install pybindgen
pip install dist/otdf_python-0.2.12-py3-none-any.whl
pip install dist/otdf_python-0.2.14-py3-none-any.whl

if [[ "$SKIP_TESTS" == "-s" || "$SKIP_TESTS" == "--skip-tests" ]]; then
echo "Build is complete, skipping tests."
Expand Down
20 changes: 9 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module gotdf_python

go 1.24.0

toolchain go1.24.2
go 1.24.3

require github.com/opentdf/platform/sdk v0.4.4

Expand All @@ -13,7 +11,7 @@ require (
github.com/goccy/go-json v0.10.5 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gowebpki/jcs v1.0.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/lestrrat-go/blackmagic v1.0.3 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
Expand All @@ -27,13 +25,13 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/oauth2 v0.29.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.24.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250428153025-10db94c68c34 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect
google.golang.org/grpc v1.72.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
)
Loading
Loading