Secureuml: A Uml-Based Modeling Language For Model-Driven Security
Secureuml: A Uml-Based Modeling Language For Model-Driven Security
Model-Driven Security?
1 Introduction
Security plays a central role in the development and functioning of many large-scale
distributed software systems, like those for electronic commerce. However, an analy-
sis of todays software development processes reveals that the careful engineering of
security into the overall system design is often neglected. Security features are typi-
cally built into an application in an ad-hoc manner or are only integrated later during
the system administration phase. There are several reasons for this. First, security is a
horizontal aspect of software development that affects nearly every component of an
application and its integration into the software development process is not well un-
derstood. Second, there is a lack of tools supporting security engineering. Third, the
integration of security into a system by hand is difficult and errors often arise due to
the lack of experience of the individual developers. These developers are generally not
security experts and they need concrete guidelines for constructing secure applications.
Overall, the post-hoc, low-level integration of security has a negative impact on the
quality of resulting applications.
We present a methodology for modeling access control policies and their integra-
tion into a model-driven software development process and show how this method-
ology can help avoid the kinds of problems mentioned above. Our methodology is
based on SecureUML, a modeling language designed to integrate information relevant
to access control into application models defined with the Unified Modeling Language
(UML) [9].
? This work has been supported by the German "Bundesministerium fr Wirtschaft und Tech-
nologie" under the reference number IT-MM-01MS107. The authors are responsible for the
content of this publication.
The integration of security engineering into a model-driven software development
approach has the following advantages. To begin with, security requirements can be
formulated and integrated into system designs at a high level of abstraction. In this way,
it becomes possible to develop security aware applications that are designed with the
goal of preventing violations of a security policy. For example, a database query can
be designed so that users can only retrieve those data records that they are allowed
to access. Furthermore, the model information can be used to detect and to correct
design errors or to verify the correctness of the mapping between requirements and
their realization in a design. Moreover, access control infrastructures can be generated
from SecureUML models and thereby prevent errors during the realization of access
control policies and enable the technology independent development of secure systems.
The work described here is part of ongoing research to develop a complete model-
driven approach for developing secure e-commerce systems. While SecureUML cur-
rently focuses on access control, future research will extend the scope of the language
to cover other security aspects, like digital signatures.
A prerequisite for the approach taken here is the existence of a modeling language
with an extensible syntax, a sufficiently precise semantics, and CASE tool support.
UML fulfills these requirements. We show how a modeling language for specifying
access control policies can be defined as an extension of UML. Because of its visual
notation and the possibility to define designs at a high abstraction level, UML is well
suited for designing secure systems. Therefore, SecureUML enables even developers
without a strong security background to develop secure systems.
Our language is based on an extended model for role-based access control (RBAC).
RBAC is a well-established access control model with widely-recognized advantages,
e.g. as explained in [10], and it is supported by a large number of software platforms.
However, RBAC lacks, in general, support for expressing access control conditions that
refer to the state of a system, e.g. the state of a protected resource, parameter values, date
or time. To cover such cases, we introduce the concept of authorization constraints. An
authorization constraint is a precondition for granting access to an operation. We define
such constraints using the Object Constraint Language (OCL).
SecureUML offers significant design flexibility because it combines the simplic-
ity of a graphical notation for RBAC with the power of logical constraints on models.
Simple policies can be expressed using role-based permissions and more complicated
requirements can be specified by adding authorization constraints. The resulting com-
bination is quite powerful; for example, it is possible to base access decisions on dy-
namically changing data like time or to support concepts like object ownership.
As a proof of concept we have implemented a prototypical generator for the compo-
nent architecture Enterprise JavaBeans (EJB) [11]. Our prototype demonstrates that it
is possible to generate security infrastructures for access control based on SecureUML
models, including role definitions, method permissions, user-role assignments and au-
thorization constraint implementations.
We proceed as follows: In Section 2, we explain the foundations of our work. This
includes the underlying access control model RBAC, the component architecture EJB,
the Unified Modeling Language and an introduction to the concept of model-driven
software development. We give an overview of SecureUML in Section 3 and explain
our metamodel and notation in Sections 4 and 5. In Section 6, we draw conclusions and
discuss related and future work.
2 Background
We use role-based access control (RBAC) as the underlying security model of our mod-
eling language. RBAC is a model for access control where users and their privileges
are decoupled by roles. This decoupling is not only conceptually useful, it also leads to
significantly compacter access control policy descriptions.
(RH)
Role Hierarchy
(UA) (PA)
User Permission PRMS
Assignment Assignment
USERS ROLES OPS OBS
Figure 1 shows the data model we use as foundation of our modeling language. It
is based on the standard for RBAC as proposed in [4]. The model consists of five data
types: users (USERS), roles (ROLES), objects (OBS), operations (OPS) and permis-
sions (PRMS). A user1 is defined as a person or a software agent. A role is a job or
function within an organization. It combines all privileges needed to fulfill the respec-
tive job or function. Privileges are expressed in terms of the permissions assigned to
a role by entries to the relation Permission Assignment. A permission represents the
authorization to execute an operation on one or more protected objects or resources. An
object in this context is a system resource or a set of resources that are protected by the
security mechanism. An operation is an action on a protected object that can be initiated
by a system entity. The types of operations depend on the type of the protected objects.
In a file system, for example, there might be permissions to read, write or execute files.
The assignment of roles to users is defined by the relation User Assignment. The re-
lation Role Hierarchy defines an inheritance relationship between roles. A relation r1
inherits r2 implies that all permissions of role r2 are also permissions of role r1.
RBAC is well suited as a foundation for the modeling of access control for several
reasons. The concept of role-based permissions is close to the domain vocabulary used
to define security in organizations. Therefore, it can ease the expression of requirements
relevant for access control during analysis as well as promote their realization in the de-
sign. Roles can be used to decouple the design of the application access control policy
1
To simplify the presentation, we omit a comprehensive model of users and groups.
and its administration. This opens the possibility of developing application access con-
trol policies in the context of a model-driven process. Finally, note that many modern
software platforms support the RBAC model. Thus, it will be possible to directly gener-
ate access control infrastructures for these platforms from application models expressed
with SecureUML.
As illustrated by this example, such permissions are defined at the level of particular
methods. In general, for realistic applications the information needed to specify a com-
prehensive access control policy is quite voluminous. Therefore, there is the inherent
danger of inadmissible simplifications due to oversights or shortcuts taken by develop-
ers. Suppose a security policy grants a role the permission to access some methods of
an EJB. A correct realization would be to define one method-permission element with
one method element for each of these methods. To save time, a developer might define
just one method permission granting the role full access to all methods of the EJB. This
is likely to cause security holes as well as inconsistencies between a security policy and
its realization. We see the modeling of security policies at a higher abstraction level and
the automatic generation of the corresponding deployment descriptors as a promising
solution to this problem.
In addition to declarative access control, EJB offers the possibility of implementing
access control decisions within the business logic of components. This mechanism is
called programmatic access control.
2.3 Unified Modeling Language
We use the Unified Modeling Language (UML) as the foundation of our work for sev-
eral reasons: UML is the de-facto standard for object-oriented modeling. Many model-
ing tools support UML and a great number of developers are familiar with the language.
Hence, our work enables these users to develop access control policies using an intu-
itive, graphical notation.
UML offers the possibility of extending the modeling language using well-defined
extensibility constructs that are packaged in a so-called UML Profile. In our work, we
use stereotypes to define new types of model elements and tagged values to introduce
additional attributes on metamodel types. UML also provides a metamodel and a logical
language, the Object Constraint Language (OCL), to define constraints on model ele-
ments. The SecureUML metamodel defines authorization constraints as a special kind
of UML constraint and uses OCL as the expression language. In this way, we are able
to utilize existing tools and concepts for the definition and analysis of constraints in the
context of access control.
3 SecureUML Overview
In this section we give an overview of the goals and the structure of SecureUML. We
explain the metamodel and the notation in detail in Sections 4 and 5.
SecureUML is a modeling language that defines a vocabulary for annotating UML-
based models with information relevant to access control. It is based on the model for
RBAC as defined in Section 2.1, with additional support for specifying authorization
constraints. SecureUML defines a vocabulary for expressing different aspects of ac-
cess control, like roles, role permissions and user-role assignments. Due to its general
access-control model and extensibility, SecureUML is well suited for business analysis
as well as design models for different technologies. Our goal is to use this language as
part of another modeling language, called the host language, to cover access control
aspects. In this way, different models at different abstraction levels can be annotated
with access control information using the same syntax and a compatible semantics.
The structure of the modeling language conforms to the reference model for model-
driven systems defined in Section 2.4. The metamodel defines the abstract syntax of the
language, i.e. the structure of a model representation that is independent of particular
notation. Our notation used to enrich class models in UML is defined as a UML Profile.
To begin with, the semantics of the language is defined using informal transfor-
mation rules referring to the standard model given in Section 2.4, e.g. a role in the
model is transformed to a single entry of the set ROLES. The usage of the standard
model for RBAC enables us to give SecureUML a general semantics independent of
any particular technology. Afterwards, when the language is included into a host lan-
guage, the semantics is refined. In our work, refinement means that the specification
of the language semantics is made more precise and is adapted to the vocabulary used
by the security platform of the host language, e.g. a role in the model is transformed
to a single deployment descriptor element of type security-role. Informal, imperative,
or declarative techniques could be used for the refinement. The resulting language is
called a SecureUML dialect.
Suppose, for example, we want to use SecureUML to annotate platform dependent
design models used to generate executable systems. In this case, the semantics can
be refined by using imperative generation rules that define the transformation of the
syntactical elements of the model to constructs of the target platform. In this context,
it is also possible to parameterize the language to meet the needs for the particular
environment using a so-called resource type model (see below).
4 SecureUML Metamodel
AuthorizationConstraint
Inheritance /
+constrainedElement
<<secuml.actionType>> <<secuml.actionType>>
create read
<<secuml.actionType>> <<secuml.actionType>>
update delete
The resource type model is included in every design model defined with the EJB
language. In this way, action types can directly be referenced by any permission in the
model.
<<ejb>>
UserCalendarPerm Calendar
- actiontype : change <<secuml.resourceView>> + name : string
CalendarView <<secuml.context>>
+ name : string + createEntry()
+ updateEntry()
+ removeEntry()
<<secuml.permission>> + findAllEntries()
<<secuml.constraint>> EntryOwnerPerm
Ownership 0..*
- actiontype : update
{call.current().principal.name
= owner} <<ejb>>
Entry
+ Location : string
<<secuml.role>> <<secuml.permission>> + Start : date <<secuml.constraint>>
User + End : date BusinessHoursOnly
{time.currentHour() > 8 and
+ Owner : string
time.currentHour() < 17}
<<secuml.permission>>
+ getEntryInfo()
+ setEntryInfo()
UserEntryPerm
- actiontype : read
<<secuml.role>> <<secuml.permission>>
SuperUser
SuperUserPerm
- actiontype : update
- actiontype1 : delete
A role is represented by a UML class with the stereotype secuml.role. In our example,
the two roles User and SuperUser are modeled. In the projection to EJB, each role
model element is transformed to a role definition in the deployment descriptor as shown
in the following example code:
<security-role>
<role-name>User</role-name>
</security-role>
5.4 Permissions
(permE xpr1 or ::: or permE xprn ) and
onstrE xpr1 and ::: and
onstrE xprn
That is, all permission expressions are disjunctively combined. The resulting term is
conjoined with all class bound authorization constraints affecting the particular method.
The following example shows the complete access control precondition for the method
Entry::setEntryInfo that is affected by the permissions EntryOwnerPerm,
SuperUserPerm and the authorization constraint BusinessHoursOnly.
context Entry::setEntryInfo(EntryInfo):void
pre: (call.current().principal.isInRole("SuperUser") or
(call.current().principal.isInRole("User") and
call.current().principal.name = owner) and
(time.currentHour() > 8 and time.currentHour() < 17)
5.6 User-Role-Assignments
Fig. 6. User-Role-Assignment
Users are represented as classes with the stereotype secuml.user as shown in Fig-
ure 6. The assignment of a role to a user is defined using a dependency relationship with
the stereotype secuml.roleAssignment. Note that the EJB specification [11] does not
prescribe a standard format for assigning roles to users; therefore each EJB product
uses a proprietary syntax. Below, we give an example for the product BEA WebLogic
Server [1].
<security-role-assignment>
<role-name>User</role-name>
<principal-name>Smith</principal-name>
</security-role-assignment>
6 Conclusion
6.1 Discussion
We have presented SecureUML, a modeling language designed for integrating the spec-
ification of access control into application models. The language builds on the access
control model of RBAC with additional support for specifying authorization constraints.
We have shown how SecureUML can be used in the context of a model-driven software
development process to generate access control infrastructures. In this way, productivity
during the development and the quality of the resulting systems can be improved.
We have validated the concepts presented in this paper using a prototypical gener-
ator for EJB. With this prototype, it is possible to generate EJB applications with full
configured role-based access control, including role definitions, method permissions,
user-role assignments and authorization constraints. We used ArcStylerTM as a tool for
modeling and generation, which is an MDA compliant development environment for
component-based systems based on Rational RoseTM . We used the template-based gen-
erator of ArcStyler TM (see [5]) to implement our generation rules.
With our prototype, we developed case studies for a banking and a scheduling appli-
cation and the latter is used as example in this paper. Our experiments have shown the
feasability of expressing access control policies with UML in a manner that is concise
and precise. The information necessary to realize such a policy in an EJB infrastruc-
ture is at a lower level of abstraction and thus significantly more detailed. For example,
the generated access control policy for the scheduling application consists of about 220
lines of deployment descriptor source and 50 lines of Java code.
In particular, the concept of action types contributes to the problem solution. Per-
missions can be expressed in an intuitive vocabulary, like a role is granted read access
to a component. Furthermore, permissions are adapted dynamically to changes of the
object model due to the filter effect of action types. This reduces, in comparison to ex-
plicit sets like resource views, the possibility of inconsistencies between the application
model and the access control policy model.
We want to emphasize that due to its general access control model, SecureUML is
well suited for defining access control policies for every security architecture support-
ing role-based or programmatic access control. The language is adapted to a particular
security architecture by defining a corresponding resource type model that identifies
the model element types representing protected resource for this architecture and its
actions relevant to access control. Based on the resource type model, the semantics of
the language is refined in terms of the target architecture. In this paper we have shown
this approach on the example of the EJB security architecture.
Our work also shows that OCL is well suited for formalizing authorization con-
straints. OCL expressions can refer to all application model types and allow consider-
able flexibility in defining constraints. Since OCL is a first-order language, constraints
can be incorporated into a formal analysis of UML models (see [2]).
References
1. BEA Systems, Inc. Programming WebLogic Enterprise JavaBeans, 2002. http://
e-docs.bea.com/wls/docs61/pdf/ejb.pdf.
2. A. D. Brucker and B. Wolff. A Proposal for a Formal OCL Semantics in Isabelle/HOL. In
C. Muoz, S. Tahar, and V. Carreo, editors, TPHOLs 2002, LNCS. Springer-Verlag, 2002.
3. P. Epstein and R. Sandhu. Towards a UML based approach to role engineering. In Proceed-
ings of the fourth ACM workshop on Role-based access control, pages 135143. ACM Press,
1999.
4. D. F. Ferraiolo, R. Sandhu, S. Gavrila, D. R. Kuhn, and R. Chandramouli. Proposed NIST
standard for role-based access control. ACM Transactions on Information and System Secu-
rity (TISSEC), 4(3):224274, 2001.
5. Interactive Objects Software GmbH. ArcStyler Extensibility Guide, 2002. http://www.
io-software.com/as_support/docu/extensibility_guide.pdf.
6. T. Jaeger. On the increasing importance of constraints. In Proceedings of the fourth ACM
workshop on Role-based access control, pages 3342. ACM Press, 1999.
7. J. Jrjens. Towards development of secure systems using UMLsec. In H. Hussmann, editor,
Fundamental Approaches to Software Engineering, 4th International Conference, Proceed-
ings, LNCS, pages 187200. Springer, 2001.
8. T. Koch, A. Uhl, and D. Weise. Model Driven Architecture. Technical report, Interac-
tive Objects Software GmbH, 2002. http://cgi.omg.org/cgi-bin/doc?ormsc/
02-01-04.pdf.
9. Object Management Group. OMG Unified Modeling Language Specification, Version 1.4,
2001. http://www.omg.org/technology/documents/formal/uml.htm.
10. R. S. Sandhu, E. J. Coyne, H. L. Feinstein, and C. E. Youman. Role-based access control
models. IEEE Computer, 29(2):3847, 1996.
11. Sun Microsystems, Inc. Enterprise JavaBeans Specification, Version 2.0, 2001. http:
//java.sun.com/ejb/docs.html.