Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EEB80200B14 for ; Fri, 3 Jun 2016 23:08:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ED87E160A49; Fri, 3 Jun 2016 21:08:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4B3BE160A3B for ; Fri, 3 Jun 2016 23:08:00 +0200 (CEST) Received: (qmail 96274 invoked by uid 500); 3 Jun 2016 21:07:59 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 96251 invoked by uid 99); 3 Jun 2016 21:07:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2016 21:07:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 4762F2C1F5C for ; Fri, 3 Jun 2016 21:07:59 +0000 (UTC) Date: Fri, 3 Jun 2016 21:07:59 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-13237) s3a initialization against public bucket fails if caller lacks any credentials MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 03 Jun 2016 21:08:01 -0000 [ https://issues.apache.org/jira/browse/HADOOP-13237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15314812#comment-15314812 ] Chris Nauroth commented on HADOOP-13237: ---------------------------------------- This looks to me like {{AnonymousAWSCredentials}} is fundamentally unusable in a {{AWSCredentialsProviderChain}}. The {{AnonymousAWSCredentials}} is hard-coded to return a null key and secret. https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AnonymousAWSCredentials.java#L26-L38 However, the chain is coded to throw an exception if it walks the whole chain and can't find a non-null key and secret. https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AWSCredentialsProviderChain.java#L108-L132 I'd be curious if it works when you swap out the {{credentials = new AWSCredentialsProviderChain(...)}} line for a straight call to {{credentials = new AnonymousAWSCredentialsProvider()}}. If it does, then I think this could be interpreted as a bug in the AWS SDK, and we might consider filing a patch to that project. In the absence of AWS SDK changes, we could have a configuration property like {{fs.s3a.anonymous.access}}, which if true would skip the chain and just create the anonymous provider. Actually, it might be good for anonymous access to be opt-in via configuration anyway, because I expect most deployments wouldn't want anonymous access and would prefer to fail fast so they know to lock down their bucket. > s3a initialization against public bucket fails if caller lacks any credentials > ------------------------------------------------------------------------------ > > Key: HADOOP-13237 > URL: https://issues.apache.org/jira/browse/HADOOP-13237 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/s3 > Affects Versions: 2.8.0 > Reporter: Steve Loughran > Assignee: Steve Loughran > > If an S3 bucket is public, anyone should be able to read from it. > However, you cannot create an s3a client bonded to a public bucket unless you have some credentials; the {{doesBucketExist()}} check rejects the call. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org