<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231624#M25883</link>
    <description>&lt;P&gt;I haven't filed a ticket as I'm on a Developer License and do not have a support account. I figured this was the best place to post it given the circumstances. &lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2016 00:48:37 GMT</pubDate>
    <dc:creator>connerswann</dc:creator>
    <dc:date>2016-06-28T00:48:37Z</dc:date>
    <item>
      <title>Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231622#M25881</link>
      <description>&lt;P&gt;Hi Splunk Answers, this isn't a &lt;EM&gt;question&lt;/EM&gt; per se, however, I think it will help people who might find this via Google. &lt;/P&gt;

&lt;P&gt;I found a bug in the Splunk App for AWS that results in a user being unable to configure a CloudTrail input to ingest data from AWS CloudTrail. Even if a user has successfully set up their chain of AWS services (CloudTrail &amp;gt; S3 &amp;gt; SNS &amp;gt; SQS), the config form does not auto-populate the names of the existing Simple Queues that fit the app's criteria. I found this to be due to a bug in the code governing which queues populate this drop-down. &lt;/P&gt;

&lt;P&gt;The file in question is &lt;CODE&gt;$AWS_APP_ROOT/bin/aws/aws_utils.py&lt;/CODE&gt; in the function &lt;CODE&gt;get_sqs_of_topics()&lt;/CODE&gt; on line 128. &lt;/P&gt;

&lt;P&gt;The relevant excerpt of the &lt;CODE&gt;get_sqs_topics&lt;/CODE&gt; function from the app's original code is as follows: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    # match queues
    sqs = set()
    for subscription in subscriptions:
        if subscription['Protocol'] == 'sqs':
            topic_name = extract_name_from_arn(subscription['TopicArn'])
            if topic_name in topics:
                sqs.add((extract_name_from_arn(subscription['Endpoint']), subscription['Endpoint']))

    return sqs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The fix is below: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; # match queues
    sqs = set()
    for subscription in subscriptions:
        if subscription['Protocol'] == 'sqs':
            #FIX IS BELOW
            topic_name = subscription['TopicArn']
            # FIX IS ABOVE
            if topic_name in topics:
                sqs.add((extract_name_from_arn(subscription['Endpoint']), subscription['Endpoint']))

    return sqs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In a nutshell, the original code is extracting a portion of an ARN and then attempting to use the excerpt to do an exact string match to a full-ARN which doesn't work. To fix this, I modified it to simply not extract the "name" from the ARN and to simply use the full ARN to perform the string match. &lt;/P&gt;

&lt;P&gt;Hope this helps someone, and I hope that the Splunk Product guys see this and implement a fix! &lt;/P&gt;

&lt;P&gt;Best, &lt;BR /&gt;
Conner Swann&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 00:22:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231622#M25881</guid>
      <dc:creator>connerswann</dc:creator>
      <dc:date>2016-06-28T00:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231623#M25882</link>
      <description>&lt;P&gt;Hi @connerswann&lt;/P&gt;

&lt;P&gt;Thanks for sharing this with the Splunk community. Did you actually file a ticket for this bug? If you have a support entitlement, you can submit your findings here:&lt;BR /&gt;
&lt;A href="http://www.splunk.com/r/bugs"&gt;http://www.splunk.com/r/bugs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 00:41:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231623#M25882</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-06-28T00:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231624#M25883</link>
      <description>&lt;P&gt;I haven't filed a ticket as I'm on a Developer License and do not have a support account. I figured this was the best place to post it given the circumstances. &lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 00:48:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231624#M25883</guid>
      <dc:creator>connerswann</dc:creator>
      <dc:date>2016-06-28T00:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231625#M25884</link>
      <description>&lt;P&gt;Thanks for sharing this. &lt;/P&gt;

&lt;P&gt;There is a bug fired from customer side (AWSAPP-1014). AWS app development team has resolved it and put in into v4.2.1 release. &lt;/P&gt;

&lt;P&gt;The fix Conner provided works if the trail is configured recently, but not works for old trails.&lt;BR /&gt;&lt;BR /&gt;
If you want to apply the fix before v4.2.1 release, you can try fix one line code as below:&lt;/P&gt;

&lt;P&gt;File: $AWS_APP_ROOT/bin/aws/aws_utils.py&lt;BR /&gt;
Function: get_cloudtrail_sqs&lt;/P&gt;

&lt;P&gt;Before fix: topic_names = set([x['SnsTopicName'] for x in trails])&lt;BR /&gt;
After fix:    topic_names = set([extract_name_from_arn(x['SnsTopicARN']) for x in trails if 'SnsTopicARN' in x])&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231625#M25884</guid>
      <dc:creator>pchen_splunk</dc:creator>
      <dc:date>2020-09-29T10:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231626#M25885</link>
      <description>&lt;P&gt;That's a better code snippet! Hope nobody else ran into this, took me &lt;STRONG&gt;forever&lt;/STRONG&gt; to debug!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 03:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231626#M25885</guid>
      <dc:creator>connerswann</dc:creator>
      <dc:date>2016-06-28T03:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231627#M25886</link>
      <description>&lt;P&gt;Please submit a support ticket to Splunk when you meet any issue in the future.  Or, you can ask questions in this place, we will try our best to answer in the first time. Thanks for understanding. &lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 03:07:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231627#M25886</guid>
      <dc:creator>pchen_splunk</dc:creator>
      <dc:date>2016-06-28T03:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231628#M25887</link>
      <description>&lt;P&gt;When will version 4.2.1 be released to SplunkCloud to fix this issue?  It's a major blocker for adopting Splunk in my organization.&lt;/P&gt;

&lt;P&gt;SplunkCloud is still using version 4.0.0, by the way.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 00:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231628#M25887</guid>
      <dc:creator>dmckean</dc:creator>
      <dc:date>2016-08-30T00:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Splunk App for AWS: User unable to configure a CloudTrail input</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231629#M25888</link>
      <description>&lt;P&gt;AWS App v4.2.1 is release in July 2016. Please ask support to upgrade your app. Or, you can do upgrade by yourself in the app management page. &lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 01:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Bug-in-Splunk-App-for-AWS-User-unable-to-configure-a-CloudTrail/m-p/231629#M25888</guid>
      <dc:creator>pchen_splunk</dc:creator>
      <dc:date>2016-08-30T01:41:03Z</dc:date>
    </item>
  </channel>
</rss>

