<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards the integration of security patterns in UML Component-based Applications</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anas Motii</string-name>
          <email>anas.motii@cea.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Brahim Hamid</string-name>
          <email>brahim.hamid@irit.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Agnès Lanusse</string-name>
          <email>agnes.lanusse@cea.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jean-Michel Bruel</string-name>
          <email>bruel@irit.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CEA, LIST, Laboratory of Model Driven Engineering for Embedded Systems</institution>
          ,
          <addr-line>P.C. 174, Gif-sur-Yvette, 91191</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>IRIT, University of Toulouse 118 Route de Narbonne</institution>
          ,
          <addr-line>31062 Toulouse Cedex 9</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In software engineering, design patterns are considered effective tools for the reuse of specific information. They are widely used today to provide architects and designers with reusable design knowledge. This paper is about the use of patterns in secure systems and software engineering, in particular in model based engineering. In this paper, we are proposing a model-based methodology for security pattern integration aimed to secure component-based software system architectures in UML. The methodology is based on merging techniques and verifications against integration constraints described in OCL language. The paper illustrates the method through a VPN security pattern.</p>
      </abstract>
      <kwd-group>
        <kwd>model-based methodology</kwd>
        <kwd>model driven engineering</kwd>
        <kwd>UML</kwd>
        <kwd>OCL</kwd>
        <kwd>security patterns</kwd>
        <kwd>pattern integration</kwd>
        <kwd>secure architecture</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        On the last decade, distributed systems have grown in complexity and connectivity.
This has led to the introduction of several security breaches such as the one in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This
is due to the fact that security has been treated at the late phases of development. The
security community all agree that there is a need of secure software and systems
methods that tackle security at early phases. Indeed, patterns represent generic solutions for
recurring problems. The use of a well-documented catalogue of patterns has proven to
be useful in several project in particular for security. However these catalogues are not
enough, there is a huge need for methods for helping users select relevant patterns and
apply them. Classical pattern concepts described in the pattern templates such as Gang
Of Four (GoF) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] are commonly accepted but we believe that the pattern conceptual
model must embody additional concepts relevant for pattern selection and integration
into architectures. In this paper, we propose a method for integrating security patterns
within architectures. For that purpose, Model Driven Engineering (MDE) offers an
ideal development context using metamodeling and model transformation. In fact, if
we consider the pattern and the application as two models, the integration process can
be automated as a MDE composition operation resulting in a new (refined) architecture.
In this paper we focus on architectures described as UML composite structures. In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
the authors have presented an automated process for selecting patterns based on a
relational view of the application and pattern models. Their approach is similar to ours
since it uses role assignment as a query to select software patterns.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Background: Prerequisites for using our process</title>
      <p>
        The modeling language and the integration process used for security patterns are based
