It seems the loading order of the secrets has changed since the release of 3.0.0. In pre 3.0.0 world, application specific secrets would override the default secrets under application. For example, in the following structure
/secret/dev/my-app
my.secret=application specific
/secret/dev/application
my.secret=default
my.secret would resolve to application specific if application name was my-app and it would resolve to default for any other application but with 3.0.0 release my.secret resolves to default for my-app application.
This behaviour shows itself when secrets are imported by spring.config.import=optional:vault://. There is an easy workaround for this by setting spring.config.import=optional:vault://secret/dev/application,optional:vault://secret/dev/my-app.
Hello,
It seems the loading order of the secrets has changed since the release of 3.0.0. In pre 3.0.0 world, application specific secrets would override the default secrets under
application
. For example, in the following structuremy.secret
would resolve toapplication specific
if application name wasmy-app
and it would resolve todefault
for any other application but with 3.0.0 releasemy.secret
resolves todefault
formy-app
application.I have put a small application that demonstrate this at https://github.com/fkohantorabi/VaultOrderBugReport300.
This behaviour shows itself when secrets are imported by
spring.config.import=optional:vault://
. There is an easy workaround for this by settingspring.config.import=optional:vault://secret/dev/application,optional:vault://secret/dev/my-app
.