Skip to content

Resolves: MTV-4378 | Add TLS certificate validation for Hyper-V provider#2231

Merged
avivtur merged 1 commit intokubev2v:mainfrom
Hazanel:hyperv-tls-certificate
Feb 5, 2026
Merged

Resolves: MTV-4378 | Add TLS certificate validation for Hyper-V provider#2231
avivtur merged 1 commit intokubev2v:mainfrom
Hazanel:hyperv-tls-certificate

Conversation

@Hazanel
Copy link
Contributor

@Hazanel Hazanel commented Feb 3, 2026

Ref: https://issues.redhat.com/browse/MTV-4378

  • Add CertificateValidationField to Hyper-V provider creation form
  • Include cacert and insecureSkipVerify in Hyper-V provider secret
  • Display certificate fields in provider credentials view
  • Support certificate configuration in edit provider flow
  • Add WIN_RM_PORT constant for WinRM HTTPS port
  • Add Hyper-V ProviderCard to Overview Welcome page
image

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 17.64706% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.58%. Comparing base (13484d0) to head (bf68b07).
⚠️ Report is 967 commits behind head on main.

Files with missing lines Patch % Lines
...iders/create/utils/buildHypervProviderResources.ts 14.28% 6 Missing ⚠️
...viders/create/fields/hooks/useUrlByProviderType.ts 40.00% 3 Missing ⚠️
...erview/tabs/Overview/cards/Welcome/WelcomeCard.tsx 0.00% 2 Missing ⚠️
...edentials/components/utils/getDefaultFormValues.ts 0.00% 2 Missing ⚠️
...Credentials/components/EditProviderCredentials.tsx 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2231       +/-   ##
===========================================
- Coverage   36.81%   14.58%   -22.23%     
===========================================
  Files         158     1127      +969     
  Lines        2548    20187    +17639     
  Branches      599     3773     +3174     
===========================================
+ Hits          938     2944     +2006     
- Misses       1428    17233    +15805     
+ Partials      182       10      -172     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Hazanel Hazanel force-pushed the hyperv-tls-certificate branch 5 times, most recently from 4e1f8d0 to 75f2cdc Compare February 4, 2026 08:33
Copy link
Member

@avivtur avivtur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please look in file src/overview/tabs/Overview/card/Welcome/WelcomeCard.tsx
in the we render provider cards to the screen of the overview page, please add a ProviderCard for hyper-v

Comment on lines 55 to 58
{showPreserveIPWarningsConditions && (
<StackItem>
<PlanWarningAlerts conditions={preserveIPWarningsConditions} />
</StackItem>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why adding warning alerts? who asked for this? this could be a significant UX change that should confirmed before added please remove

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also unrelated to the PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove file, please refer to comment above


type CertificateUploadProps = FileUploadProps & {
url?: string;
onFetchedCertificate?: (cert: string) => void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you need this? the onChange should function in the same way, this file shouldn't really change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore this file please

Comment on lines 47 to 53
launcher<FetchCertificateModalProps>(FetchCertificateModal, {
existingCert: (value as string) ?? '',
handleSave: (saved) => {
onTextChange?.(syntheticEvent, saved);
},
url: url ?? '',
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this launcher method is an API provided from console we are using to render modal dialogs, in general if you're adding a modal dialog you should use this

)}
</FileUpload>

{isModalOpen && (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the reason to use inline render for the modal rather than using the launcher API?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes in this file, onFetchedCertificate is not need here

if (providerType === PROVIDER_TYPES.hyperv) {
// Format as https URL for certificate fetching (WinRM over HTTPS uses port 5986)
const host = (hypervHost as string)?.trim();
return host ? `https://${host}:5986` : '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace 5986 with const something like
const WIN_RM_PORT = 5986;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file not needed please remove and use FetchCertificateModal that you deleted

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore this file

@Hazanel Hazanel force-pushed the hyperv-tls-certificate branch 3 times, most recently from 320cfdf to 22145ea Compare February 4, 2026 13:28
@Hazanel Hazanel closed this Feb 4, 2026
@Hazanel Hazanel force-pushed the hyperv-tls-certificate branch from 22145ea to 53f9ef8 Compare February 4, 2026 13:33
@Hazanel Hazanel reopened this Feb 4, 2026
@avivtur
Copy link
Member

avivtur commented Feb 4, 2026

LGTM

- Add CertificateValidationField to Hyper-V provider creation form
- Include cacert and insecureSkipVerify in Hyper-V provider secret
- Display certificate fields in provider credentials view
- Support certificate configuration in edit provider flow
- Add WIN_RM_PORT constant for WinRM HTTPS port
- Add Hyper-V ProviderCard to Overview Welcome page

Ref: https://issues.redhat.com/browse/MTV-4378
Signed-off-by: Elad Hazan <ehazan@redhat.com>
@Hazanel Hazanel force-pushed the hyperv-tls-certificate branch from 5f8a0e4 to bf68b07 Compare February 4, 2026 14:44
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2026

@Hazanel Hazanel requested a review from avivtur February 5, 2026 06:20
@avivtur avivtur added this pull request to the merge queue Feb 5, 2026
Merged via the queue into kubev2v:main with commit 3242fb3 Feb 5, 2026
10 checks passed
@Hazanel Hazanel deleted the hyperv-tls-certificate branch February 5, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants