Skip to content

The latest secret version is not fetched from GCP Secret Manager when version number is greater than 9 and there are multiple enabled secret versions #2206

@nh250082

Description

@nh250082

In our setup, we have multiple secret versions enabled in GCP. Hence a "list secret versions" returns multiple versions with different version id. The greatest version id is considered as the latest.

However in GoogleSecretComparatorByVersion.class, the comparator does an String lexical comparison. So a secret version id 9 takes priority over greater version id (e.g. 11, 30, ...) and this results in spring config server returning version id 9 always as the latest

I think the GoogleSecretComparatorByVersion.class must be fixed to do a proper numeric comparison.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions