Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

390
Visualizações
Why is an S3 object without public permissions accessible through http.get() in Node.js?

I have an S3 object that is publicly not available. If you click on that link, you should get the <code>Access Denied</code> error.

However, if I run the following script on a Node server locally on my Mac, I'm able to download the file -

var s3file = fs.createWriteStream("s3posts.json.gz");
http.get("http://s3.amazonaws.com/cloudfront.s3post.cf/posts.json.gz", function(response) {
    response.pipe(s3file);
});

I went through all of my bucket and object configuration; there's nothing allowing the object to be accessed publicly.

If AWS's policies are by private by default and I haven't explicitly given any permissions, why is the object available for download while not being available on the browser?

What can I do to prevent the object from being downloaded?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Have you seen what actually gets downloaded by that script?

When I run your Node example on my machine, here is the contents of s3posts.json.gz:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code><Message>Access Denied</Message>
<RequestId>946B9510D519E44B</RequestId>
<HostId>eMlB8tG95Ur5fjIHo/NxfI6Ucjs/b4vcMNKYiZPZk94Db6BgrekTRVoaJTccxmQqN1eb91O673A=</HostId>
</Error>

It seems that everything is fine, unless that is indeed the real contents of that file that you want to protect.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda