From 4bf6c5be81f89e33b4717aca7f1ae8279fc7d0cd Mon Sep 17 00:00:00 2001 From: Geoffrey Wein Date: Thu, 20 Apr 2023 14:47:46 -0600 Subject: [PATCH 1/3] localUserAccount field check --- .../automation/Radius/Functions/Private/Get-WebJCUser.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 b/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 index 2d44aa75b..358557ce9 100644 --- a/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 +++ b/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 @@ -13,14 +13,14 @@ function get-webjcuser { } process { $response = Invoke-RestMethod -Uri "https://console.jumpcloud.com/api/systemusers/$userID" -Method GET -Headers $headers - } - end { - # return ${id, username, email } $userObj = [PSCustomObject]@{ - username = $response.username + # If the localUserAccount field is set, use that for username, otherwise use JC username + username = $(if ($response.systemUsername -eq "") { $response.username } else { $response.systemUsername }) id = $response._id email = $response.email } + } + end { return $userObj } } \ No newline at end of file From 9743c78bf00fabfeb8cebf27ea0c96e68540408a Mon Sep 17 00:00:00 2001 From: Joe Workman Date: Fri, 21 Apr 2023 09:05:34 -0600 Subject: [PATCH 2/3] changelog + version --- scripts/automation/Radius/Changelog.md | 30 ++++++++++++++++++++++++++ scripts/automation/Radius/Config.ps1 | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 scripts/automation/Radius/Changelog.md diff --git a/scripts/automation/Radius/Changelog.md b/scripts/automation/Radius/Changelog.md new file mode 100644 index 000000000..51356bb3e --- /dev/null +++ b/scripts/automation/Radius/Changelog.md @@ -0,0 +1,30 @@ +## 1.0.1 + +Release Date: April 21, 2023 + +#### RELEASE NOTES + +``` +Users with Local User Account names that differ from their JumpCloud Username are now supported +``` + +#### FEATURES: + +- If a user's local account name (systemUsername) is specified on an account, the certificates for those users will be generated with their local account name (not username) and installed correctly. + +## 1.0.0 + +Release Date: March 21, 2023 + +#### RELEASE NOTES + +``` +Iniital release of the Passwordless Radius User Certificate Generation automation scritps +``` + +#### FEATURES: + +- Generate/ Import CA Certificate +- Generate User Certificates from CA Certificate +- Distribute User Certificates to JumpCloud Devices w/ JumpCloud Commands +- Monitor Command Deployments diff --git a/scripts/automation/Radius/Config.ps1 b/scripts/automation/Radius/Config.ps1 index 93c1d5087..16e169be1 100644 --- a/scripts/automation/Radius/Config.ps1 +++ b/scripts/automation/Radius/Config.ps1 @@ -37,7 +37,7 @@ $CertType = "UsernameCn" # Do not modify below ################################################################################ -$UserAgent_ModuleVersion = '1.0.0' +$UserAgent_ModuleVersion = '1.0.1' $UserAgent_ModuleName = 'PasswordlessRadiusConfig' #Build the UserAgent string $UserAgent_ModuleName = "JumpCloud_$($UserAgent_ModuleName).PowerShellModule" From 8ced67bb0f3ea013b1a92c501d8f10dcfb6abb5c Mon Sep 17 00:00:00 2001 From: Geoffrey Wein <89030113+gweinjc@users.noreply.github.com> Date: Mon, 24 Apr 2023 14:47:46 -0600 Subject: [PATCH 3/3] Update scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 Co-authored-by: Joe Workman <54448601+jworkmanjc@users.noreply.github.com> --- scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 b/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 index 358557ce9..4f9488179 100644 --- a/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 +++ b/scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1 @@ -15,7 +15,8 @@ function get-webjcuser { $response = Invoke-RestMethod -Uri "https://console.jumpcloud.com/api/systemusers/$userID" -Method GET -Headers $headers $userObj = [PSCustomObject]@{ # If the localUserAccount field is set, use that for username, otherwise use JC username - username = $(if ($response.systemUsername -eq "") { $response.username } else { $response.systemUsername }) + username = $(if ([string]::IsNullOrEmpty($response.systemUsername)) { $response.username } else { $response.systemUsername }) + id = $response._id email = $response.email }