Added log when trying to access forbidden env var

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
ItalyPaleAle 2023-02-08 21:27:00 +00:00
parent c4b728cc68
commit d7daa7541f
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,8 @@ func (s *envSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecr
var value string
if s.isKeyAllowed(req.Name) {
value = os.Getenv(req.Name)
} else {
s.logger.Warnf("Access to env var %s is forbidden", req.Name)
}
return secretstores.GetSecretResponse{
Data: map[string]string{