strong-config / node

💪 Simple & Secure Config Management for Node.js 💪
https://strong-config.dev
MIT License
35 stars 2 forks source link

Strong-config ignores properties which name is just `secret` #72

Open leosuncin opened 1 month ago

leosuncin commented 1 month ago

With the following configuration file:

config/development.yml

server:
  host: 127.0.0.1
  port: 3000

jwt:
  secret: VKQEl9vxXDFxtfrmSaYGAcBDvh9Kr1jm

I expect to be encrypted to:

server:
  host: 127.0.0.1
  port: 3000

jwt:
  secret: ENC[AES256_GCM,data:bP9msrqiYiFuT6BLV34BkdH2u/FpeZ32W3JcmSYuZQUF7jiNw48AFWs263H26WfIA4sX6xJAuZ6WoCp745PPLbVjWmizvTUBGn3IUao=,iv:x16OCfTo6F+9Vz/39KRktrmcp2TdkCEesCa+x24gSBY=,tag:vJ0ixpPROTtKBsddwj6SxQ==,type:str]

sops: # SOPS encryption...

But jwt.secret it's ignored and leave it as it.

System information

@strong-config/node 1.3.1 node.js version: 22.7.0 OS: Ubuntu 20.04 WSL

chapati23 commented 1 month ago

nice catch! i'm currently 100% busy with my day job so I won't have time to fix this myself anytime soon, I appreciate PRs and other contributions from the community :)