Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 721 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 721 Bytes

vcsm

Helper module for using vCenter Smartcard auth (via pivy-agent) with pyVmomi.

Installation

pip install git+https://github.com/eait-itig/vcsm

Example

import vcsm
from pyVmomi import vim

si = vcsm.getServiceInstance(
    host = 'vcenter.some.domain',
    upn = '[email protected]',
    cacert = '/etc/ssl/pivy-cert-ca.pem')

content = si.RetrieveContent()

vcsm validates certificates before presenting them to vCenter, so it needs to use the CA cert for your smartcard certs. If your smartcard CA is not in the system CA certificate store, you can provide it to vcsm as a PEM-encoded file using the cacert argument to vcsm.getServiceInstance().