All Projects → wcurrie → aws-ssm-demo

wcurrie / aws-ssm-demo

Licence: other
Spike pulling a db password from AWS EC2 Parameter Store

Programming Languages

shell
77523 projects
Batchfile
5799 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to aws-ssm-demo

spring-cloud-circuitbreaker-demo
Samples demonstrating how to using Spring Cloud Circuitbreaker
Stars: ✭ 43 (+290.91%)
Mutual labels:  spring-cloud
JavaInterview
JVM、JUC(高并发)、集合、计算机网络、数据库、MySql、Redis、、工作流(Activiti)、规则引擎(Drools)、Spring、SpringCloud、Mybatis、Git、Docker、Utils、Linux
Stars: ✭ 179 (+1527.27%)
Mutual labels:  spring-cloud
spring-cloud-gcp-guestbook
No description or website provided.
Stars: ✭ 55 (+400%)
Mutual labels:  spring-cloud
springboot-examples
SpringBoot、SpringCloud整合使用示例
Stars: ✭ 29 (+163.64%)
Mutual labels:  spring-cloud
spring-cloud-contract-example
No description or website provided.
Stars: ✭ 13 (+18.18%)
Mutual labels:  spring-cloud
ecommerce-microservices-spring-reactive-webflux
E-commerce demo with spring reactive webflux and spring cloud microservice
Stars: ✭ 107 (+872.73%)
Mutual labels:  spring-cloud
sample-testing-microservices
sample applications with implementation of unit, component, contract and integrarion tests using pact, gatling, spring boot test and hoverfly
Stars: ✭ 22 (+100%)
Mutual labels:  spring-cloud
contact-center
一个基于 Spring Cloud 的微服务客服系统
Stars: ✭ 15 (+36.36%)
Mutual labels:  spring-cloud
cloud-native-workshop
1 day workshop to learn Spring Boot + Spring Cloud + Pivotal Cloud Foundry
Stars: ✭ 37 (+236.36%)
Mutual labels:  spring-cloud
spring-cloud-app-broker
Spring Cloud project for implementing service brokers that conform to the Open Server Broker API specification
Stars: ✭ 26 (+136.36%)
Mutual labels:  spring-cloud
spring-cloud-microservice-study
springcloud 学习与经典场景示例
Stars: ✭ 72 (+554.55%)
Mutual labels:  spring-cloud
java-best-practice
Java学习例子,最佳实践
Stars: ✭ 19 (+72.73%)
Mutual labels:  spring-cloud
choerodon-framework
Choerodon Microservices Framework.
Stars: ✭ 87 (+690.91%)
Mutual labels:  spring-cloud
spring-cloud-examples
🎏 Personal learning use cases.
Stars: ✭ 33 (+200%)
Mutual labels:  spring-cloud
OnlineJudge
✨ Open source online judge system (based on Microservice). SDUOJ 开源在线评测系统(基于微服务架构)。开源社区QQ群 808751832
Stars: ✭ 155 (+1309.09%)
Mutual labels:  spring-cloud
Cloud-Native-App-Spring-Boot
A Cloud Native App with Spring Coud Security with KeyCloak Auth Server, API Gateway Server, Naming Server, Config Server and Distributed Tracing and ELK Stack hosted in K8s
Stars: ✭ 19 (+72.73%)
Mutual labels:  spring-cloud
fire-cloud
基于Spring Cloud的微服务业务框架
Stars: ✭ 16 (+45.45%)
Mutual labels:  spring-cloud
HtmlOrMarkdownConvertedToPdf
📚 NodeJS爬虫 + percollate获取网络教程并转成PDF电子书,持续更新
Stars: ✭ 62 (+463.64%)
Mutual labels:  spring-cloud
sample-axon-kafka
Sample CQRS and event sourced application developed on top of axon framework.(Kafka is used for distributing the events)
Stars: ✭ 31 (+181.82%)
Mutual labels:  spring-cloud
microservice-elk
Creating microservice using Spring Boot, Eureka, Zuul, Sleuth, Zipkin and ELK Stack
Stars: ✭ 19 (+72.73%)
Mutual labels:  spring-cloud

What?

Pull some configuration for a spring boot app out of AWS' EC2 parameter store. The config is a database password encrypted using KMS.

Background

AWS blog describes the Parameter Store component of the Systems Manager:

you can also use it as a generic secret management store

Another post describes populating the secrets (or other config) from a build pipeline.

Approach

Use PropertySourceLocator from spring-cloud-commons. Approach copied from spring-cloud-vault's VaultBootstrapConfiguration.

Instructions

You will need:

  • An AWS account with your credentials sitting in ~/.aws/credentials. Or anywhere else the java-aws-sdk can find them.
  • docker or just plain old mysql running on port 3306

Start a transient mysql instance:

docker run --rm -it -p 3306:3306 -e MYSQL_ROOT_PASSWORD=insecure mysql
docker exec mysql mysql -uroot -pinsecure --execute 'create database demo_db;'

Store an encrypted password in EC2 parameter store:

aws ssm put-parameter --name "db.password" --type "SecureString" --value "insecure"

You should be able to run the app (AwsSsmDemoApplication) Break it by changing the password:

aws ssm put-parameter --name "db.password" --type "SecureString" --value "letmein" --overwrite
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].