mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
* feat(iot): CreateKeysAndCertificate issues a real client certificate from the local CA certificateId is sha256(DER) in lowercase hex as on AWS; the returned RSA 2048 key pair matches the certificate. CreateCertificateFromCsr parses the PKCS#10, checks its self-signature and key strength (RSA 2048 or more, EC P-256/384/521), signs the CSR's key with the same CA and returns no private key, as on AWS. * docs(iot): describe the CA-issued device certificates * fix(iot): accept only the NIST curves AWS IoT names and never store a device private key The CSR key check reads the named-curve identifier instead of the field size, so secp256k1 and explicit curve parameters are refused as on AWS. The stored certificate record no longer carries the private key; it is returned once. * feat(iot): device certificates expire at the end of 2049 and DescribeCertificate reports validity AWS IoT-issued client certificates all carry notAfter 2049-12-31T23:59:59Z. CertificateGenerator gains an overload with an explicit validity window; DescribeCertificate adds validity.notBefore, validity.notAfter and certificateMode DEFAULT. The Java SDK compatibility test asserts the shape. * fix(iot): a device certificate never outlives its issuing CA A new local CA is valid until the end of 2050, past AWS's fixed 2049 device expiry; a CA created earlier (ten years) caps the device certificates it signs at its own expiry, so a chain never expires before its leaf. * fix(iot): derive CA and device expiry from creation time, never mint an expired certificate A CA created after 2050 lives ten years from creation instead of ending on the fixed date; after 2049 a device certificate lives a year, still capped at its CA. The Python compatibility suite now sends a real PKCS#10 request, since the placeholder it used is refused as on AWS. * docs(tls): the local CA now signs IoT device certificates * test(iot): pass the certificate authority to IotServiceTest's constructor
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