Update Deploy-UserCertificate Functions to generate certs on SHA match #612
+1,147
−425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
What does this solve?
This release aims to reduce the amount of time required to generate and deploy certificates for users. In previous iterations of this script, the tool would generate a new command each time the script was run for each user. This version changes the command "trigger" to the SHA1 hash of a user's certificate and compares that value when running Start-DeployUserCerts.
This release also introduces a multi-threaded operation when the tool generates commands for "new" or "all" users in the radiusMembers list.
Is there anything particularly tricky?
How should this be tested?
Functionality for the changes should be already covered in our Pester tests for this module. To validate the changes in this pull request. Pull the branch, open up the
scripts/automation/Radius
directory in a PowerShell session and run the pester tests on one of our Pester Tests orgs:./tests/Invoke-Pester.ps1 -JumpCloudApiKey {YourPesterTestAPIKey}
In terms of updating from a previous version of the 2.0.0 development branch of radius certs:
$forceGenerateCommands
parameter is specified.Before:
After:
Screenshots
Preliminary testing indicates that this version of the script runs about 47% faster than the previous version.
Newest version (running threads in parallel to generate commands)
Previous version (running single threaded and in sequence to generate commands)