Files
floci/compatibility-tests/sdk-test-go
Joel Klint e3e06a1122 feat(iot): add RegisterCertificateWithoutCA and the V2 principal lists (#5772)
* feat(iot): add RegisterCertificateWithoutCA and the V2 principal lists

RegisterCertificateWithoutCA registers a certificate from any issuer in
SNI_ONLY mode. ListThingPrincipalsV2 and ListPrincipalThingsV2 page the
thing principal attachments and report each one as NON_EXCLUSIVE_THING,
because Floci does not model exclusive attachment.

* fix(iot): validate the principal and page size of the V2 principal lists

ListPrincipalThingsV2 requires a principal, and both V2 lists accept 1 to
250 results per page, as on AWS. Tests cover these checks and the
RegisterCertificateWithoutCA rejection of a missing PEM and an unknown
status.

* fix(iot): refuse a device certificate registered in more than one account

AWS selects the account from the server name, which Floci does not do
yet. The MQTT TLS listener therefore refuses a certificate that more
than one account registers, instead of admitting it under the lowest
account ID. RegisterCertificateWithoutCA drops the cached location, and
the lookup runs under compute, so a connect cannot cache a stale account.

* fix(iot): make the RegisterCertificateWithoutCA duplicate check atomic

A lock holds the duplicate check and the store write together, as
CreateAuthorizer does, so two identical registrations at the same moment
store one certificate and the other caller gets the 409. The 409 carries
resourceId and resourceArn, as AWS lists for this call.
2026-10-18 14:50:15 -04:00
..

sdk-test-go

Compatibility tests for Floci using the AWS SDK for Go v2 (1.41.4).

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 PutMetricData, ListMetrics, GetMetricStatistics, alarms
rds-data RDS Data API execute statements, transactions, result fields with SDK v1 and v2

Requirements

  • Go 1.24+

Running

# All groups
gotestsum --junitfile test-results.xml ./tests/... ./internal/testutil/...

# Specific tests
go test ./tests/... ./internal/testutil/... -run TestSsm

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

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-go .
docker run --rm --network host floci-sdk-go

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