ウィンドウズのシステム保護

ドットネットフレームワークを使用してプログラムを作る場合に二つの保護技術があります。In order to authenticate and authorize users, the Windows OS provides Role-Based Security (RBS). However, in order to authenticate and authorize programs, the .NET framework includes Code Access Security (CAS). My concerns are: 1. how these differ 2. when to use one, the other, or both in order to secure your applications. 3. what API classes/methods to use in order to implement such security.

Classes Involved
CAS- CodeAccessPermission, SecurityAction, Evidence
RBS - PrincipalPermission, WindowsPrincipal, WindowsIdentity