on previous works related to [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Here, we present the pattern concepts we have defined
to support our methodology.
      </p>
      <p>Pattern: is the main concept. It encapsulates a solution of a recurring problem in specific
context.</p>
      <p>
        Integration relevant concepts: (from [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ])
 Pattern entity (role): The solution of the pattern consists of a set of entities (roles).
      </p>
      <p>Each entity of the targeted application will play a role in the pattern.
 Application: architecture targeted by the integration. It consists of a set of application
entities. Not all entities must be a target for integration but only a subset. Some
entities will play a role in the pattern.
 Plays (is bound to): is a concept used to link pattern roles and the domain application
entities.
 Properties: represent the intent of the pattern and formulate the solution of the
problem.
 Constraints: are assumptions that the application must satisfy in order for the pattern
to deliver its properties. There are two kinds of constraints: preconditions and post
conditions.</p>
      <p>Traceability relevant concepts (added):
 Create: If some roles of the pattern are not played by the application, new elements
are created. This concept is used to link the newly created elements and the
corresponding pattern roles.
 Integration trace (pattern application): represents the success of the integration on
one hand. On the other hand, it guarantees traceability as it keeps the “Plays” and
the “Create” traces.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Pattern integration process</title>
      <p>The process follows four phases: “Preparation” extracts from the pattern the solution
description and its related constraints (preconditions and post conditions) into a UML
model. Pattern properties and constraints are formalized using OCL 1. “Elicitation”
builds a bridge between the application and the pattern. “Merge” does the merging
be1 The Object Constraint Language adds constraint rules within UML models
tween them and generates an integration trace. Finally, “Adaptation” offers the
possibility to make changes by letting the user refining the new application. We illustrate the
approach with the application of a VPN pattern on a UML composite structure
describing a distributed system. The scenario is performed as follows. A designer wants to
establish a secure communication between two clients: “host1” and “host2” and a
corporate network server “companyServer”. The designer starts by modeling the clients
and corporate server in the left side of Fig. 1. Then he follows the steps described below
to obtain a refined model integrating the VPN pattern.</p>
      <sec id="sec-3-1">
        <title>Preparation.</title>
        <p>Fig. 2 shows the VPN architecture solution as a UML composite structure along with
its constraints. The VPN has the following roles: “client”, “VPNClientSide”,
“VPNNetworkSide”, “communicationNetwork” and “corporateServer”. As seen in Fig. 2, the
constraints over the application are formalized in OCL. Each constraint is attached to
the constrained elements. These constraints must normally be expressed by security
experts. In this example they are mainly illustrative.
 Preconditions: (1) there must not be a connection between elements playing roles
“client” and “corporateServer” expressed in the constraint
“NoUnsecureCommunication”; (2) elements of the application cannot play the exclusive roles: “client” and
“VPNNetworkSide”, “client” and “VPNClientSide”, and “communicationNetwork”
and “corporateServer” (the last constraint is not shown in the figure).
 Post conditions (not shown in the figure): The application must not have a direct
connection between entities playing roles “client” and “corporateServer” (no direct
link). If there is an indirect link, it must go through the “VPNClientSide” first and
then “VPNNetworkSide”.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Elicitation.</title>
        <p>Role assignment (casting diagram). The designer specifies that “host1” and “host2”
play the roles of “client”, and that “companyServer” plays the role “corporateServer”.
Thus he draws the casting diagram in the right side of Fig. 1.</p>
        <p>Role assignment validation. Once the casting has been made the designer checks its
validity through the checking module against preconditions. If one of the preconditions
is violated the casting is rejected. For example, if the designer had connected “host1”
and “companyServer” directly, then “NoUnsecureCommunication” will be violated.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Merge.</title>
        <p>Once the casting is correct, this phase consists of merging the composite structure of
the pattern and the application, using merge points defined in the casting diagram, in
order to obtain a new application as shown in the bottom of Fig. 3.</p>
        <p>In addition, a trace is generated linking the new application model, and the previous
application and pattern models as seen in Fig. 3. It consists of the castings
(dependencies stereotyped with “Play”) in the “casting diagram” and dependencies toward the
newly created entities (dependencies stereotyped with “Create”). The trace is necessary
for the last phase.</p>
      </sec>
      <sec id="sec-3-4">
        <title>Adaptation.</title>
        <p>The adaptation phase consists in checking the resulting application model against the
pattern post conditions at each model change. This change can result from ad-hoc
tailoring by the designer or from the integration of another security pattern (e.g., firewall
pattern). For this reason, the created trace plays an important role in this phase. Since
the trace keeps a link between the refined application, and the previous version of the
application and the pattern. The verification of post conditions over the new application
is guaranteed by the checking module. Indeed, at each change in the new application,
the checking module verifies that the post conditions described in the pattern are still
true in the elements playing a role or created after the integration. For example, if
applying a new pattern over the new application creates a connection between “host1”
and “companyServer”, then the post condition “no direct link” will be violated. It
should be noted that at this phase all the post conditions of patterns that have already
been applied are rechecked to enforce their continuous functionality.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>This paper presents a pattern integration process, aimed at correctly applying security
patterns on systems and software architectures. The process has been illustrated through
the application of a VPN pattern. In future work, we will apply the process through
several security patterns.</p>
      <p>The challenges faced during the integration process were due to the fact it is part of
global MDE process for securing system architectures. It is composed of several
phases: (1) risk analysis, (2) pattern selection with regards to multi-concern objectives,
(3) pattern integration. In order to guarantee fast considerations of changes in
requirements such as: real-time, we thought of adding new concepts such as traceability links
for the architect to keep a trace of the added components and the applied pattern. For
instance, if the real-time requirements change, some selected patterns may change.
Thanks to traceability, the replacement of patterns becomes easier since the architect
has detailed information of the currently applied pattern.</p>
      <p>Acknowledgements. This work is conducted in the context of a Ph.D. thesis funded by
CEA LIST and co-leaded by CEA (LISE) and IRIT (MACAO).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <source>Attackers Alter Water Treatment Systems in Utility Hack: Report | SecurityWeek</source>
          .Com, http://www.securityweek.
          <article-title>com/attackers-alter-water-treatment-systems-utility-hack-report.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Helm</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Johnson, R.,
          <string-name>
            <surname>Vlissides</surname>
          </string-name>
          , J.: Design Patterns:
          <article-title>Elements of Reusable Object-oriented Software</article-title>
          .
          <article-title>Addison-Wesley Longman Publishing Co</article-title>
          ., Inc., Boston, MA, USA (
          <year>1995</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. van den Berghe, A.,
          <string-name>
            <surname>Van Haaren</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Van Baelen</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Berbers</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joosen</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          :
          <article-title>Towards an automated pattern selection procedure in software models</article-title>
          .
          <source>In: Late breaking papers of the 22nd international conference on inductive logic programming (ILP</source>
          <year>2012</year>
          ). pp.
          <fpage>68</fpage>
          -
          <lpage>73</lpage>
          . CEUR-WS (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Hamid</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Percebois</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gouteux</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>A Methodology for Integration of Patterns with Validation Purpose</article-title>
          .
          <source>In: Proceedings of the 17th European Conference on Pattern Languages of Programs</source>
          . p.
          <volume>8</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          :
          <fpage>14</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>