Runtime access control in C
Krisztián Pócza, Mihály Biczó, Zoltán Porkoláb · 2007
Compile time or runtime visibility and access contr ol checking is the key part of modern languages and runtime environments. They enforce responsibility separation, implementation and security policies. The Eiffel pr ogramming language defines sophisticated selective access control, but most mo dern programming languages like C++, C# and Java do not have this feature only a su bset or combination of the following access modifiers: public, private, protected, inter nal and friend. The .NET Framework enforces some security policies in runtime called C ode Access Security but this additional mechanism is capable only to restrict external reso urce access for programs written in any .NET-language like C#. In this paper we describe the existing access contr ol features of the C# language then show a scenario where a more sophisticated acc ess control is required. We introduce a method level access control checking mechanism to C# which is able to enforce Eiffellike selective export in runtime. Our implementatio n does not require the modification of the compiler and the caller, only the callee, and i ntroduces minimal syntactic overhead. It can be a practical solution for modular systems whe re runtime security is important.