minio / kes

Key Managament Server for Object Storage and more
https://min.io/docs/kes/concepts/
GNU Affero General Public License v3.0
460 stars 97 forks source link

gcp: fix bug when listing keys #300

Closed aead closed 1 year ago

aead commented 1 year ago

This commit fixes two bugs in the list key implementation for GCP SecretManager.

The first bug is caused by a additional * appended to the ListSecrets API call. This caused GCP to respond with an error like:

rpc error: code = NotFound desc = Project 'projects/<project-id>/*' not found.

Further, the GCP ListSecrets API returns full paths for each secrets. However, KES clients just know about the key name. Therefore, we have to strip the path prefix and just return the path base as key name.