Skip to content

Latest commit

 

History

History
38 lines (19 loc) · 1.19 KB

README.md

File metadata and controls

38 lines (19 loc) · 1.19 KB

sensitive

logo!

Go Reference

This is a lib which can be used to hide sensitive values in struct.Mostly in microservices/applications config is managed via external (json/yaml) files. The values are parsed and mapped to struct. Some applications which speaks to external APIs will require key to be provided. These keys can be managed in config value fields.When logging the config values in public these secrets can be exposed and cause data leaks.

Focus of the lib is to manage data leaks,the lib has a Mask method which is

used to perform this operation.

There are 2 input fields required for the operation

  1. data structure

  2. list of fields which are required to be masked or hidden

usage

refer to example/main.go for how to use

Note:- please set env variable SET_VALUE with required value to be used for masking sensitive value

Todo

  • expand the functionality to non exported columns

contributing

please feel free to raise a PR with your changes