mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
kms.ListKeys returns CreatedBy/CreatedAt when information is available (#20223)
This commit is contained in:
@@ -126,8 +126,16 @@ func (c *kesConn) Status(ctx context.Context) (map[string]madmin.ItemState, erro
|
||||
return status, nil
|
||||
}
|
||||
|
||||
func (c *kesConn) ListKeyNames(ctx context.Context, req *ListRequest) ([]string, string, error) {
|
||||
return c.client.ListKeys(ctx, req.Prefix, req.Limit)
|
||||
func (c *kesConn) ListKeys(ctx context.Context, req *ListRequest) ([]madmin.KMSKeyInfo, string, error) {
|
||||
names, continueAt, err := c.client.ListKeys(ctx, req.Prefix, req.Limit)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
keyInfos := make([]madmin.KMSKeyInfo, len(names))
|
||||
for i := range names {
|
||||
keyInfos[i].Name = names[i]
|
||||
}
|
||||
return keyInfos, continueAt, nil
|
||||
}
|
||||
|
||||
// CreateKey tries to create a new key at the KMS with the
|
||||
|
||||
Reference in New Issue
Block a user