All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.cofe.win.activex.SWbemSecurity Maven / Gradle / Ivy

package xyz.cofe.win.activex;

/**
 * The 
 *     SWbemSecurity
 *     
 *     object gets or sets security settings, such as privileges,
 * COM impersonations, and authentication levels assigned to an object.
 *
 * 

* The SWbemLocator, SWbemServices, SWbemObject, SWbemObjectSet, SWbemObjectPath, SWbemLastError, and SWbemEventSource * objects have a Security_ property, which is the SWbemSecurity object. * *

* When you retrieve an instance or view the WMI security log, you might need to set the properties of the Security_ object. * *

* The VBScript CreateObject call cannot create the Security object. * *

* The security settings in this object do not identify the authentication, impersonation, * or privilege settings on a connection to WMI, * or the security in effect for the proxy when an object is delivered to a sink in an asynchronous call. * *

* * Running with Special Privileges * *

* * Some functions require special privileges to run correctly. * In some cases, the function can only be run by certain users or by members of certain groups. * The most common requirement is that the user be a local administrator. * Other functions require the user's account to have specific privileges enabled. * *

* To reduce the possibility of unauthorized code being able to get control, * the system should run with the least privilege necessary. * Applications that need to call functions that require special * privileges can leave the system open to attack by hackers. * Such applications should be designed to run for short periods of time and should inform * the user of the security implications involved. * *

* For information about how to run as different users and how to * enable privileges in your application, see the following topics: * *

*/ public interface SWbemSecurity { /** * Numeric value that defines the COM Authentication level that is assigned to this object. This setting determines how you protect information sent from WMI. * *
    *
  • WbemAuthenticationLevelDefault 0 &H0 *
    WMI uses the default Windows Authentication setting. *
  • WbemAuthenticationLevelNone 1 &H1 *
    Uses no authentication. *
  • WbemAuthenticationLevelConnect 2 &H2 *
    Authenticates the credentials of the client only when the client establishes a relationship with the server. *
  • WbemAuthenticationLevelCall 3 &H3 *
    Authenticates only at the beginning of each call when the server receives the request. *
  • WbemAuthenticationLevelPkt 4 &H4 *
    Authenticates that all data received is from the expected client. *
  • WbemAuthenticationLevelPktIntegrity 5 &H5 *
    Authenticates and verifies that none of the data transferred between client and server has been modified. *
  • WbemAuthenticationLevelPktPrivacy 6 &H6 *
    Authenticates all previous impersonation levels and encrypts the argument value of each remote procedure call. *
* *
     * strComputer = "RemoteComputer"
     * Set objWMIServices = GetObject("WINMGMTS:" _
     *     & "{authenticationLevel=pktPrivacy}!\\" _
     *     & strComputer & "\ROOT\CIMV2")
     * 
* @return authentication level */ int getAuthenticationLevel(); /** * Numeric value that defines the COM Impersonation level * that is assigned to this object. * * This setting determines if processes owned by WMI can detect * or use your security credentials when making calls to other processes. * *
    *
  • 01 - Anonymous *
  • 02 - Identify *
  • 03 - Impersonate *
  • 04 - Delegate *
* @return impersonation level */ int getImpersonationLevel(); /** * object that defines privileges for this object. * @return privileges */ SWbemPrivilegeSet getPrivileges(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy