https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • l

    lmtr0

    05/03/2022, 3:13 PM
    cause I can't lol
  • k

    kian

    05/03/2022, 3:14 PM
    hex(sha256(utf8(<api-token-secret-value>)))
  • k

    kian

    05/03/2022, 3:14 PM
    https://gist.github.com/johnspurlock-skymethod/6027c81953f81aa535d889d86a1061ba#s3-compatible-api
  • v

    Vitali

    05/03/2022, 3:14 PM
    Could also be that your sigv4 library is generating the wrong signature or you're giving it the wrong info
  • v

    Vitali

    05/03/2022, 3:14 PM
    The signature signs all headers
  • l

    lmtr0

    05/03/2022, 3:14 PM
    wait it needs to be hex
  • l

    lmtr0

    05/03/2022, 3:15 PM
    well, its the official aws credentials from aws
  • l

    lmtr0

    05/03/2022, 3:15 PM
    how do i calc a hex in linux terminal
  • l

    lmtr0

    05/03/2022, 3:15 PM
    forget it
  • v

    Vitali

    05/03/2022, 3:16 PM
    sha256sum prints in hex
  • l

    lmtr0

    05/03/2022, 3:16 PM
    ok so thats not the problem
  • l

    lmtr0

    05/03/2022, 3:16 PM
    ............
  • e

    Erisa | Support Engineer

    05/03/2022, 3:17 PM
    Yeah I just put it into sha256sum
  • l

    lmtr0

    05/03/2022, 3:17 PM
    me too
  • e

    Erisa | Support Engineer

    05/03/2022, 3:17 PM
    Looking at your deleted message, yours seems to be a valid sha256 in the right format
  • e

    Erisa | Support Engineer

    05/03/2022, 3:17 PM
    So I doubt thats the issue
  • l

    lmtr0

    05/03/2022, 3:18 PM
    HMMMMMmmmmmmm
  • e

    Erisa | Support Engineer

    05/03/2022, 3:18 PM
    You could try those creds with some other application thats known to work, like the AWS CLI
  • l

    lmtr0

    05/03/2022, 3:18 PM
    tried
  • l

    lmtr0

    05/03/2022, 3:18 PM
    not working
  • l

    lmtr0

    05/03/2022, 3:18 PM
    auth issue
  • e

    Erisa | Support Engineer

    05/03/2022, 3:19 PM
    Do you mind if I use your credentials to try it myself? I only would with permission and because you literally sent them
  • e

    Erisa | Support Engineer

    05/03/2022, 3:20 PM
    Because I'm not sure at that point, the AWS CLI worked fine for me
  • e

    Erisa | Support Engineer

    05/03/2022, 3:20 PM
    in
    ~/.aws/credentials
    i have
    Copy code
    [default]
    aws_access_key_id = idfromdevtools
    aws_secret_access_key = thesha256sumoutput
    And then I used commands like
    Copy code
    aws s3 --endpoint-url https://ece1d09b06af2ced51407c97505ea0cc.r2.cloudflarestorage.com cp 1GB.bin s3://erisacdn/misc/
  • l

    lmtr0

    05/03/2022, 3:36 PM
    no I don't
  • l

    lmtr0

    05/03/2022, 3:37 PM
    I think the creds I shared only have read permissions
  • e

    Erisa | Support Engineer

    05/03/2022, 3:37 PM
    Ah okay
  • l

    lmtr0

    05/03/2022, 3:37 PM
    aws s3api list-objects-v2 --bucket "suite"  --endpoint-url "https://982723f0682411a61ffe979a716fd7e1.r2.cloudflarestorage.com" --delimiter / --max-keys 500
    is the command I used
  • l

    lmtr0

    05/03/2022, 3:38 PM
    Copy code
    cat ~/.aws/credentials
    [default]
    aws_access_key_id = theid
    aws_secret_access_key = 8345-------
  • e

    Erisa | Support Engineer

    05/03/2022, 3:40 PM
    I tried
    Copy code
    erisa@heart:~$ aws s3 --endpoint-url https://982723f0682411a61ffe979a716fd7e1.r2.cloudflarestorage.com ls
    
    An error occurred (SignatureDoesNotMatch) when calling the ListBuckets operation: The request signature we calculated does not match the signature you provided. Check your secret access key and signing method.
    And the same works with my own account/creds, so I would imagine something is wrong with your creds
1...107108109...1050Latest