You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no error checking of the response code from vault. If there's an issue with accessing the certs from vault, there will be a non-200 response code and so before unmarshalling the body of the response we should be checking the response code. That would be done right after this bit of code:
The decoded JSON should be checked to see if the certificate and the key are non-empty as they could be empty from vault, or vault could have returned some other kind of JSON object in which case the decoding would have succeeded but resulted in an empty object. That kind of check should happen just after we decode the JSON object here:
The logger info should not be logging the cert at level Info, I think it should be a debug output, and there should be some labeling of what is being output here:
security-api-gateway/core/certs.go
Lines 63 to 69 in 96482b5
Decodeshould be checked here and returned if non-nil:security-api-gateway/core/certs.go
Line 72 in 96482b5
security-api-gateway/core/certs.go
Line 72 in 96482b5
security-api-gateway/core/certs.go
Line 73 in 96482b5