Skip to content

Encrypted properties are not decrypted in plain text files #865

@merusso

Description

@merusso

The Spring Cloud Config Server is not decrypting values when serving plain text config files. Is this known/expected behavior?

Detected Release Train: Dalston.SR4, Edgware.RELEASE
Detected Versions: 1.3.3.RELEASE, 1.4.0.RELEASE

Let's say I have a property file with an encrypted value, like so:

app.properties

# "mysecret"
spring.datasource.password = {cypher}682bc583f4641835fa2db009355293665d2647dade

If I try to access this property using "standard" (JSON) or "alternative format" (.properties,.yaml), this value is correctly decrypted by the config server.

GET /app/profile/branch

{
  "name": "app",
  "profiles": [
    "profile"
  ],
  "label": "branch",
  "version": "1839be51feaa73138feef1ba8653bfe7a4c21fb3",
  "state": null,
  "propertySources": [
    {
      "name": "ssh://git-server/app.git/app.properties",
      "source": {
        "spring.datasource.password": "mysecret"
      }
    }
  ]
}

GET /branch/app-profile.properties

spring.datasource.password = mysecret

However, if I attempt to access this file using the "plain text" format, the value is not being decrypted.

GET /app/profile/branch/app.properties

# "mysecret"
spring.datasource.password = {cypher}682bc583f4641835fa2db009355293665d2647dade

Similarly, if I have an encrypted value stored in another text file format (.conf for instance), this value will not be decrypted when requesting this file via the config server.

GET /app/profile/branch/app.conf

{
    password    {cypher}682bc583f4641835fa2db009355293665d2647dade
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions