Repository navigation
Description
Ignition's support fors3:// URLs mainly exists for instances running in EC2, where it allows authenticated fetches using instance credentials. For consistency, we also allow s3:// URLs from outside AWS, but they have no special properties there. The user can equivalently write an HTTPS URL using one of the documented S3 endpoints.
The s3 scheme is not actually standardized; it's implemented directly by Ignition, not by aws-sdk-go, apparently to mimic the aws command-line utility (see its docs). In the subset we support (no support for S3 access points) it only specifies the bucket and path, without specifying the AWS partition. It's not immediately clear whether supporting the access point syntax would allow specifying partitions either.
As a result, we currently infer the AWS partition for s3:// URLs. Inside EC2, we assume the same partition the instance is running in. This is almost certainly what the user wants, since they chose to operate in that partition in the first place. Outside EC2, we assume the aws partition, which isn't always what the user wants. However, as noted, the user can just query the desired S3 endpoint directly. That workaround doesn't lose functionality even from within EC2, since AWS credentials don't work cross-partition.
We can't work around this by automatically walking partitions until we find the correct bucket, because each partition has its own bucket namespace and there may be bucket name collisions. Even if we located the correct bucket in this way, a malicious actor in another partition could intentionally create a bucket name collision and potentially redirect requests from an existing Ignition config.
If we really need to support partition selection with s3:// URLs, we could add a non-standard extension like ?partition=, or further investigate adding support for S3 access points. But it might be better to just document the restriction.
Activity
internal/resource: support S3 access point URLs
internal/resource: support S3 access point URLs
internal/resource: support S3 access point URLs
internal/resource: support S3 access point URLs
internal/resource: support S3 access point URLs
internal/resource: support S3 access point URLs