-
Notifications
You must be signed in to change notification settings - Fork 492
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
test(ec2): ensure that private key is not written to telemetry #5779
Conversation
Co-authored-by: Justin M. Keyes <[email protected]>
Co-authored-by: Justin M. Keyes <[email protected]>
Co-authored-by: Justin M. Keyes <[email protected]>
Co-authored-by: Justin M. Keyes <[email protected]>
Windows failure . The
So if write perms is not important here, as a workaround maybe we can skip that on Windows for now (in
|
Based on https://help.ubuntu.com/community/SSH/OpenSSH/Keys it sounds like keys should already have these permissions set correctly. So this chmod is mostly a double-check since the agent will throw an error if the permissions are too open. I changed the code to throw a more useful error, and only do chmod on non-windows. |
Seems like there is a more general problem of the key not existing on windows after write. Investigating now. |
) ## Problem We want to enforce that the private key generated by the toolkit is not accidentally slipped into a telemetry metric. ## Solution Similar to `assertTelemetry`, we implement a `assertNoTelemetryMatch` test utility that scans all metrics to see if a specified keyword is included in its keys or values. With this utility, it is relatively straightforward to assert that this private key doesn't appear in the telemetry when we generate it and perform other operations with it. --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
Problem
We want to enforce that the private key generated by the toolkit is not accidentally slipped into a telemetry metric.
Solution
Similar to
assertTelemetry
, we implement aassertNoTelemetryMatch
test utility that scans all metrics to see if a specified keyword is included in its keys or values.With this utility, it is relatively straightforward to assert that this private key doesn't appear in the telemetry when we generate it and perform other operations with it.
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.