IAuthorizationExtension.CreateSecurityDescriptor メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
レポートサーバーデータベース内の個別アイテムに保存されているセキュリティディスクリプタを返します。
public:
cli::array <System::Byte> ^ CreateSecurityDescriptor(Microsoft::ReportingServices::Interfaces::AceCollection ^ acl, Microsoft::ReportingServices::Interfaces::SecurityItemType itemType, [Runtime::InteropServices::Out] System::String ^ % stringSecDesc);
public byte[] CreateSecurityDescriptor(Microsoft.ReportingServices.Interfaces.AceCollection acl, Microsoft.ReportingServices.Interfaces.SecurityItemType itemType, out string stringSecDesc);
abstract member CreateSecurityDescriptor : Microsoft.ReportingServices.Interfaces.AceCollection * Microsoft.ReportingServices.Interfaces.SecurityItemType * string -> byte[]
Public Function CreateSecurityDescriptor (acl As AceCollection, itemType As SecurityItemType, ByRef stringSecDesc As String) As Byte()
パラメーター
- acl
- AceCollection
レポートサーバーがアイテムのために作成するアクセスコードリスト。 アクセスコードのエントリーのコレクションが含まれています。
- itemType
- SecurityItemType
セキュリティディスクリプタが作成されるアイテムの種類。
- stringSecDesc
- String
Optional. デバッグに使えるセキュリティ記述子の使いやすい説明です。 これはレポートサーバーに保存されません。
返品
シリアライズされたアクセスコードリスト。
例
以下の例では、レポートサーバーデータベース内のアイテムのアクセスコードリストをシリアライズするために CreateSecurityDescriptor メソッドを用いています。 この方法を使って、追加のセキュリティや認証情報をセキュリティディスクリプタの一部としてシリアライズできます。
Public Function CreateSecurityDescriptor(acl As AceCollection, itemType As SecurityItemType, ByRef stringSecDesc As String) As Byte()
' Creates a memory stream and serializes the ACL for storage.
Dim bf As New BinaryFormatter()
Dim result As New MemoryStream()
bf.Serialize(result, acl)
stringSecDesc = Nothing
Return result.GetBuffer()
End Function 'CreateSecurityDescriptor
public byte[] CreateSecurityDescriptor(AceCollection acl, SecurityItemType itemType, out string stringSecDesc)
{
// Creates a memory stream and serializes the ACL for storage.
BinaryFormatter bf = new BinaryFormatter();
MemoryStream result = new MemoryStream();
bf.Serialize(result, acl);
stringSecDesc = null;
return result.GetBuffer();
}
注釈
このメソッドを実装して、レポートサーバーデータベース内のアイテムに適用されるアクセスコードリストをシリアライズします。
セキュリティ記述子は以下の内容を記述します。
その項目に対して操作を行う権限を持つグループやユーザー。
アイテムの種類。
品物へのアクセスを制御する裁量的なアクセスコントロールリスト。
セキュリティディスクリプタを使ってアイテムとそのプロパティへのアクセスを制御できます。 SQL Server Reporting Servicesのセキュリティ記述子を使うことで、以下が可能です:
受託者に物品とその財産へのアクセス権を付与します。
受託者名はプリンシパル名またはユーザーIDで特定します。
ディスクリプタをプログラム的に設定、取得、修正します。
各アイテムのセキュリティディスクリプタは CreateSecurityDescriptor メソッドへの呼び出しによって作成され、レポートサーバーを通じた CheckAccess 呼び出しによってアクセスされます。 このプロパティは、シリアル化されたバイト配列内のアイテムのディスクリプタです。 ディスクリプタは物理的にレポートサーバーデータベースに保存されており、内部的にはアクセス制御エントリの集合に基づいています。 アイテムのアクセスチェックを要求すると、そのバイト配列はデータベースから取得され、 CheckAccess メソッドに引数として渡されます。 このプロパティをアイテムに設定すると、 AceCollection が渡され、そのアイテムのバイナリディスクリプタを作成する必要があります。