Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3c309f6
Begin rewrite in pure Python
b-long Jun 23, 2025
bddba91
Organize: git mv src/otdf_python/test_*.py tests/
b-long Jul 30, 2025
fcf723e
Format according to 'ruff'
b-long Jul 30, 2025
b4df15d
Fix static analysis
b-long Jul 30, 2025
4dddd0e
Cleanup and organize tests/test_validate_otdf_python.py
b-long Jul 30, 2025
098ba22
Remove 'TDFConfig' type from 'otdf_python.tdf'
b-long Jul 30, 2025
f789166
Fix description & formatting
b-long Jul 30, 2025
4d586a3
Add 'pydantic-settings' to dev & update dependencies
b-long Jul 30, 2025
bc705ec
Correct version number
b-long Jul 30, 2025
9269a9e
Cleanup and fix OIDC tests
b-long Jul 30, 2025
2a3841c
Comment old style integration test
b-long Jul 30, 2025
e38526c
Execute majority of tests
b-long Jul 30, 2025
762a939
Allow import from 'tests'
b-long Jul 31, 2025
bb9d16b
Fix string encryption test
b-long Aug 1, 2025
8df1854
Remove dead code
b-long Aug 1, 2025
d6f19f0
Adjust integration test
b-long Aug 1, 2025
5f63636
Remove old build scripts
b-long Aug 1, 2025
0384137
Update README
b-long Aug 1, 2025
01b3b9d
Update GHA triggers
b-long Aug 1, 2025
912ff4a
Fix endpoint URL and TLS verification
b-long Aug 4, 2025
8b4a535
✅ Significant update 143 out of 150 tests passing
b-long Aug 4, 2025
0669650
Run all tests, except integration
b-long Aug 8, 2025
e6a83d3
Update GHA configuration
b-long Aug 8, 2025
c792967
Mark integration tests
b-long Aug 8, 2025
fa796e5
Fix mocked tests/test_kas_client.py
b-long Aug 8, 2025
a822bc6
Mark integration tests
b-long Aug 8, 2025
e381632
Only build for 3.13 (temporary)
b-long Aug 8, 2025
78d760d
Merge branch 'main' into chore/rewrite
b-long Aug 8, 2025
eb14223
Update license
b-long Aug 8, 2025
adfdbdd
Enable and fix integration tests in CI
b-long Aug 8, 2025
30a6375
Improve support for plaintext
b-long Aug 8, 2025
8d06656
Make log collection optional
b-long Aug 8, 2025
336d169
Fix tests for plaintext
b-long Aug 8, 2025
9ecee9e
Fix docstrings
b-long Aug 8, 2025
6976cbb
Fix docstrings
b-long Aug 9, 2025
a96a138
Extract Connect RPC class
b-long Aug 9, 2025
2d48aea
Fix additional roundtrip testing
b-long Aug 9, 2025
6361b22
Fix tests after kas_client updates
b-long Aug 9, 2025
3cc1ebc
Expand KAS client integration tests
b-long Aug 9, 2025
cc47a52
Fix mimeType
b-long Aug 9, 2025
66e04e1
Expand testing, fix compression bug
b-long Aug 9, 2025
e820de7
Auto-use check_for_otdfctl fixture
b-long Aug 10, 2025
781c8c0
Expand static analysis, fix FURB188
b-long Aug 10, 2025
01b8169
Use 'NULL_POLICY_UUID' for now
b-long Aug 10, 2025
1dc83a8
Update kas_client.py & tdf.py, expand tests
b-long Aug 10, 2025
f2e28ba
Expand & organize integration tests
b-long Aug 10, 2025
fbc5529
Expand static analysis, fix PT018
b-long Aug 10, 2025
791b6c9
Use configurable attrs in testing
b-long Aug 10, 2025
5d132c1
Use configurable attrs in testing
b-long Aug 10, 2025
b66294e
Examine entitlements in CI
b-long Aug 10, 2025
ed87839
Extract 'temp_credentials_file' fixture
b-long Aug 10, 2025
155121f
Rename file
b-long Aug 10, 2025
468db62
Modernize release workflows
b-long Aug 11, 2025
dc56ef0
Modernize release workflows
b-long Aug 11, 2025
58f5558
Update release workflow
b-long Aug 11, 2025
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
58 changes: 58 additions & 0 deletions .github/check_entitlements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash


