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 C5319200B78 for ; Fri, 2 Sep 2016 10:51:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C3BC1160AAC; Fri, 2 Sep 2016 08:51:23 +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 19569160AAB for ; Fri, 2 Sep 2016 10:51:22 +0200 (CEST) Received: (qmail 94277 invoked by uid 500); 2 Sep 2016 08:51:22 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 94267 invoked by uid 99); 2 Sep 2016 08:51:22 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2016 08:51:22 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 10F072C1B75 for ; Fri, 2 Sep 2016 08:51:22 +0000 (UTC) Date: Fri, 2 Sep 2016 08:51:22 +0000 (UTC) From: "Andrea Cosentino (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10280) Don't require create privileges to publish to named SNS topic MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Sep 2016 08:51:24 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15457973#comment-15457973 ] Andrea Cosentino commented on CAMEL-10280: ------------------------------------------ We have {code} if (configuration.getTopicArn() == null) { // creates a new topic, or returns the URL of an existing one CreateTopicRequest request = new CreateTopicRequest(configuration.getTopicName()); LOG.trace("Creating topic [{}] with request [{}]...", configuration.getTopicName(), request); CreateTopicResult result = snsClient.createTopic(request); configuration.setTopicArn(result.getTopicArn()); LOG.trace("Topic created with Amazon resource name: {}", configuration.getTopicArn()); } {code} We can add a control before creating the topic and if we have an ARN, we can skip the creation. What do you think about this approach? > Don't require create privileges to publish to named SNS topic > ------------------------------------------------------------- > > Key: CAMEL-10280 > URL: https://issues.apache.org/jira/browse/CAMEL-10280 > Project: Camel > Issue Type: Improvement > Components: camel-aws > Affects Versions: 2.17.3, 2.18.0 > Reporter: Stefan Fussenegger > Assignee: Andrea Cosentino > > If a topic already exists, the {{SnsEndpoint}} still requires privileges for the (idempotent) {{CreateTopic}} operation to resolve the name to an ARN. > In comparison, the {{SqsEndpoint}} uses the {{ListQueues}} operation to check for an existing queue before trying to create a queue. > Providing an ARN instead of a name bypasses the issue (added to 2.18 in CAMEL-9844). Using an ARN instead of a name isn't always practical though. -- This message was sent by Atlassian JIRA (v6.3.4#6332)