mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 01:43:02 -05:00
* feat(dsql): add Aurora DSQL's control plane and AWS::DSQL::Cluster The first half of #6014. Aurora DSQL's REST JSON control plane, with the answers measured on AWS (eu-west-1): CreateCluster, GetCluster, ListClusters, UpdateCluster, DeleteCluster, GetVpcEndpointServiceName, the cluster policy calls and tagging on cluster ARNs. Identifiers are 26 characters of lowercase base32 as DSQL's are, and malformed or unknown ones are refused with DSQL's messages; a cluster created without deletionProtectionEnabled is protected, and deleting a protected one is refused. CreateCluster answers CREATING and the cluster is ACTIVE right after. AWS::DSQL::Cluster waits for ACTIVE, returns the identifier from Ref and Identifier, ResourceArn, Status, CreationTime, Endpoint, VpcEndpoint and VpcEndpointServiceName through Fn::GetAtt, and a protected cluster makes the stack's deletion fail, as on AWS. A cluster has no database behind it here: its endpoint is named as on AWS, <id>.dsql.<region>.localhost.floci.io, but not served. Serving it is the second half of #6014, its own pull request. * fix(dsql): answer the control plane's edge cases as DSQL does Review of #6048, each answer measured on DSQL (eu-west-1) first: - ListClusters carries on from a page token whose cluster was deleted in between, as AWS does: the token now holds the sort position of the next page's first cluster rather than its identifier. - deletionProtectionEnabled is read as DSQL reads it: text is false when it spells false in any case and true otherwise; empty text, a number, an object and a list fail with SerializationException. - The tag calls refuse another account's cluster ARN with 403 AccessDeniedException instead of reading it in the caller's account. - A client token reused with other parameters answers 409 ConflictException; with the same ones, the earlier cluster. - AWS_OWNED_KMS_KEY names AWS's own key on create and update. AWS::DSQL::Cluster reads DeletionProtectionEnabled and PolicyDocument with AWS::NoValue as left out, and an update that drops the multi-Region properties clears them, as it already reset the key and deletion protection. ListTagsForResource copies the tags under the cluster's lock, and a cluster's lock goes with the cluster. * fix(dsql): answer errors, policies, updates and multi-Region clusters as DSQL does A review asked for the attribute coverage, the reason ValidationException carries, a real untag assertion and tests of the stack-update path. Measuring them on DSQL (eu-west-1, 2026-10-20) found more that did not match, fixed here too. - Attributes are written with resource.getAttributes().put, which the schema coverage test reads; EncryptionDetails, an object an output refuses on AWS, is recorded as a gap. - DSQL leaves reason out of its model-validation errors. Only the page token's refusal carries it, with fieldList naming next-token and its own text. maxResults no longer quotes the value. - Tag calls answer what DSQL answers: 403 for an ARN that is not a cluster ARN, 400 BadRequestException for another Region's, 404 NotFoundException for no cluster. The 403s name the caller. - Policy versions are epoch milliseconds, DeleteClusterPolicy answers the deleted version, and the missing-policy and stale-version errors carry DSQL's texts and resourceType. - Policies are checked and kept as DSQL does: its three refusal texts, a service principal, a principal that names no one, a public grant, and the lockout check when both policy actions are denied to the caller, unless bypassPolicyLockoutSafetyCheck. The kept form is Jackson's pretty printer in DSQL's element order, with condition operators and keys in HashMap order, as measured. - The public check shares its condition keys with Lambda web functions through PublicAccessConditions, and S3 now takes its fixed-value and SourceIp range tests from there. Sharing the whole rule was tried and dropped: DSQL was measured to treat some operators otherwise than LambdaWeb's and S3's rules do (ForAnyValue:, ArnLike "*", StringEquals "*"), so the operator rules stay per service. The lockout check is IamPolicyEvaluator's. - A multi-Region cluster is PENDING_SETUP and lists itself until it and each peer name one another, then ACTIVE; its deletion answers PENDING_DELETE. - AWS::DSQL::Cluster reads its properties through CfnPropertyTypes, so a PolicyDocument object or DeletionProtectionEnabled "yes" fails as on AWS, where Boolean.valueOf made "yes" false. An update leaves a property the template no longer sets as it was, deletion protection, KMS key and multi-Region alike, and removes only the tags and the policy; an earlier change put them back to their defaults, which was not measured and is not what CloudFormation does. A policy the template does not change keeps its version, and create settles on PENDING_SETUP too. DsqlServiceTest, DsqlClusterPoliciesTest and DsqlCfnProvisionerTest cover these in isolation, the integration tests over the wire. * fix(dsql): keep the public access rule to DSQL and forget a deleted policy's version A review asked to leave S3 and Lambda web functions out of this change, and pointed at DSQL's own block public access page. The shared helper is dropped and S3 and Lambda web functions are as on main; folding their copies into one helper belongs to a separate change. DSQL now has its own keys: the trusted ones its page lists, and aws:SourceIp, aws:SourceVpcArn and the three aws:Vpce* keys, which the page leaves out but DSQL accepts (measured, eu-west-1, 2026-10-20). As the page says, a policy variable never restricts: StringEquals with ${aws:PrincipalArn}, ${aws:SourceVpc} or a role/${aws:username} ARN is public on DSQL. ArnEquals reads like ArnLike, as IAM matches both the same way, so a value that is no ARN, ${aws:SourceArn} among them, matches nothing and restricts, as measured. DeleteClusterPolicy left the deleted version on the cluster, so a put naming it went through; it is now cleared, and a put that names a version on a cluster with no policy is refused as not found.
7.3 KiB
7.3 KiB
| 1 | AWS::AppSync::GraphQLApi | GraphQLEndpointArn | the private-endpoint ARN of the GraphQL endpoint; Floci serves one public endpoint and has no private-endpoint model |
|---|---|---|---|
| 2 | AWS::BedrockAgentCore::Runtime | WorkloadIdentityDetails | the dotted WorkloadIdentityDetails.WorkloadIdentityArn is set instead, the form AWS's GetAtt exposes for the nested object |
| 3 | AWS::CodeBuild::Project | Id | schema gives no description; AWS's Id may differ from the project name Floci uses |
| 4 | AWS::CodePipeline::CustomActionType | Id | schema gives no description; the custom action has no separate id in Floci |
| 5 | AWS::CodePipeline::Webhook | Id | schema gives no description; Floci keys webhooks by name |
| 6 | AWS::EC2::Instance | State | the dotted State.Code and State.Name are set instead, the form AWS's GetAtt exposes for the nested State object |
| 7 | AWS::EC2::NatGateway | AutoProvisionZones | availability-mode NAT gateways are not emulated |
| 8 | AWS::EC2::NatGateway | AutoScalingIps | availability-mode NAT gateways are not emulated |
| 9 | AWS::EC2::NatGateway | EniId | the NAT gateway's network interface is not created |
| 10 | AWS::EC2::NatGateway | RouteTableId | availability-mode NAT gateways are not emulated |
| 11 | AWS::EC2::Subnet | BlockPublicAccessStates | VPC block public access is not emulated |
| 12 | AWS::EC2::Subnet | Ipv6CidrBlocks | IPv6 CIDR association is not emulated |
| 13 | AWS::EC2::Subnet | NetworkAclAssociationId | the subnet's default network ACL association is not created with the subnet |
| 14 | AWS::EC2::VPCEndpoint | NetworkInterfaceIds | endpoint ENIs are not created |
| 15 | AWS::EC2::VPCGatewayAttachment | AttachmentType | the exact literal AWS returns (internet vs vpn gateway) is not given by the schema |
| 16 | AWS::Kinesis::Stream | WarmThroughputObject | warm throughput is not an emulated Kinesis feature |
| 17 | AWS::Lambda::MicrovmImage | CreatedAt | microvm image lifecycle fields are not tracked |
| 18 | AWS::Lambda::MicrovmImage | LatestFailedImageVersion | failure history is not tracked |
| 19 | AWS::Lambda::MicrovmImage | State | microvm image state is not modelled |
| 20 | AWS::Lambda::MicrovmImage | UpdatedAt | microvm image lifecycle fields are not tracked |
| 21 | AWS::Lambda::NetworkConnector | State | network connector state is not modelled |
| 22 | AWS::Lambda::WebFunctionEndpoint | RegionalEndpoints | the attribute is a map of per-region state, and Floci GetAtt values are strings; the endpoint's own State and UpdateStatus carry the same values |
| 23 | AWS::Lambda::Permission | Id | schema gives no description and AWS's value is unclear; the physical id is a composite functionName|statementId |
| 24 | AWS::Pipes::Pipe | CreationTime | pipe lifecycle timestamps are not tracked |
| 25 | AWS::Pipes::Pipe | CurrentState | pipe state transitions are not modelled |
| 26 | AWS::Pipes::Pipe | LastModifiedTime | pipe lifecycle timestamps are not tracked |
| 27 | AWS::Pipes::Pipe | StateReason | pipe state transitions are not modelled |
| 28 | AWS::RDS::DBCluster | Endpoint | the dotted Endpoint.Address and Endpoint.Port are set instead, which is the form AWS's GetAtt actually exposes |
| 29 | AWS::RDS::DBCluster | ReadEndpoint | ReadEndpoint.Address is set instead, the form AWS's GetAtt exposes |
| 30 | AWS::RDS::DBCluster | StorageEncryptionType | cluster storage encryption is not emulated |
| 31 | AWS::RDS::DBCluster | StorageThroughput | provisioned storage throughput is not emulated |
| 32 | AWS::RDS::DBInstance | AutomaticRestartTime | instance restart scheduling is not emulated |
| 33 | AWS::RDS::DBInstance | CertificateDetails | per-instance CA certificate metadata is not emulated |
| 34 | AWS::RDS::DBInstance | DBInstanceStatus | the model carries no lifecycle status; instances reach available synchronously |
| 35 | AWS::RDS::DBInstance | InstanceCreateTime | creation timestamps are not recorded on the instance |
| 36 | AWS::RDS::DBInstance | IsStorageConfigUpgradeAvailable | storage configuration upgrades are not emulated |
| 37 | AWS::RDS::DBInstance | LatestRestorableTime | point-in-time restore windows are not emulated |
| 38 | AWS::RDS::DBInstance | ListenerEndpoint | the SQL Server listener endpoint is not emulated |
| 39 | AWS::RDS::DBInstance | PercentProgress | no asynchronous progress to report; instances reach available synchronously |
| 40 | AWS::RDS::DBInstance | ReadReplicaDBClusterIdentifiers | read replicas are not emulated |
| 41 | AWS::RDS::DBInstance | ReadReplicaDBInstanceIdentifiers | read replicas are not emulated |
| 42 | AWS::RDS::DBInstance | ResumeFullAutomationModeTime | RDS Custom automation mode is not emulated |
| 43 | AWS::RDS::DBInstance | SecondaryAvailabilityZone | multi-AZ secondary placement is not emulated |
| 44 | AWS::RDS::DBInstance | StatusInfos | read-replica status detail is not emulated |
| 45 | AWS::RDS::DBInstance | StorageOperationPercentProgress | storage operations (scaling, type changes) are not emulated; storage changes apply synchronously |
| 46 | AWS::RDS::DBInstance | StorageOperationStatus | storage operations (scaling, type changes) are not emulated; storage changes apply synchronously |
| 47 | AWS::Redshift::Cluster | DeferMaintenanceIdentifier | Floci does not emulate deferred maintenance windows |
| 48 | AWS::RedshiftServerless::Namespace | Namespace | the whole Namespace object has no scalar GetAtt form; its members are set under the dotted Namespace.* attributes instead, the form AWS's GetAtt exposes |
| 49 | AWS::SQS::QueuePolicy | Id | schema gives no description; the policy has no backing entity to take an id from |
| 50 | AWS::Transfer::Server | As2ServiceManagedEgressIpAddresses | AS2 managed egress IP allocation is not emulated by the Transfer management-plane service |
| 51 | AWS::SecretsManager::Secret | Id | Fn::GetAtt Id on a secret is its ARN, which the provisioner already sets as the physical id and as Arn; closable, deferred to a follow-up PR to keep this one a pure move |
| 52 | AWS::EKS::Cluster | ClusterSecurityGroupId | not modeled: Floci does not create a cluster security group, so there is no id to publish |
| 53 | AWS::EKS::Cluster | EncryptionConfigKeyArn | not modeled: Floci does not apply envelope encryption, so no KMS key arn is resolved |
| 54 | AWS::EKS::Cluster | Id | not modeled: Floci identifies a cluster by its Name (the primary identifier and Ref), not a separate Id |
| 55 | AWS::ElastiCache::CacheCluster | ConfigurationEndpoint | the whole object has no scalar GetAtt form; its members are set under the dotted ConfigurationEndpoint.* attributes, the form AWS GetAtt exposes (memcached only) |
| 56 | AWS::ElastiCache::CacheCluster | RedisEndpoint | the whole object has no scalar GetAtt form; its members are set under the dotted RedisEndpoint.* attributes, the form AWS GetAtt exposes (redis and valkey only) |
| 57 | AWS::IAM::Policy | Id | not published: Floci uses the policy name for Ref, AWS returns an opaque generated identifier that Floci does not model |
| 58 | AWS::IAM::ManagedPolicy | AttachmentCount | not published: the attachment count is dynamic and Floci does not expose it as a stable Fn::GetAtt value |
| 59 | AWS::IAM::ManagedPolicy | CreateDate | not published: Floci does not surface the policy create date as an Fn::GetAtt value |
| 60 | AWS::IAM::ManagedPolicy | IsAttachable | not modeled: Floci does not track policy attachability |
| 61 | AWS::IAM::ManagedPolicy | PermissionsBoundaryUsageCount | not modeled: Floci does not track permissions-boundary usage |
| 62 | AWS::IAM::ManagedPolicy | UpdateDate | not published: Floci does not surface the policy update date as an Fn::GetAtt value |
| 63 | AWS::Lambda::Function | SnapStartResponse | not modeled: Floci does not emulate Lambda SnapStart, so it exposes no ApplyOn/OptimizationStatus response |
| 64 | AWS::CloudFormation::CustomResource | Id | not published: Id is the primary identifier returned by Ref (the physical resource id); Floci does not expose it as a separate Fn::GetAtt attribute |