Files
teleport/lib/auth/native
Jakub Nyckowski 5376f1a9aa Remove test keys (#19507)
A few of our tests that run certificate rotation fail with an error similar to this:

```
can only switch to phase update_clients from init, the current phase is
```

This happens when a duplicated private key is returned and set as a new key during CA rotation. During the CA rotation, we look for duplicated keys https://github.com/gravitational/teleport/blob/962e5a25bc56b5aad05528867182a43cd53cb551/lib/auth/rotate.go#L218 and try to rotate all of them at one. Because some of our tests use still use `testauthority` that only has 4 keys there is a huge chance that the same key will be returned twice, which causes the issue.
I swapped the logic to use a bigger pool with keys introduced in https://github.com/gravitational/teleport/pull/18750. I also removed the randomization part that, after some testing, I discovered was also causing some problems.

We could probably refactor the code in many tests now to make it simpler, but I want to keep this change as simple as possible. Otherwise, backporting bigger changes to older branches takes a long time.
2022-12-21 16:44:04 +00:00
..
2022-12-21 16:44:04 +00:00