Table of Contents

Interface ISecurityStoreFeature

The base interface for features that update security stores.

public interface ISecurityStoreFeature : IFeature
Inherited Members

Remarks

This feature can not be obtained directly as it is part of ISecurityControl and ISystemAuthenticationControl.

Methods

UpdateStoreAsync(string)

Sends a command script to the server to update the security store.

Task<object> UpdateStoreAsync(string commandScript)

Parameters

commandScript string

The command script to send to the server.

Returns

Task<object>

The Task representing the current operation.

Remarks

If the operation completes successfully, the Task result will be null. The return value of this operation is Task{Object} rather than Task to provide better forward compatibility with future iterations of this API that may provide a non-null result with a more specific type.

The script may be generated using a IScriptBuilder obtained from the feature.

Each line of commandScript is a command to update the store.

The server attempts to execute each command in order against a copy of the store. If any command fails, none of the changes will be applied. If all commands succeed, the changes will be applied.

If the server is configured for topic replication, then the changes will be replicated to all members of the cluster.

This method is the same as calling UpdateStoreAsync(string, CancellationToken) with System.Threading.CancellationToken.None.

Exceptions

ArgumentNullException

The commandScript is null.

CommandScriptException

The given commandScript is invalid. Thrown by the returned Task.

SessionSecurityException

The calling session does not have MODIFY_SECURITY permission. Thrown by the returned Task.

ClusterRoutingException

A transient cluster error occured. Thrown by the returned Task.

SessionClosedException

The calling session is closed. Thrown by the returned Task.

UpdateStoreAsync(string, CancellationToken)

Sends a command script to the server to update the security store.

Task<object> UpdateStoreAsync(string commandScript, CancellationToken cancellationToken)

Parameters

commandScript string

The command script to send to the server.

cancellationToken CancellationToken

The cancellation token used to cancel the current operation.

Returns

Task<object>

The Task representing the current operation.

Remarks

If the operation completes successfully, the Task result will be null. The return value of this operation is Task{Object} rather than Task to provide better forward compatibility with future iterations of this API that may provide a non-null result with a more specific type.

The script may be generated using a IScriptBuilder obtained from the feature.

Each line of commandScript is a command to update the store.

The server attempts to execute each command in order against a copy of the store. If any command fails, none of the changes will be applied. If all commands succeed, the changes will be applied.

Exceptions

ArgumentNullException

The commandScript is null.

CommandScriptException

The given commandScript is invalid. Thrown by the returned Task.

SessionSecurityException

The calling session does not have MODIFY_SECURITY permission. Thrown by the returned Task.

ClusterRoutingException

A transient cluster error occured. Thrown by the returned Task.

SessionClosedException

The calling session is closed. Thrown by the returned Task.