권한 부여 규칙은 VBScript 또는 JScript로 작성된 스크립트로서 사용자는 이 스크립트를 역할 정의 및 작업 정의에 포함할 수 있습니다. 권한 부여 규칙에 따라 역할이나 작업이 허용되는지 여부가 결정됩니다.

권한 부여 규칙을 사용하면 스크립트에서 테스트할 수 있는 모든 조건에 기초하여 권한 부여 결정을 내릴 수 있습니다. 이러한 조건에는 권한 및 사용 권한, 시간, 청구할 수 있는 비용 한도, 계정 잔액, 기타 조건 등이 포함될 수 있습니다.

권한 부여 관리자는 권한 부여 규칙을 작성하거나 디버깅하도록 디자인되지 않았습니다. 메모장 등의 텍스트 편집기, Visual Studio .NET과 같은 통합 개발 환경 또는 사용자가 선택한 다른 응용 프로그램으로 스크립트를 작성할 수 있습니다. 권한 부여 규칙은 일반적으로 전문 개발자가 작성합니다.

권한 부여 규칙을 만드는 방법과 권한 부여 관리자 API(응용 프로그래밍 인터페이스)를 사용하는 방법에 대한 자세한 내용은 권한 부여 관리자 모델(페이지는 영문일 수 있음)(https://go.microsoft.com/fwlink/?linkid=64027)을 참조하십시오. 추천 링크를 더 보려면 권한 부여 관리자에 대한 리소스를 참조하십시오.

비즈니스 규칙 및 권한 부여 규칙의 사용 제어

각 클라이언트의 사용 제어

Windows Server 2008부터 비즈니스 규칙과 권한 부여 규칙의 사용을 레지스트리 설정으로 제어할 수 있습니다. 기본적으로 규칙은 사용되지 않습니다. 이전 버전의 Windows에서는 이 기능이 지원되지 않았습니다.

일반적으로 운영 체제에서 실행하는 설치 프로그램이나 스크립트를 사용하여 사용자 환경에서 사용 중인 권한 부여 규칙과 비즈니스 규칙을 활성화합니다.

중요

이 설정은 각 클라이언트의 각 권한 부여 관리자 응용 프로그램에 대해 개별적으로 제어됩니다.

다음은 응용 프로그램에 대한 비즈니스 규칙과 응용 프로그램 규칙을 활성하거나 비활성화하는 샘플 스크립트입니다.

'

' Enabling or disabling BizRules for an application

' This script uses Authorization Manager Administrative interfaces to enable or disable

' BizRules for a specified Authorization Manager application in a specified Authorization Manager policy store

On Error Resume Next

Set objArgs = WScript.Arguments

If objArgs.count <> 3 then

wscript.echo "Usage: SetBizRule ""AzManStoreURL"" ""AzApplicaitonName"" True/False"

wscript.echo "Example: SetBizRule ""msxml://d:\inetpub\wwwroot\AzStore.xml"" ""MyApp"" True"

wscript.echo "Run with 'cscript' command in cmd.exe to avoid msg boxes"

Else

' VBScript source code

Dim AzStoreObj

Dim AzManStoreURL : AzManStoreURL = objArgs(0)

Dim AzManAppName : AzManAppName = objArgs(1)

Dim BizRulesEnabled : BizRulesEnabled = objArgs(2)

' create azman object

Set AzStoreObj = CreateObject("AzRoles.AzAuthorizationStore")

If Err.Number > 0 Then

WScript.Echo "Can not create AzRoles.AzAuthorizationStore. Check Authorization Manager installation"

WScript.Quit

End If

' initialize store for Administration

' assumes store exists - if store is being created (e.g. an installing applicaion)

' use the value 3 instead of 2 in the call to IAzAuthorizationStore::initialize

Err.Clear

AzStoreObj.Initialize 2, AzManStoreURL

If Err.Number <> 0 Then

WScript.Echo "AzRoles.AzAuthorizationStore failed to initialize. Check store URL"

WScript.Quit

End If

' open applicaion

set AzApp = AzStoreObj.OpenApplication(AzManAppName)

If Err.Number <> 0 Then

WScript.Echo "AzRoles.AzAuthorizationStore failed to open application: " + AzManAppName + ". Check application Name."

WScript.Quit

End If

' set BizRulesEnabled property

WSCript.Echo "App BizRule Before:" & AzApp.BizRulesEnabled

AzApp.BizRulesEnabled = BizRulesEnabled

WSCript.Echo "App BizRule After:" & AzApp.BizRulesEnabled

If Err.Number = 0 Then

WScript.Echo "BizRulesEnabled is updated successfully."

Else

WScript.Echo "BizRulesEnabled is NOT updated successfully."

End If

End if

전체 권한 부여 저장소에 대한 사용 제어

권한 부여 저장소 속성 시트의 제한 탭에서 권한 부여 규칙 제한을 구성하여 다음을 수행할 수 있습니다.

  • 저장소에 대해 권한 부여 규칙과 비즈니스 규칙을 비활성화합니다.

  • 시간 제한 값을 설정하여 스크립트 실행을 허용할 최대 시간을 제한합니다.

  • 시간 제한 없이 스크립트가 실행되도록 허용합니다.

자세한 내용은 권한 부여 관리자 저장소 제한 이해를 참조하십시오.

VBScript 예제

다음은 항상 사용 권한을 부여하는 VBScript 권한 부여 규칙입니다.

AzBizRuleContext.BusinessRuleResult = True

VBScript에 대한 자세한 내용은 VBScript(페이지는 영문일 수 있음)(https://go.microsoft.com/fwlink/?linkid=65964)를 참조하십시오.

JScript 예제

다음은 항상 사용 권한을 부여하는 JScript 권한 부여 규칙입니다.

AzBizRuleContext.BusinessRuleResult = true;

JScript에 대한 자세한 내용은 JScript(페이지는 영문일 수 있음)(https://go.microsoft.com/fwlink/?linkid=65963)를 참조하십시오.


목차