Files
floci/compatibility-tests/sdk-test-python
TATSUNO “Taz” Yasuhiro ffe8a92635 perf(build): replace BouncyCastle with JDK crypto API as much as possible (#2988)
* perf(security): stop registering the BouncyCastle JCE provider

ACM signs through the JDK and builds PBES2 there, and KMS PSS
uses RSASSA-PSS with the parameters AWS specifies.
Downsize Docker image from 88.7 to 83.9 MB gzipped.

* test(compat): verify the native image's KMS and ACM crypto from outside Floci

Floci verifying its own signature proves nothing. Signatures now check against
GetPublicKey with an outside library, exported keys are decrypted, and issued
certificates verify their own signature.

* fix(kms): apply real PSS padding when signing a digest with RSASSA_PSS

* fix(acm): set the PBES2 salt and iteration count explicitly

* perf(kms): reuse the shared SecureRandom when signing a PSS digest

* fix(kms): let AwsException pass through the sign and verify catch blocks

* perf(native): drop the native-image config the BouncyCastle provider needed

Five --initialize-at-run-time entries and 21 reflect-config entries existed
for the BouncyCastle JCE provider. Nothing registers that provider any more,
so they only kept dead initialization code in the image.

The run-time initialization entries are what cost size. Removing them takes
the binary from 204.6 to 203.1 MB and gzip -9 from 79.5 to 78.9 MB. The
reflect-config entries measured as noise, because those classes stay
registered through another path, but they still describe a provider Floci
no longer installs.

Verified on a native build. The Python suite passes 354 tests, the Java SDK
suite passes 61 including CloudHSM v2 and ACM, and a TLS run generates its
self-signed certificate and signs with secp256k1 over HTTPS.
2026-09-03 21:49:52 -04:00
..

sdk-test-python

Compatibility tests for Floci using boto3 (1.37.1).

Services Covered

Group Description
ssm Parameter Store — put, get, label, history, path, tags
sqs Queues, send/receive/delete, DLQ, visibility
sns Topics, subscriptions, publish, SQS delivery
s3 Buckets, objects, tagging, copy, batch delete
s3-cors CORS configuration
s3-notifications S3 → SQS event notifications
dynamodb Tables, CRUD, batch, TTL, tags
lambda Create/invoke/update/delete functions
iam Users, roles, policies, access keys
sts GetCallerIdentity, AssumeRole, GetSessionToken
secretsmanager Create/get/put/list/delete secrets, versioning, tags
kms Keys, aliases, encrypt/decrypt, data keys, sign/verify
kinesis Streams, shards, PutRecord/GetRecords
cloudwatch-metrics PutMetricData, ListMetrics, GetMetricStatistics, alarms
cloudformation-naming Auto physical name generation, explicit name precedence, cross-reference
cognito User pools, clients, AdminCreateUser, InitiateAuth, GetUser

Requirements

  • Python 3.9+
  • pip

Running

pip install -r requirements.txt

# All groups
pytest tests/ --junit-xml=test-results/junit.xml

# Specific tests
pytest tests/test_s3.py

# Via just (from compatibility-tests/)
just test-python

Configuration

Variable Default Description
FLOCI_ENDPOINT http://localhost:4566 Floci emulator endpoint

AWS credentials are always test / test / us-east-1.

Docker

docker build -t floci-sdk-python .
docker run --rm --network host floci-sdk-python

# Custom endpoint (macOS/Windows)
docker run --rm -e FLOCI_ENDPOINT=http://host.docker.internal:4566 floci-sdk-python