# Derive additional environment variables
TOKEN_URL="${OIDC_OP_TOKEN_ENDPOINT}"
OTDF_HOST_AND_PORT="${OPENTDF_PLATFORM_HOST}"
OTDF_CLIENT="${OPENTDF_CLIENT_ID}"
OTDF_CLIENT_SECRET="${OPENTDF_CLIENT_SECRET}"

# Enable debug mode
DEBUG=1

echo "🔧 Environment Configuration:"
echo " TOKEN_URL: ${TOKEN_URL}"
echo " OTDF_HOST_AND_PORT: ${OTDF_HOST_AND_PORT}"
echo " OTDF_CLIENT: ${OTDF_CLIENT}"
echo " OTDF_CLIENT_SECRET: ${OTDF_CLIENT_SECRET}"
echo ""

get_token() {
curl -k --location "$TOKEN_URL" \
--header "X-VirtruPubKey;" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "client_id=$OTDF_CLIENT" \
--data-urlencode "client_secret=$OTDF_CLIENT_SECRET"
}

echo "🔐 Getting access token..."
BEARER=$( get_token | jq -r '.access_token' )
[[ "${DEBUG:-}" == "1" ]] && echo "Got Access Token: ${BEARER}"
echo ""

# Array of usernames to check
USERNAMES=("opentdf" "sample-user" "sample-user-1" "cli-client" "opentdf-sdk")

for USERNAME in "${USERNAMES[@]}"; do
echo "👤 Fetching entitlements for username: ${USERNAME}"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

grpcurl -plaintext \
-H "authorization: Bearer $BEARER" \
-d "{
\"entities\": [
{
\"userName\": \"$USERNAME\"
}
]
}" \
"$OTDF_HOST_AND_PORT" \
authorization.AuthorizationService/GetEntitlements

echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "✅ Entitlements retrieval complete for ${USERNAME}!"
echo ""
done

echo "🎉 All entitlement checks completed!"
50 changes: 0 additions & 50 deletions .github/workflows/build-golang-macos.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/build-golang-ubuntu.yaml

This file was deleted.

81 changes: 45 additions & 36 deletions .github/workflows/build-python.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,53 @@
---
name: Build Python package(s)

# Build otdf-python wheel using uv and output the wheel path for downstream workflows
name: "Build Python Wheel"
on:
push:
branches:
- disabled
push:
branches:
- chore/rewrite
pull_request:

jobs:
build:
build:
runs-on: ubuntu-22.04
outputs:
wheel: ${{ steps.find_wheel.outputs.wheel_path }}
steps:
- name: Checkout this repo
uses: actions/checkout@v4

runs-on: ubuntu-22.04
strategy:
matrix:
go-version: [1.24.x]
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

steps:
- uses: actions/checkout@v4
# - name: Setup Go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ matrix.go-version }}
# cache-dependency-path: go.sum
# - name: Install dependencies
# run: go get .
# - name: Test with Go
# run: go test -timeout 40s -run ^TestHello$ gotdf_python -count=1 # go test
- name: Build otdf-python wheel using uv
run: |
uv sync --frozen
uv build
shell: bash

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install poetry
- name: Invoke pylint with all dependencies
run: |
# Since we don't have our wheel build / install configured yet we use '--no-root'
poetry install --no-root
- name: Find built wheel
id: find_wheel
run: |
wheel_path=$(ls dist/*.whl | head -n1)
echo "wheel_path=$wheel_path" >> $GITHUB_OUTPUT
shell: bash

# poetry install
- name: Upload wheel as artifact
uses: actions/upload-artifact@v4
with:
name: python-wheel
path: dist/*.whl

# Bring this back later
# poetry run pytest tests/
integration-test:
strategy:
fail-fast: true
matrix:
# python3_version: ["3.12", "3.13"]
python3_version: ["3.13"]
needs: build
uses: ./.github/workflows/platform-integration-test-new.yaml
with:
wheel: ${{ needs.build.outputs.wheel }}
python_version: ${{ matrix.python3_version }}
34 changes: 0 additions & 34 deletions .github/workflows/lint-on-macos.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/lint-on-ubuntu.yaml

This file was deleted.

Loading
Loading