Giter Site home page Giter Site logo

example-encrypt-properties's Introduction

Encrypt properties

This folder explains how to enable property encryption, and how to encrypt and decrypt values.

We are using jasypt

How to use

Preliminaries

In this folder, run:

  • ./unpack-jasypt.sh
  • npm install

Working with our tooling

A number of Node.js scripts are provided here to make dealing with encrypted properties smoother. These follow the Unix convention of converting standard input to standard output, so they can be piped together.

How to add encrypted values to the property files

  1. Check the following entry under Tech logins in 1Password to see if there's already an encryption key for the given environment: Passwords for encrypted property files.
  2. If there's not yet a password, create one by adding a new field to the entry in 1Password.
  3. Run node encrypt-properties.js --help to learn how to encrypt properties in a file.
  4. Make sure that the password is added to the following environment variable, and present when the app is running in the given environment: properties_decrypt_key.

How to view/diff property files with encrypted properties

  1. Find the password for the environment under Tech logins in 1Password.
  2. Run node decrypt-properties.js --help for more information.

How to re-encrypt a properties file with a new password

  1. Run node encrypt-properties-with-new-password.js --help for more information.

Work with the Jasypt CLI directly

See the official documentation for further details.

If you get a EncryptionOperationNotPossibleException when the application tries to decrypt the value, double check that the algorithm and IV generator arguments you've provided to the jasypt binary match the values in EncryptablePropertiesFactory.java.

How to upgrade Jasypt

We have included the jasypt distribution zip in our repo for convenience and consistency.

The current version is 1.9.3 and was downloaded from the following URL: https://github.com/jasypt/jasypt/releases/download/jasypt-1.9.3/jasypt-1.9.3-dist.zip

example-encrypt-properties's People

Contributors

fatso83 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.