Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 2.2 KB

README.md

File metadata and controls

31 lines (27 loc) · 2.2 KB

This project add support to jasypt-spring utilizing aws KMS for encrypt / decrypt

CodeQL Qodana Maven Publish Maven Release snyk

Maven Central

Usage

  1. import lib in maven
<dependency>
    <groupId>com.jayxu</groupId>
    <artifactId>jasypt-spring-aws-kms-starter</artifactId>
    <version>{version}</version>
</dependency>
  1. define aws.kms.defaultKeyId in bootstrap config file, else the default Jasypt StringEncryptor will be used
  2. config aws aws_access_key_id, aws_secret_access_key, region properly according to this article
  3. you can use multiple keyIds in one project:
ENC(xxxxxxxxxx) // will use aws.kms.defaultKeyId to decrypt, same as ENC([${aws.kms.defaultKeyId}]xxxxxxxxxx)
ENC([another-key-id]xxxxxxxxxx) // will use another-key-id to decrypt

Tools

  1. start nacos-demo project as a spring boot project
  2. open htttp://localhost:8088/swagger-ui.html in browser
  3. the default-controller provides several tools for encrypt / decrypt by KMS (or default Jasypt StringEncryptor)