VMware VSHIELD MANAGER 4.1.0 UPDATE 1 - API User guide

Category
Software
Type
User guide

This manual is also suitable for

vShield API Programming Guide
vShield Manager 4.1.0 Update 1
vShield Zones 4.1.0 Update 1
vShield App 1.0.0 Update 1
vShield Edge 1.0.0 Update 1
vShield Endpoint 1.0.0 Update 1
This document supports the version of each product listed and
supports all subsequent versions until the document is replaced
by a new edition. To check for more recent editions of this
document, see http://www.vmware.com/support/pubs.
EN-000434-02
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
2 VMware, Inc.
vShield API Programming Guide
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
docfeedback@vmware.com
Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and
intellectual property laws. VMware products are covered by one or more patents listed at
http://www.vmware.com/go/patents.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks
and names mentioned herein may be trademarks of their respective companies.
VMware, Inc. 3
Contents
AboutThisBook 7
1 OverviewofVMwarevShield 9
vShieldComponents 9
vShieldManager 9
vShieldApp 9
vShieldEdge 10
vShieldEndpoint 10
PortsRequiredforvShield 10
AnIntroductiontoRESTAPIforvShieldUsers 10
HowRESTWorks 10
UsingthevShieldRESTAPI 11
RESTfulWorkflowPatterns 11
ForMoreInformationAboutREST 12
2 vShieldManagerManagement 13
SynchronizethevShieldManagerwithvCenterServerandDNS 13
RetrievingTechSupportLogs 14
GetthevShieldManagerTechnicalSupportLogFilePath 14
GetthevShieldEdgeTechnicalSupportLogFilePath 14
3 ESXHostPreparationforvShieldApp,Endpoint,andIsolation 15
InstalltheLicensesforvShieldEdge,vShieldApp,andvShieldEndpoint 15
InstallvShieldApp,vShieldEndpoint,andPortGroupIsolationServicesonanESXHost 15
GettheInstallationStatusofvShieldServicesonanESXHost 17
UninstallingvShieldServicesfromanESXHost 18
4 vNetworkPreparationandvShieldEdgeInstallation 19
EnablingPortGroupIsolation 19
EnablePortGroupIsolationonavDS 20
GetthePortGroupIsolationDebugStatisticsfromanESXHost 20
DisablePortGroupIsolationonavDS 20
InstallingavShieldEdge 21
GettheInstallParametersofavShieldEdge 22
UninstallavShieldEdge 22
5 vShieldEdgeManagement 23
UpgradingavShieldEdge 24
ForceavShieldEdgetoSynchronizewiththevShieldManager 24
ManageCLICredentialsonavShieldEdge 25
ManagingDHCP 25
GettheDHCPServerStatus 25
Start,Stop,orRestarttheDHCPService 25
PostaDHCPConfiguration 26
GettheConfigurationforAllDHCPHostsandPools 26
GetTimestampsofLast10DHCPConfigurations 27
GetaDHCPConfigurationbyTimestamp 27
vShield API Programming Guide
4 VMware, Inc.
ReverttoaDHCPConfigurationbyTimestamp 27
DeletetheDHCPConfigurationonavShieldEdge 27
ManagingNAT 28
ManagingSNATRules 28
ManagingDNATRules 30
ConfiguringthevShieldEdgeFirewall 33
GettheFirewallRuleSetforavShieldEdge 33
PostaFirewallRuleSet 34
GettheStatusoftheDefaultPolicyforavShieldEdge 35
Changethe
DefaultFirewallPolicyAction 35
GetDetailsofaSpecificFirewallRule 36
GetTimestampsofLast10FirewallRuleSetsforavShieldEdge 36
GetFirewallRuleSetbyTimestamp 36
ReverttoaFirewallRuleSetbyTimestamp 36
DeleteAllFirewallRulesonavShieldEdge 36
ConfiguringVPNs 37
GettheStatusofVPNService 38
Startor
StoptheVPNServiceonavShieldEdge 38
ConfigureVPNParametersonavShieldEdge 38
AddaRemoteSite 39
AddTunnelsforaVPNSite 40
GettheDetailedIPSecConfigurationsforaNetwork 40
GettheDetailedConfigurationforaVPNSite 41
GettheDetailedTunnelConfiguration 41
DeleteaTunnelforaVPNSite 41
Delete
aRemoteSite 41
GettheCurrentVPNConfigurationonavShieldEdge 41
GetTimestampsofLast10VPNConfigurations 42
GetaVPNConfigurationbyTimestamp 42
ReverttoaVPNConfigurationbyTimestamp 42
DeletetheVPNConfigurationonavShieldEdge 42
LoadBalancer 43
GettheStatusofLoadBalancerServiceonavShieldEdge 43
Startor
StoptheLoadBalancerServiceonavShieldEdge 44
AddaListenerforLoadBalancingService 44
GettheCurrentLoadBalancerConfigurationonavShieldEdge 45
GettheConfigurationofaSpecificLoadBalancingServer 45
GetTimestampsofLast10LoadBalancerConfigurations 45
GetaLoadBalancerConfigurationbyTimestamp 46
Reverttoa
LoadBalancerConfigurationbyTimestamp 46
DeletetheLoadBalancerConfigurationonavShieldEdge 46
ManagingtheMTUThresholdforavShieldEdge 46
ViewTrafficStatistics 47
DebugvShieldEdgeServicesUsingServiceStatistics 47
ManagingtheConnectiontoaSyslogServer 48
PostaSyslogServerConfiguration 48
GettheCurrentSyslogServerConfiguration 48
GetTimestampsofLast10
SyslogServerConfigurations 48
GetaSyslogServerConfigurationbyTimestamp 49
ReverttoaSyslogServerConfigurationbyTimestamp 49
DeletetheCurrentSyslogServerConfiguration 49
6 vShieldAppManagement 51
ConfiguringFirewallRulesforavCenterContainer 51
ViewAllFirewallRulesforaContainer 51
PostanAppFirewallRuleSetforaContainer 52
VMware, Inc. 5
ViewaListofTimestampsIdentifyingAppFirewallRuleSetChanges 55
ViewaPreviousFirewallRuleSetbyTimestamp 55
ReverttoaPreviousFirewallRuleSet 55
DeleteAllFirewallRulesunderaContainer 55
ManagingSecurityGroups 56
AddaSecurityGroup 56
AddaVirtualMachinetoaSecurityGroup 57
GettheListofAllSecurity
GroupsunderaBaseNode 57
GettheDetailsforaSingleSecurityGroupunderaBaseNode 58
GetIPAddressesfortheVirtualMachinesinaSecurityGroup 58
GetthePropertiesfromaVirtualMachine 58
DeleteaVirtualMachinefromaSecurityGroup 58
DeleteaSingleSecurityGroup 59
DeleteAllSecurityGroupsundera
BaseNode 59
ConfiguringSyslogServiceforavShieldApp 59
7 vShieldEndpointManagement 61
RegisteranSVMwiththevShieldEndpointServiceonanESXHost 61
RetrieveSVMSpecificNetworkInformation 62
RetrievevShieldEndpointServiceStatusonanESXHost 63
UninstallingthevShieldEndpointServicefromanESXHost 63
UnregisteranSVMfromvShieldEndpoint 63
UninstallvShieldEndpointfromthevShieldManager 64
ErrorSchema 64
Appendix 65
vShieldManagerSchemas 65
vShieldManagertovCenterServerSynchronizationSchema 65
DNSServiceSchema 66
VirtualMachineInformationSchema 66
SecurityGroupsSchema 67
ESXHostPreparationandUninstallationSchema 68
vShieldAppSchemas 69
vShieldAppConfigurationSchema 69
vShieldAppFirewallSchema 69
PortGroupIsolationManagementSchema 71
PortGroupIsolationStatisticsSchema 71
vShieldEdgeSchemas 71
BasevShieldEdgeConfigurationSchema 72
vShieldEdge
InstallationandUpgradeSchema 72
vShieldEdgeGlobalConfigurationSchema 73
vShieldEdgeCLILoginCredentialsSchema 74
vShieldEdgeFirewallSchema 74
NATSchema 77
DHCPSchema 79
VPNSchema 80
LoadBalancerSchema 83
MTUThresholdSchema 84
TrafficStatsSchema 85
SyslogSchema 85
ErrorMessageSchema 86
Index 87
VMware, Inc. 6
VMware, Inc. 7
Thismanual,thevShieldAPIProgrammingGuide,describeshowtoinstall,configure,monitor,andmaintainthe
VMware
®
vShield™systembyusingRESTAPIrequests.Theinformationincludesstepbystepconfiguration
instructionsandexamples.
Intended Audience
ThismanualisintendedforanyonewhowantstouseRESTAPItoinstallorusevShieldinaVMware
vCenter™environment.Theinformationinthismanualiswrittenforexperiencedsystemadministratorswho
arefamiliarwithvirtualmachinetechnologyandvirtualdatacenteroperations.Thismanualassumes
familiaritywithvShield.
VMware Technical Publications Glossary
VMwareTechnicalPublicationsprovidesaglossaryoftermsthatmightbeunfamiliartoyou.Fordefinitions
oftermsastheyareusedinVMwaretechnicaldocumentationgotohttp://www.vmware.com/support/pubs.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Ifyouhavecomments,sendyour
feedbacktodocfeedback@vmware.com.
vShield Documentation
ThefollowingdocumentscomprisethevShielddocumentationset:
vShieldAdministrationGuide
vShieldQuickStartGuide
vShieldAPIProgrammingGuide,thisguide
Technical Support and Education Resources
Thefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou.Toaccessthecurrentversion
ofthisbookandotherbooks,gotohttp://www.vmware.com/support/pubs.
Online and Telephone Support
Touseonlinesupporttosubmittechnicalsupportrequests,viewyourproductandcontractinformation,and
registeryourproducts,gotohttp://www.vmware.com/support.
Customerswithappropriatesupportcontractsshouldusetelephonesupportforthefastestresponseon
priority1issues.Gotohttp://www.vmware.com/support/phone_support.
About This Book
vShield API Programming Guide
8 VMware, Inc.
Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto
http://www.vmware.com/support/services.
VMware Professional Services
VMwareEducationServicescoursesofferextensivehandsonlabs,casestudyexamples,andcoursematerials
designedtobeusedasonthejobreferencetools.Coursesareavailableonsite,intheclassroom,andlive
online.Foronsitepilotprograms andimplementationbestpractices,VMwareConsultingServicesprovides
offeringsto helpyouassess,plan,
build,andmanageyourvirtualenvironment.Toaccessinformationabout
educationclasses,certificationprograms,andconsultingservices,gotohttp://www.vmware.com/services.
VMware, Inc. 9
1
VMware
®
vShield™isasuiteofnetworkedgeandapplicationawarefirewallsbuiltforVMwarevCenter™
Serverintegration.vShieldinspectsclientservercommunicationsandintervirtualmachinecommunication
toprovidedetailedtrafficanalyticsandapplicationawarefirewallprotection.vShieldisacriticalsecurity
componentforprotectingvirtualizeddatacentersfromattacksand
misusehelpingyouachieveyour
compliancemandatedgoals.
ThisguideassumesyouhaveadministratoraccesstotheentirevShieldsystem.Ifyouareunabletoaccessa
screenorperformaparticulartask,consultyourvShieldadministrator.
Thischapterincludesthefollowingtopics:
“vShieldComponents”onpage 9
“PortsRequiredforvShield”onpage 10
“A n IntroductiontoRESTAPIforvShieldUsers”onpage 10
vShield Components
vShieldincludescomponentsandservicesessentialforprotectingvirtualmachines.vShieldcanbeconfigured
throughawebbaseduserinterface,acommandlineinterface(CLI),andRESTAPI.
TorunvShield,youneedonevShieldManagervirtualmachineandatleastonevShieldZones,vShieldApp,
orvShieldEdgevirtualmachine.
vShield Manager
ThevShieldManageristhecentralizedmanagementcomponentofvShieldandisinstalledfromOVAasa
virtualmachinebyusingthevSphereClient.UsingthevShieldManageruserinterfaceorvSphereClient
plugin,administratorscaninstall,configure,andmaintainvShieldcomponents.
ThevShieldManagervirtualmachinecanrunon
adifferentESXhostfromyourvShieldAppandvShield
Edgevirtualmachines.
ThevShieldManageruserinterfaceleveragestheVMwareInfrastructureSDKtodisplayacopyofthevSphere
Clientinventorypanel.
FormoreontheusingthevShieldManageruserinterface,seethevShieldAdministrationGuide.
vShield App
AvShieldAppmonitorsalltrafficintoandoutofanESXhost,andbetweenvirtualmachinesonthehost.
vShieldAppprovidesapplicationawaretrafficanalysisandstatefulfirewallprotection.vShieldApp
regulatestrafficbasedonasetofrules,similartoanaccesscontrollist(ACL).
Overview of VMware vShield
1
vShield API Programming Guide
10 VMware, Inc.
AstrafficpassesthroughavShieldApp,eachsessionheaderisinspectedtocatalogthedata.ThevShieldApp
createsaprofileforeachvirtualmachinedetailingtheoperatingsystem,applications,andportsusedin
networkcommunication.Basedonthisinformation,thevShieldAppallowsephemeralportusageby
permittingdynamic
protocolssuchasFTPandRPCtopassthrough,whilemaintaininglockdownonports
1024andhigher.
YoucannotprotecttheServiceConsoleorVMkernelwithavShieldAppbecausethesecomponentsarenot
virtualmachines.
vShield Edge
AvShieldEdgeprovidesnetworkedgesecuritytoprotectthevirtualmachinesinavCloudtenant’snetwork
fromattacksoriginatingfromthepublicnetwork.ThevShieldEdgeconnectstheisolated,privatenetworksof
cloudtenantstothepublicsideoftheserviceprovidernetworkthroughcommonedgeservicessuchasDHCP,
VPN,NAT,andloadbalancing.
YouinstallavShieldEdgefromthevShieldManager.YoucaninstallonevShieldEdgeinstancepertenantport
grouponavNetworkDistributedSwitch(vDS).
YouconfigureavShieldEdgebyusingRESTAPI.
vShield Endpoint
vShieldEndpointdeliversanintrospectionbasedantivirussolution.vShieldEndpointusesthehypervisorto
scanguestvirtualmachinesfromtheoutsidewithoutabulkyagent.vShieldEndpointisefficientinavoiding
resourcebottleneckswhileoptimizingmemoryuse.
Ports Required for vShield
ThevShieldManagerrequiresports80/TCPand443/TCPforRESTAPIrequests.
An Introduction to REST API for vShield Users
REST,anacronymforRepresentationalStateTransfer,isatermthathasbeenwidelyemployedtodescribean
architecturalstylecharacteristicofprogramsthatrelyontheinherentpropertiesofhypermediatocreateand
modifythestateofanobjectthatisaccessibleataURL.
How REST Works
OnceaURLofsuchanobjectisknowntoaclient,theclientcanuseanHTTPGETrequesttodiscoverthe
propertiesoftheobject.ThesepropertiesaretypicallycommunicatedinastructureddocumentwithanHTTP
ContentTypeofXMLorJSON,thatprovidesarepresentationofthe
stateoftheobject.InaRESTfulworkflow,
documents(representationsofobjectstate)arepassedbackandforth(transferred)betweenaclientanda
servicewiththeexplicitassumptionthatneitherpartyneedknowanythingaboutanentityotherthanwhatis
presentedinasinglerequestorresponse.The
URLsatwhichthesedocumentsareavailableareoften“sticky,”
inthattheypersistbeyondthelifetimeoftherequestorresponsethatincludesthem.Theothercontentofthe
documentsisnominallyvaliduntiltheexpirationdatenotedintheHTTPExpiresheader.
VMware, Inc. 11
Chapter 1 Overview of VMware vShield
Using the vShield REST API
RESTAPIusesHTTPrequests(whichareoftenexecutedbyascriptorotherhigherlevellanguage)asaway
ofmakingwhatareessentiallyidempotentremoteprocedurecallsthatcreate,modify,ordeletetheobjects
definedbytheAPI.ThisRESTAPI(andothers)isdefinedbyacollectionof
XMLdocumentsthatrepresent
theobjectsonwhichtheAPIoperates.Theoperationsthemselves(HTTPrequests)aregenerictoallHTTP
clients.
TowriteaRESTfulclient,youneedtounderstandonlytheHTTPprotocolandthesemanticsofstandard
HTMLmarkup.TousethevShieldAPIeffectivelyinsucha
client,youneedtoknowthreethings:
thesetofobjectsthattheAPIsupports,andwhattheyrepresent(WhatisavDC?Howdoesitrelatetoan
Org?)
howtheAPIrepresentstheseobjects(WhatdoestheXMLschemaforthevShieldEdgefirewallruleset
looklike?Whatdotheindividualelementsandattributesrepresent?)
howtheclientreferstoanobjectonwhichitwantstooperate
Toanswerthesequestions,youneedtounderstandthevShieldAPIresourceschemas.Theseschemasdefine
anumberofXMLtypes,manyofwhichareextendedbyothertypes.TheXMLelementsdefinedinthese
schemas,alongwith
theirattributesandcompositionrules(minimumandmaximumnumberofelementsor
attributes,forexample,ortheprescribedhierarchywithwhichelementscanbenested)representthedata
structuresofvShieldobjects.Aclientcan“read”anobjectbymakinganHTTPGETrequesttotheobject’s
resourceURL.Aclient
can“write”(createormodify)anobjectwithanHTTPPUTorPOSTrequestthat
includesaneworchangedXMLbodydocumentfortheobject.Andaclientcanusuallydeleteanobjectwith
anHTTPDELETErequest.
Inthisdocument,wepresentexamplerequestsandresponses,andalsoprovide
referenceinformationonthe
XMLschemasthatdefinetherequestandresponsebodies.
RESTful Workflow Patterns
AllRESTfulworkflowsfallintoapatternthatincludesonlytwofundamentaloperations:
MakeanHTTPrequest(typicallyGET,PUT,POST,orDELETE).Thetargetofthisrequestiseithera
wellknownURL(suchasthevShieldManager)oralinkobtainedfromtheresponsetoaprevious
request.(Forexample,aGETrequesttoanOrgURLreturnslinkstovDCobjects
containedbytheOrg.)
Examinetheresponse,whichcanbeanXMLdocumentoranHTTPresponsecode.Iftheresponseisan
XMLdocument,itmaycontainlinksorotherinformationaboutthestateofanobject.Iftheresponseis
anHTTPresponsecode,itindicateswhethertherequestsucceededorfailed,and
maybeaccompanied
byaURLthatpointstoalocationfromwhichadditionalinformationcanberetrieved.
Thesetwooperationscanrepeat,inthisorder,foraslongasnecessary.
I
MPORTANTAllvShieldRESTrequestsrequireauthorization.Youcanusethefollowingbasicauthorization:
Authorization: Basic YWRtaW46ZGVmYXVsdA==
YWRtaW46ZGVmYXVsdA==representstheBase64encodingofthevShieldManagerdefaultlogincredentials
(admin:default).
vShield API Programming Guide
12 VMware, Inc.
For More Information About REST
ForacomprehensivediscussionofRESTfromboththeclientandserverperspectives,see:
Richardson,Leonard,andSamRuby.RESTfulWebServices.NorthMankato:OʹReillyMedia,Inc.,2007.
TherearealsomanysourcesofinformationaboutRESTontheWeb,including:
http://www.infoq.com/articles/restintroduction
http://www.infoq.com/articles/subbuallamarajurest
http://www.stucharlton.com/blog/archives/000141.html
VMware, Inc. 13
2
ThevShieldManagerrequirescommunicationwithyourvCenterServerandservicessuchasDNSandNTP
toprovidedetailsonyourVMwareInfrastructureinventory.
Thechapterincludesthefollowingtopics:
“SynchronizethevShieldManagerwithvCenterServerandDNS”onpage 13
“RetrievingTechSupportLogs”onpage 14
Synchronize the vShield Manager with vCenter Server and DNS
YoucanuseasinglerequesttosynchronizethevShieldManagerwiththevCenterServerandaddDNSservers
tothevShieldManagerforIPaddressandhostnameresolution.SynchronizingwithvCenterServerenables
thevShieldManageruserinterfacetodisplayyourVMwareInfrastructureinventory.
SynchronizationwithvCenterrequiresthevCenter
URLandlogincredentials.
Fortheschema,see“vShieldManagertovCenterServerSynchronizationSchema”onpage 65.
FortheDNSschema,see“DNSServiceSchema”onpage 66.
Example 2-1. Synchronizing the vShield Manager with vCenter Server and Identify DNS Services
Request:
POST <vshield_manager-uri>/api/1.0/global/config
YoucanalsosynchronizethevShieldManagerwiththevCenterServerwithoutspecifyingDNS.
Example 2-2. Synchronizing the vShield Manager with vCenter Server without DNS
Request:
POST <vshield_manager-uri>/api/1.0/global/vcInfo
vShield Manager Management
2
IMPORTANTAllvShieldRESTrequestsrequireauthorization.Youcanusethefollowingbasicauthorization:
Authorization: Basic YWRtaW46ZGVmYXVsdA==
YWRtaW46ZGVmYXVsdA==representstheBase64encodingofthevShieldManagerdefaultlogincredentials
(admin:default).
vShield API Programming Guide
14 VMware, Inc.
Retrieving Tech Support Logs
YoucanretrieveTechnicalSupportlogsfromthevShieldManagerandvShieldEdge.
Get the vShield Manager Technical Support Log File Path
YoucangetthepathtothediagnosticlogfileforthevShieldManager.Youcanthensendthediagnosticlogto
technicalsupportforassistanceintroubleshootinganissue.
Example 2-3. Getting the Tech Support Log File Path for a vShield Manager
Request:
GET <vshield_manager-uri>/api/1.0/global/techSupportLogs
Get the vShield Edge Technical Support Log File Path
YoucandownloadthediagnosticlogfromavShieldEdge.Youcanthensendthediagnosticlogtotechnical
supportforassistanceintroubleshootinganissue.
Example 2-4. Getting the Tech Support Log File Path for a vShield Edge
Request:
GET <vshield_manager-uri>/api/1.0/network/<internal-portgroup-vc-moref-id>/techSupportLogs
VMware, Inc. 15
3
YoucanextendthecapabilitiesofvShieldbyaddingthefollowingservices:vShieldApp,vShieldEndpoint,
andvShieldEdge.YoumustprepareeachESXhostinyourenvironmentfortheseservices.ThevShield
ManagerOVAfilecontainsthedriversandfilesnecessarytoinstallalladditionalservices.
Thischapterincludesthe
followingtopics:
“InstallvShieldApp,vShieldEndpoint,andPortGroupIsolationServicesonanESXHost”onpage 15
“GettheInstallationStatusofvShieldServicesonanESXHost”onpage 17
“UninstallingvShieldServicesfromanESXHost”onpage 18
Install the Licenses for vShield Edge, vShield App, and vShield
Endpoint
YoumustinstalllicensesforvShieldEdge,vShieldApp,andvShieldEndpointbeforeinstallingthese
components.YoucaninstalltheselicensesbyusingthevSphereClient.
1FromavSphereClienthostthatisconnectedtoavCenterServersystem,selectHome>Licensing.
2Forthereportview,selectAsset.
3Rightclick
avShieldassetandselectChangelicensekey.
4 SelectAssignanewlicensekeyandclickEnterKey.
5Enterthelicensekey,enteranoptionallabelforthekey,andclickOK.
6ClickOK.
7RepeatthesestepsforeachvShieldcomponentforwhichyouhavealicense.
Install vShield App, vShield Endpoint, and Port Group Isolation
Services on an ESX Host
Toshortenthetimetodeployment,youcaninstallvShieldApp,vShieldEndpoint,andPortGroupIsolation
servicesonanESXhostbyusingasingleRESTcall.YoucandothisbyincludingVszInstallParams,
PortgroupIsolationInstallParams,andEpsecInstallParams inthePOSTbody.
ESX Host Preparation for vShield
App, Endpoint, and Isolation
3
IMPORTANTAllvShieldRESTrequestsrequireauthorization.Youcanusethefollowingbasicauthorization:
Authorization: Basic YWRtaW46ZGVmYXVsdA==
YWRtaW46ZGVmYXVsdA==representstheBase64encodingofthevShieldManagerdefaultlogincredentials
(admin:default).
vShield API Programming Guide
16 VMware, Inc.
PortGroupIsolationisaserviceusedbyavShieldEdgetoisolatethevirtualmachinesinavDSportgroup
fromtheexternalnetwork.WhenPortGroupIsolationisenabled,trafficisnotallowedaccesstothevirtual
machinesintheprotectedportgroupunlessNATrulesorVLANtags
areconfigured.
YoumustspecifythehostIDofthetargetESXhosttoinstallallservices.
See“ESXHostPreparationandUninstallationSchema”onpage 68.
Example 3-1. Installing a vShield App, vShield Endpoint, and Port Group Isolation on an ESX Host
Request:
POST <vshield_manager-uri>/api/1.0/vshield/<host-id>
Example:
POST /api/1.0/vshield/host-5450 HTTP/1.1
Content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Cache-Control: no-cache
Pragma: no-cache
Host: 10.112.196.244
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 489
<VshieldConfiguration><VszInstallParams><DatastoreId>datastore-5035</DatastoreId>
<ManagementPortSwitchId>network-4485</ManagementPortSwitchId><MgmtInterface>
<IpAddress>10.112.196.245</IpAddress><NetworkMask>255.255.252.0</NetworkMask>
<DefaultGw>10.112.199.253</DefaultGw></MgmtInterface></VszInstallParams>
<PortgroupIsolationInstallParams><DatastoreId>datastore-5035</DatastoreId>
</PortgroupIsolationInstallParams><EpsecInstallParams>true</EpsecInstallParams>
<InstallAction>install</InstallAction></VshieldConfiguration>
ESXhostpreparationrequiresthefollowingelements:
DatastoreId:VCMOIDofthedatastoreonwhichthevShieldAppandPortGroupIsolationservice
virtualmachinefileswillbestored.
ManagementPortSwitchId:VCMOIDoftheportgroupthatwillhostthemanagementportofthe
vShieldApp.
MgmtInterface
IpAddress:IPaddresstobeassignedtothemanagementportofthevShieldApp.ThisIPaddress
mustbeabletocommunicatewiththevShieldManager.
NetworkMask:SubnetmaskassociatedwiththeIPaddressassignedtothemanagementinterfaceof
thevShieldApp.
DefaultGw:IPaddressofthedefaultgateway.
CAUTIONDonotinstallvShieldZones/AppontheESXhostwherevCenterServerisrunning.
NOTEPortGroupIsolationisanoptionalfeaturethatisnotrequiredforvShieldEdgeoperation.PortGroup
IsolationisavailableforvDSbasedvShieldEdgeinstallationsonly.
VMware, Inc. 17
Chapter 3 ESX Host Preparation for vShield App, Endpoint, and Isolation
Afterinstallationofallcomponentsiscomplete,dothefollowing:
vShieldApp:Atthispoint,vShieldAppinstallationiscomplete.EachvShieldAppinheritsglobal
firewallrulessetinthevShieldManager.Thedefaultfirewallrulesetallowsalltraffictopass.Youmust
configureblockingrulestoexplicitlyblocktraffic.ToconfigureAppFirewallrules,see“Configuring
FirewallRules
foravCenterContaineronpage 51.
PortGroupIsolation:YoumustenablethePortGroupIsolationfeatureoneachvDS.Afterenablement
iscomplete,installavShieldEdgeoneachportgroup.See“vNetworkPreparationandvShieldEdge
Installation”onpage 19.
vShieldEndpoint:Tocompleteinstallation,see“vShieldEndpointManagement”onpage 61.
YoucaninstallasingleservicebyidentifyingonlythatserviceinthePOSTbody.InExample 32,onlyvShield
Appisinstalled,asidentifiedbyinclusionoftheVszInstallParamselementonly.
Example 3-2. Installing a vShield App Only
Request:
POST <vshield_manager-uri>/api/1.0/vshield/<host-id>/vsz
Example:
POST /api/1.0/vshield/host-5126 HTTP/1.1
Content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Cache-Control: no-cache
Pragma: no-cache
Host: 10.112.196.244
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 368
<VshieldConfiguration><VszInstallParams><DatastoreId>datastore-5131</DatastoreId>
<ManagementPortSwitchId>network-5134</ManagementPortSwitchId><MgmtInterface>
<IpAddress>10.112.196.245</IpAddress><NetworkMask>255.255.252.0</NetworkMask>
<DefaultGw>10.112.199.253</DefaultGw></MgmtInterface></VszInstallParams>
<InstallAction>install</InstallAction></VshieldConfiguration>
Get the Installation Status of vShield Services on an ESX Host
YoucanretrievetheinstallationoruninstallationstatusofvShieldservicesonanESXhosttotrackprogressas
completeornotinitiated.Ifneitheroftheseoperationsisinprogress,theresponseincludesthelistofinstalled
servicesontheESXhost.
Example 3-3. Getting vShield Service Installation Status on an ESX Host
Request:
GET <vshield_manager-uri>/api/1.0/vshield/<host-id>
CAUTIONDonotinstallvShieldZones/AppontheESXhostwherevCenterServerisrunning.
vShield API Programming Guide
18 VMware, Inc.
Uninstalling vShield Services from an ESX Host
YoucanuninstallvShieldApp,vShieldEndpoint,andPortGroupIsolationfromanESXhostbyusingasingle
request.
Beforeuninstallingtheseservices,completethefollowingtasks:
vShieldEndpoint:YoumustunregisterSVMsbeforeuninstallingvShieldEndpointfromtheESXhost.See
“UnregisteranSVMfromvShieldEndpoint”onpage 63.
PortGroupIsolation:YoumustdisablePortGroupIsolationbeforeuninstallingtheservice.See“Disable
PortGroupIsolationonavDS”onpage 20.
Example 3-4. Uninstalling All Three vShield Services from an ESX Host
Request:
DELETE <vshield_manager-uri>/api/1.0/vshield/<host-id>
Touninstalltwoservicesatthesametime,separatetheservicestobeuninstalledwithhyphens.
Example 3-5. Uninstalling More than One Service
Request:
DELETE <vshield_manager-uri>/api/1.0/vshield/<host-id>/<hyphen-separated-service-names>
Example:
ThisrequestuninstallsavShieldApp(zones)andPortGroupIsolation(pgi).ThevShieldEndpointservice
isshortenedtoepsec.
DELETE /api/1.0/zones/vshield/<host-id>/vsz-pgi
Youcanuninstallasingleservicebyspecifyingtheservicename.
Example 3-6. Uninstall a vShield App Only
Request:
DELETE <vshield_manager-uri>/api/1.0/vshield/<host-id>/vsz
CAUTIONUninstallinganyofthesevShieldservicesplacestheESXhostinmaintenancemode.After
uninstallationiscomplete,theESXhostreboots.Ifanyofthevirtualmachinesthatarerunningonthetarget
ESXhostcannotbemigratedtoanotherESXhost,thesevirtualmachinesmustbepoweredoffor
migrated
manuallybeforetheuninstallationcancontinue.IfthevShieldManagerisonthesameESXhost,thevShield
ManagermustbemigratedpriortouninstallingthevShieldApp.
BeforeuninstallingPortGroupIsolation,disabletheserviceonthehostvDS.See“DisablePortGroupIsolation
onavDS”onpage 20.
VMware, Inc. 19
4
AfterESXhostpreparationiscomplete,youcansecureinternalnetworksbyinstallingavShieldEdge.Ifyou
areinstallingvShieldEdgeinstancesonvDSportgroups,youcanisolatethoseportgroupsbyenablingPort
GroupIsolationoneachvDS.
Thischapterincludesthefollowingtopics:
“EnablingPortGroupIsolation”onpage 19
“InstallingavShieldEdge”onpage 21
Enabling Port Group Isolation
PortGroupIsolationcreatesabarrierbetweenthevirtualmachinesprotectedbyavShieldEdgeandthe
externalnetwork.WhenyouenablePortGroupIsolationandinstallavShieldEdgeonavDSportgroup,you
isolateeachsecuredvDSportgroupfromtheexternalnetwork.WhenPortGroupIsolationis
enabled,traffic
isnotallowedaccesstothevirtualmachinesinthesecuredportgroupunlessNATrulesorVLANtagsare
configured
To enable Port Group Isolation on a vDS
1EnablePortGroupIsolationoneachvDS.
2InstallavShieldEdgeoneachvDSportgroupyouplantosecure.
3MovethevirtualmachinestosecuredvDSport
groups.
vNetwork Preparation and vShield
Edge Installation
4
IMPORTANTIfyouintendtousethePortGroupIsolationfeature,youshouldinstallPortGroupIsolationon
allESXhostsinyourvCenterenvironmentbeforeyouinstallanyvShieldEdgevirtualmachines.Ifyoudonot
installPortGroupIsolationandattempttoenablethefeatureduringvShieldEdgeinstallation,
PortGroup
Isolationdoesnotwork.See“InstallvShieldApp,vShieldEndpoint,andPortGroupIsolationServicesonan
ESXHost”onpage 15.
I
MPORTANTAllvShieldRESTrequestsrequireauthorization.Youcanusethefollowingbasicauthorization:
Authorization: Basic YWRtaW46ZGVmYXVsdA==
YWRtaW46ZGVmYXVsdA==representstheBase64encodingofthevShieldManagerdefaultlogincredentials
(admin:default).
NOTEPortGroupIsolationisanoptionalfeaturethatisnotrequiredforvShieldEdgeoperation.PortGroup
IsolationisavailableforvDSbasedvShieldEdgeinstallationsonly.
vShield API Programming Guide
20 VMware, Inc.
Enable Port Group Isolation on a vDS
AfterPortGroupIsolationisinstalledoneachESXhost,youmustenablePortGroupIsolationoneachvDS
whereyouwillinstallavShieldEdge.
Example 4-1. Enabling Port Group Isolation on a vDS
Request:
PUT <vshield_manager-uri>/api/1.0/network/portgroupIsolation/dvs/<dvs-Moid>
Example:
PUT /api/1.0/portgroupIsolation/dvs/dvs-1069 HTTP/1.1
Content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Cache-Control: no-cache
Pragma: no-cache
Host: 10.112.196.244
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Get the Port Group Isolation Debug Statistics from an ESX Host
YoucanretrievethestatisticsonPortGroupIsolationactivityfromanESXhostfordebugpurposes.
ThequeryreturnsXMLwiththepathofthelocationofthestatisticsfileonthevShieldManager.Thispathcan
beusedtodownloadthefileoverHTTP.
See“PortGroupIsolationStatistics
Schema”onpage 71.
Example 4-2. Getting the Port Group Isolation Debug Statistics from an ESX Host
Request:
GET <vshield_manager-uri>/api/1.0/network/portgroupIsolation/<host-Id>/statsLocation
Disable Port Group Isolation on a vDS
BeforeuninstallingPortGroupIsolation,disabletheserviceonthehostvDS.
Example 4-3. Disabling Port Group Isolation on a vDS
Request:
DELETE <vshield_manager-uri>/api/1.0/network/portgroupIsolation/dvs/<dvs-Moid>
Example:
DELETE /api/1.0/portgroupIsolation/dvs/dvs-1069 HTTP/1.1
Content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Cache-Control: no-cache
Pragma: no-cache
Host: 10.112.196.244
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90

VMware VSHIELD MANAGER 4.1.0 UPDATE 1 - API User guide

Category
Software
Type
User guide
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI