Fixed invalid props on Custom EST certs edits (#36147)

**Related issue:** Resolves #35729 

- Fixed url prop mapping rule on Custom EST certs form.
- When editing the url field, include credentials to PATH end-point.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [X] QA'd all new/changed functionality manually
This commit is contained in:
Juan Fernandez 2025-11-21 22:36:10 -04:00 committed by GitHub
parent 7d224515d5
commit 1078c277ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 3 deletions

View file

@ -0,0 +1 @@
- Fixed bug that prevented users from editing custom EST certificates URLs.

View file

@ -190,11 +190,11 @@ export const generateEditCertAuthorityData = (
case "custom_est_proxy": {
const {
name: customESTName,
scepURL: customESTUrl,
url: customESTUrl,
username: customESTUsername,
password: customESTPassword,
} = formData as ISmallstepFormData;
return {
} = formData as ICustomESTFormData;
const diff = {
custom_est_proxy: deepDifference(
{
name: customESTName,
@ -205,6 +205,16 @@ export const generateEditCertAuthorityData = (
certAuthWithoutType
),
};
// Make sure credentials are included if we are modifying the url
if (diff.custom_est_proxy.url) {
if (!diff.custom_est_proxy.username) {
diff.custom_est_proxy.username = customESTUsername;
}
if (!diff.custom_est_proxy.password) {
diff.custom_est_proxy.password = customESTPassword;
}
}
return diff;
}
default:
throw new Error(