WSMAN_PLUGIN_AUTHORIZE_OPERATION callback function (wsman.h)

Authorizes a specific operation.

The DLL entry point name for this method must be WSManPluginAuthzOperation.

Syntax

WSMAN_PLUGIN_AUTHORIZE_OPERATION WsmanPluginAuthorizeOperation;

void WsmanPluginAuthorizeOperation(
  PVOID pluginContext,
  WSMAN_SENDER_DETAILS *senderDetails,
  DWORD flags,
  DWORD operation,
  PCWSTR action,
  PCWSTR resourceUri
)
{...}

Parameters

pluginContext

Specifies the context that was returned by a call to WSManPluginStartup. This parameter represents a specific application initialization of a WinRM plug-in.

senderDetails

A pointer to the WSMAN_SENDER_DETAILS structure that specifies the identification information of the user.

flags

Reserved for future use. Must be set to zero.

operation

Represents the operation that is being performed. This parameter can be one of the following values:

Get

WSManOperationGet

Put

WSManOperationPut

Create

WSManOperationCreate

Delete

WSManOperationDelete

Enumerate

WSManOperationEnumerate

Subscribe

WSManOperationSubscribe

Shell

WSManOperationShell

Command

WSManOperationCommand

Invoke

WSManOperationInvoke

action

Specifies the action of the request received. This parameter can be one of the following values:

Get

http://schemas.xmlsoap.org/ws/2004/09/transfer/Get

Put

http://schemas.xmlsoap.org/ws/2004/09/transfer/Put

Create

http://schemas.xmlsoap.org/ws/2004/09/transfer/Create

Note  Shell creation will appear as Create.
 

Delete

http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete

Enumerate

http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate

Subscribe

http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe

Command

http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command

Invoke

This operation will have a custom string.

resourceUri

Specifies the resource URI of the inbound operation.

Return value

None

Remarks

The plug-in must call WSManPluginAuthzOperationComplete to report either that the user was successfully authorized to perform the operation with NO_ERROR or that the user was not authorized with ERROR_ACCESS_DENIED. All other errors report a failure to the client, but no specific information is reported.

Requirements

   
Minimum supported client Windows 7
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header wsman.h
Redistributable Windows Management Framework on Windows Server 2008 with SP2, Windows Vista with SP1, and Windows Vista with SP2