alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.29k stars 12.84k forks source link

Hot load not decrypt password #4641

Closed huan415 closed 3 years ago

huan415 commented 3 years ago

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

when i edit config files, have a error(ERROR com.alibaba.druid.pool.DruidDataSource [] - create connection SQLException, url: jdbc:mysql://127.0.0.1). reason: password is ENC encryption,Hot load not decrypt password

Describe what you expected to happen

Hot load decrypte password

How to reproduce it (as minimally and precisely as possible)

  1. edit config files

Tell us your environment

version: nacos 1.3/1.4 spring-cloud-starter-alibaba-nacos-config: 2.2.1 jasypt-spring-boot: 3.0.2

Anything else we need to know?

horizonzy commented 3 years ago

The nacos server just push config value to your application. The value depends on what you modify. The decrypt operation need you to handle.

KomachiSion commented 3 years ago

It's hard and unreasonable for config-center to analyze your config items and do operation. If you publish an encrypt config, you need decrypt it in your application by yourself. because config-center is in different layer with users and application, but users and application is in same layer.