Skip to content

Commit

Permalink
Merge pull request #484 from TheJumpCloud/SA-3282_Radius_LocalAccount
Browse files Browse the repository at this point in the history
SA-3282: localUserAccount field check
  • Loading branch information
gweinjc authored Apr 24, 2023
2 parents f5e42f9 + 8ced67b commit 0182a81
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
30 changes: 30 additions & 0 deletions scripts/automation/Radius/Changelog.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/automation/Radius/Config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 5 additions & 4 deletions scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ 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 ([string]::IsNullOrEmpty($response.systemUsername)) { $response.username } else { $response.systemUsername })

id = $response._id
email = $response.email
}
}
end {
return $userObj
}
}

0 comments on commit 0182a81

Please sign in to comment.