-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow use of client public keys (#112)
* Add publicKey to providerConfig API + first implementation * Add first implementation without using a referenced resource * Replace public key field with a reference to a secret * Use v1beta1helper functions for fetching secret resource * Format code * Remove unused type Key * Improve docs for client public keys * Add a comment in the docs about kubeSystemManagerByGardener being the default scope * Extract client key fetching to a seperate function * Comment out unused function for verifying public keys in shoot admission * Apply suggestions from code review Co-authored-by: Vladimir Nachev <vladimir.nachev@sap.com> * Split check for resource into two steps: existance & kind Secret * Rename PublicKeysSecretReference to TrustedKeysResourceName * Improve docs to include a description of the format of the keys * Validate trusted keys resource in admission controller * Create a first simple test for getClientKeys using fake client * Format code * Rename remaining places where old name of field was used & make gen * Improve doc on feature Co-authored-by: Vladimir Nachev <vladimir.nachev@sap.com> * Improve tests for getClientKeys * Fix typo 'date' -> 'data' * Improve formatting * Apply suggestions from PR * Fix another 'date' typo * Remove duplicate public keys from the final keys array that lakom uses for verification * Add test for lakomConfig.Complete (duplicate keys removed) * Improve uniqueKeys implementation (anonymous interface & slices.ContainsFunc) * Run make generate * Apply changes suggested by linters * Run update skaffold deps * Format tests * Apply suggestions from code review Co-authored-by: Vladimir Nachev <vladimir.nachev@sap.com> * Fix the reuse of same slice between the tests * Fix typo * Remove unnecessary slice shallow copies * Skip unnecessary checks in key validation if key name is empty * Remove TODO about extracting the common logic from key validation It was decided that the logic is simple enough and can remain as is. --------- Co-authored-by: Vladimir Nachev <vladimir.nachev@sap.com>
- Loading branch information
Showing
15 changed files
with
450 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.