oracle/spring-cloud-oracle

Accessing vault secrets that has pending deletion secrets causes spring application to crash

JonathanVuurstaek opened this issue · 3 comments

Issue
I have an application setup to retrieve all secrets from a certain vault using the property-sources setup. When spring tried to read the secrets it also read secrets that are marked "pending deletion" which causes an error and crashes my spring application. If there are already solutions out there I am happy to hear.

Solution
I would expect that it should only retrie secrets that have LifeCycleState "ACTIVE". Theoratically adding the lifecycState line into the request builder should resolve this isue.

com.oracle.bmc.vault.requests.ListSecretsRequest:153

ListSecretsRequest request = ListSecretsRequest.builder()
                    .vaultId(vaultId)
                    .compartmentId(compartmentId)
                    .lifecycleState(LifecycleState.Active)
                    .page(page)
                    .build();

Properties

image

Thanks very much for reporting the issue, we will take a look and get back to you

Hi @JonathanVuurstaek, this should be fixed in #154. We'll add this to the next release 👍

@anders-swanson Thank you for the quick reaction and fix!