Code Monkey home page Code Monkey logo

aws-secrets-manager-kafka's Introduction

Apache Kafka Configuration Provider for AWS Secrets Manager

License

This project is licensed under the Apache-2.0 License.

Introduction

Apache Kafka Configuration Provider for AWS able to retrieve secrets from AWS Secrets Manager.

Building from source

After you've downloaded the code from GitHub, you can build it using Gradle. Use this command:

gradle clean build

The generated jar files can be found at: build/libs/.

An uber jar containing the library and all its relocated dependencies except the kafka client can also be built. Use this command:

gradle clean shadowJar

The generated uber jar file can also be found at: build/libs/. At runtime, the uber jar expects to find the kafka client library on the classpath.

Validating secure dependencies

To ensure no security vulnerabilities in the dependency libraries, run the following.

gradle dependencyCheckAnalyze

If the above reports any vulnerabilities, upgrade dependencies to use the respective latest versions.

Configuring the Apache Kafka Configuration Provider for AWS Secrets Manager

Apache Kafka Configuration Provider for AWS Secrets Manager finds IAM credentials using the AWS Default Credentials Provider Chain. To overwrite you need to set optional parammeters cloud.access.key and cloud.access.secret

cloud.region

Mandatory parameter, name of AWS region

cloud.access.key

Credentials for accessing AWS services, use only when you need to overwrite credentials from AWS Default Credentials Provider Chain

cloud.access.secret

Credentials secret for accessing AWS services. Required only when cloud.access.key is set

cloud.secret.ttl.ms

The time interval in ms during which the secret is considered valid. Default value - Duration.ofDays(30).toMillis(). Set the value according to the key rotation schedule, when this time interval expires the AWS Secret Manager is queried again, causing connector(s) to restart

Using the Apache Kafka Configuration Provider for AWS Secrets Manager

  1. Open the Secrets Manager console at https://console.aws.amazon.com/secretsmanager/

  2. Create a new secret to store your database sign-in credentials. For instructions, see Create a secret in the AWS Secrets Manager User Guide

  3. Create a custom worker configuration with information about Apache Kafka Configuration Provider for AWS Secrets Manager

config.providers=secretsManager
config.providers.secretsManager.class=solutions.a2.kafka.config.aws.AwsSecretsManagerProvider
config.providers.secretsManager.param.cloud.region=<AWS region>
  1. Set for connector (example below for Debezium credentials)
database.user=<${secretsManager:test/oracle/TESTDATA:username}>"
database.password=<${secretsManager:test/oracle/TESTDATA:password}>"

Distribution

  1. GitHub
  2. Maven Central

Authors

License

This project is licensed under the Apache License - see the LICENSE file for details

aws-secrets-manager-kafka's People

Contributors

averemee-si avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.