Skip to content

AWS S3 API Signature V4 verifaction fail #192

@tuxity

Description

@tuxity

My integration setup

[ ] CocoaPods cocoapods-xcremotecache plugin
[x] Automatic integration using xcprepare integrate ...
[ ] Manual integration
[ ] Carthage

Expected/desired behavior

The XCRemoteCache should successfully authenticate with AWS S3 using Signature V4 when using S3 as the cache storage backend. The cache should be uploaded and downloaded correctly without authentication errors.

Minimal reproduction of the problem with instructions

  1. Set up an AWS S3 bucket for use with XCRemoteCache.
  2. Configure XCRemoteCache to use the S3 bucket with Signature V4 authentication.
  3. Attempt to build and cache a project in Xcode with a configuration that contains a space in its name.
  4. Observe authentication errors when uploading the marker file with an HTTP code 403 SignatureDoesNotMatch.

Producer Logs

Details
 [REPLACE THIS WITH YOUR CONSUMER LOGS] 

Consumer Logs

Details
 [REPLACE THIS WITH YOUR CONSUMER LOGS] 

Pods/Carthage file

Details
 [REPLACE THIS WITH YOUR PODS OR CARTHAGE FILE CONTENT] 

Environment

  • XCRemoteCache: 0.3.20
  • cocoapods-xcremotecache: X.Y.Z
  • HTTP cache server: AWS S3 with Signature V4 authentication
  • Xcode: 14.2

Post build stats

Details
 [REPLACE THIS WITH YOUR POST BUILD STATS] 

Others

  • Operating System: macOS 12
  • The .zip files are uploaded correctly in the S3 bucket, so it's not a configuration issue.
  • The issue occurs when uploading the marker file in the format #{commitSha}-#{TargetName}-#{Configuration}-#{Platform}-#{XcodeBuildNumber}-#{ContextBuildSettings}-#{SchemaID}.json. Some configurations have a space in the name, which seems to break the signature process and results in an HTTP code 403 SignatureDoesNotMatch.
  • We removed the spaces in the configuration name and it works correctly now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions