Skip to content

Firehose delivery stopped since secrets manager has been used

1

Our Firehose Delivery Stream has ceased sending to Splunk since its configuration has been changed from "manual setup of HEC Token" to "Read from Secrets Manager".

We're using "plaintext". Same token as the hardcoded one.

AWS documentation seen here: https://docs.aws.amazon.com/firehose/latest/dev/secrets-manager-how.html does not specify how the secret should be stored: key/pair . plainttext? surrounded with quotes? any quirky format?

  • Thank you Riku! I was nearly there to bust it down in the AWS doco. In the "Authenticate with AWS Secrets Manager" section, you can see 4 headers. The solution lied in section (1): "Understand secrets", which should rather be named "Secret Formats"... I only looked at sections (2) and (3) "Create & use secret"

2 Answers
2
Accepted Answer

Hello.

The following document describes Splunk's secret storage format.
Please try registering with Secrets Manager in the following format.
https://docs.aws.amazon.com/firehose/latest/dev/secrets-manager-whats-secret.html

{
    "hec_token":  "<hec token>"
}
EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

-1

Greeting

Hi Fab,
Thanks for bringing up this issue. It sounds like you're experiencing a frustrating challenge with your Firehose Delivery Stream configuration after switching from manually managing the HEC token to using Secrets Manager. Let’s dive into this together and figure out a solution. 😊


Clarifying the Issue

From your description, your Firehose stream has stopped delivering data to Splunk after configuring it to "Read from Secrets Manager." Previously, a hardcoded HEC token worked fine, and you’re now using the same token in plaintext via Secrets Manager. Your main concern revolves around the correct format for storing the token in Secrets Manager, as AWS documentation lacks clarity on specifics like plaintext, key/value pairs, quotes, or other possible quirks.

It’s great that you’re paying close attention to the documentation—ensuring the token is formatted correctly is critical to resolving this issue. Let’s walk through the best way to configure this to get your stream up and running again.


Why This Matters

A Firehose delivery stream is essential for reliably streaming data to Splunk, among other destinations. When delivery stops, it disrupts critical data flows, impacting downstream analysis and operational insights. Understanding and correctly configuring Secrets Manager ensures not only security but also the seamless operation of your stream.


Key Terms

  • Secrets Manager: A service to securely store, retrieve, and rotate sensitive information like API keys and tokens.
  • HEC (HTTP Event Collector): A Splunk endpoint that ingests data over HTTP/HTTPS.
  • Firehose Delivery Stream: A service to deliver real-time data streams to destinations like Splunk, S3, or Elasticsearch.
  • Plaintext Secret: A straightforward text value stored in Secrets Manager without additional formatting.

The Solution (Our Recipe)

Steps at a Glance:

  1. Confirm that your secret is stored as plaintext in Secrets Manager.
  2. Verify that the IAM role for Firehose has permissions to access the secret.
  3. Update the Firehose delivery stream configuration to use the correct secret.
  4. Test the delivery stream and validate connectivity to Splunk.
  5. Debug Splunk HEC connectivity issues if the delivery stream does not work.
  6. Anticipate and resolve related configurations, such as token rotation and Splunk HEC limits.

Step-by-Step Guide:

  1. Confirm that your secret is stored as plaintext in Secrets Manager

    • In the AWS Secrets Manager console, ensure that the secret is created with the plaintext token value, e.g.:
      {
        "splunkHECToken": "your_actual_token_here"
      }
    • Avoid surrounding the token with extra quotes or unnecessary formatting.
  2. Verify IAM permissions

    • Ensure the IAM role used by Firehose has the necessary permissions to read the secret. Attach a policy like this to the role:
      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": "secretsmanager:GetSecretValue",
            "Resource": "arn:aws:secretsmanager:region:account-id:secret:your-secret-name"
          }
        ]
      }
    • Missing or incorrectly scoped IAM permissions are a common reason Firehose fails to retrieve Secrets Manager values.

  1. Update the Firehose delivery stream configuration
    • In the Firehose console, edit your delivery stream and select Use Secrets Manager for the HEC token.
    • Specify the ARN of your secret and save the configuration.

  1. Test and validate connectivity
    • Use the Test with demo data feature in Firehose to verify that events are successfully delivered to Splunk.
    • Check Splunk’s HEC monitoring dashboard to confirm receipt of events.

  1. Debug Splunk HEC connectivity issues if the delivery stream does not work
    • Validate the HEC Token: Double-check that the token in Secrets Manager matches the one configured in Splunk.
    • Verify Endpoint and Protocol: Ensure the endpoint URL in Firehose is correct and matches the protocol (e.g., HTTP vs. HTTPS).
    • Check Firewall Rules: Confirm Splunk’s HEC port is open and accessible from Firehose. Test connectivity using tools like telnet or curl.
    • Enable Firehose Error Logs: Enable error logging on Firehose and look for specific error messages related to delivery failures.

  1. Anticipate and resolve related configurations
    • Token Rotation: If Secrets Manager is set to automatically rotate tokens, ensure Firehose can dynamically retrieve the updated values. Refer to Secrets Manager Rotation Documentation.
    • Splunk HEC Limits: Verify that Splunk is not hitting limits on concurrent connections or events per second. Monitor Splunk’s HEC status dashboard and adjust configurations if needed.

Closing Thoughts

Correctly configuring Secrets Manager is critical to the security and functionality of your Firehose delivery stream. Following these steps should help resolve your issue. If the problem persists, consider enabling logging on your Firehose delivery stream to debug further.

Helpful documentation links:


Farewell

I hope this guidance helps you get your delivery stream back on track, Fab! Let me know if you have any follow-up questions or encounter any roadblocks. Best of luck! 🚀😊


Cheers,😊

Aaron

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.