-
Notifications
You must be signed in to change notification settings - Fork 53
feat: add byok support and refactor #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
575252d
to
a551a9d
Compare
Sample log: ➜ kubectl logs azure-kms-provider-k8s-master-20554482-0 -n kube-system -f
I0116 01:22:12.188341 1 main.go:56] "Starting KeyManagementServiceServer service" version="byok01" buildDate="2021-01-15-17:12"
I0116 01:22:12.386847 1 keyvault.go:133] "using kms key for encrypt/decrypt" vaultName="aokvrjbpab47fxymu" keyName="k8s" keyVersion="262067a9e8ba401aa8a746c5f1a7e147"
I0116 01:22:12.387447 1 main.go:82] Listening for connections on address: /opt/azurekms.socket
I0116 01:23:38.736659 1 server.go:56] encrypt request complete
I0116 01:23:42.818829 1 server.go:56] encrypt request complete
I0116 01:23:50.169612 1 server.go:56] encrypt request complete |
pkg/utils/grpc.go
Outdated
|
||
func LogGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { | ||
klog.V(2).Infof("GRPC call: %s", info.FullMethod) | ||
klog.V(2).Infof("GRPC request: %v", req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should increase the verbosity of these logs as it can contain sensitive data. we should also see if we need to mask anything here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The request and response for this doesn't contain much information other than the plain and cipher text. Both are information that we don't want to log at any levels. So I've removed that and added logs in the methods to log start and end.
@ritazh I've taken another pass to add more appropriate logs with redacted client information. PTAL when you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Finally we have BYOK! 🎉
Reason for Change:
k8s.io/apiserver
Issue Fixed:
fixes #55
fixes #59
fixes #63
Notes for Reviewers: