Skip to content

Respect SSL verification settings#44

Open
c-kr wants to merge 1 commit intoConSol-Monitoring:mainfrom
c-kr:vsan-ssl-verification
Open

Respect SSL verification settings#44
c-kr wants to merge 1 commit intoConSol-Monitoring:mainfrom
c-kr:vsan-ssl-verification

Conversation

@c-kr
Copy link
Copy Markdown

@c-kr c-kr commented Apr 18, 2026

VSAN SSL Verification

Summary

This patch makes vsan respect -nossl / --disable-ssl-verification.

The initial vCenter connection already respects -nossl. This fix applies to the
secondary vSAN API context created for vsu.GetVsanVcMos().

Before this fix, that secondary vSAN API context disabled certificate verification
unconditionally. After the fix:

  • default behavior uses normal certificate verification
  • only -nossl disables hostname and certificate checks

Files

  • checkvsphere/vcmd/vsan.py

Quick Verification

export PYTHONPATH="$PWD"
export VC_HOST='vcenter.example.com'
export VC_USER='[email protected]'
export VC_PASS='secret'

Use an environment where the initial vCenter connection succeeds without
-nossl, so the command reaches the secondary vSAN API context.

python -m checkvsphere.cli vsan -s "$VC_HOST" -u "$VC_USER" -p "$VC_PASS" --mode healthtest
echo $?

Expected before fix:

  • the secondary vSAN API context disables certificate verification internally

Expected after fix:

  • the secondary vSAN API context keeps certificate verification enabled unless -nossl is added

Then verify the opt-out path explicitly:

python -m checkvsphere.cli vsan -s "$VC_HOST" -u "$VC_USER" -p "$VC_PASS" -nossl --mode healthtest
echo $?

Expected after fix:

  • connection proceeds with certificate verification disabled only because -nossl was supplied

@c-kr c-kr marked this pull request as ready for review April 22, 2026 09:34
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.

1 participant