Giter VIP home page Giter VIP logo

secureconfig's Introduction

SecureConfig


Build Status NuGet Nuget GitHub

Tool to give security to the configurations of an ASPNET Core application by encrypting sensitive information and handling in a secure way

Prerequisites:

  • NetCore 2.1
    • Support from version 1.0.0
  • NetCore 3.1
    • Support from version 1.2.0
  • Net 5.0
    • Support from version 1.3.0

· Description:

This tool allows to encrypt configuration sections on app.settings files, and decrypt the information in runtime adding those configuration as a singleton inside the application.

· Getting started:

  1. Install ChustaSoft.Tools.SecureConfig package via NuGet Package manager

  2. Setup a private key in a secure way (ie: as a environment variable), SecureConfig will use it for encrypt and decrypt the settings files

  3. Create a Settings object inside the project, should match the section that will be encrypted

  4. Add the AppSettings section in all the different environment appsettings

  5. In Program, add the following line during IWebHost building (through IWebHostBuilder)

    • .EncryptSettings<[TSettings]>(true)
      • [TSettings] correponds to the settings DTO created in the step 2
      • true if you want to encrypt the settings
      • false if you want to decrypt the files
  6. In Startup, on ConfigureServices, add the following line in order to setup the singleton and manage the encrypted/decrypted settings:

    • services.SetUpSecureConfig<[TSettings]>(Configuration, testApikey);
      • [TSettings] correpond to the settings DTO created in the step 2
      • testApikey corresponds to the secret key created in step 1
  7. Inject the settings class object in the class that the project will need, SecureConfig manage this class as a Singleton in the application lifecycle

For deep configurations, visit this section of our current wiki

That's all!

Enjoy it and do not hesitate to contacts us for suggestions or doubts.

Thanks for using and contributing

Twitter Follow YouTube Video Views

secureconfig's People

Contributors

xelit3 avatar

Watchers

 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.