Xround : a Reversible Template Language and Its Application in Model-Based Security Analysis
Total Page:16
File Type:pdf, Size:1020Kb
This is a repository copy of XRound : A reversible template language and its application in model-based security analysis. White Rose Research Online URL for this paper: http://eprints.whiterose.ac.uk/54730/ Version: Submitted Version Article: Chivers, Howard Robert orcid.org/0000-0001-7057-9650 and Paige, Richard F. orcid.org/0000-0002-1978-9852 (2009) XRound : A reversible template language and its application in model-based security analysis. Information and Software Technology. pp. 876-893. https://doi.org/10.1016/j.infsof.2008.05.006 Reuse Items deposited in White Rose Research Online are protected by copyright, with all rights reserved unless indicated otherwise. They may be downloaded and/or printed for private study, or other acts as permitted by national copyright laws. The publisher or other rights holders may allow further reproduction and re-use of the full text version. This is indicated by the licence information on the White Rose Research Online record for the item. Takedown If you consider content in White Rose Research Online to be in breach of UK law, please notify us by emailing [email protected] including the URL of the record and the reason for the withdrawal request. [email protected] https://eprints.whiterose.ac.uk/ XRound: A Reversible Template Language and its application in Model-Based Security Analysis Howard Chivers and Richard F. Paige Department of Information Systems, Cranfield University, Shrivenham, UK. Department of Computer Science, University of York, UK. [email protected], [email protected] Limited tool support currently exists for bidirectional Abstract Successful analysis of the models used in Model- transformations; key state of the art is summarised in Driven Development requires the ability to synthesise the Section 2. Bidirectional transformations can be awkwardly results of analysis and automatically integrate these results implemented by the sequential application of with the models themselves. This paper presents a unidirectional transformations, but this is not entirely reversible template language called XRound which satisfactory because information – e.g., detailed supports round-trip transformations between models and representations of platforms, model element identities – the logic used to encode system properties. A template may be lost after each unidirectional transformation is processor that supports the language is described, and the applied. This will particularly be the case with use of the template language is illustrated by its application transformations that are reused from libraries in in an analysis workbench, designed to support analysis of unexpected ways. More generally, it is difficult to ensure security properties of UML and MOF-based models. As a round-trip consistency in a sequence of unidirectional result of using reversible templates, it is possible to transformations. seamlessly and automatically integrate the results of a This paper describes a new template-based language, security analysis with a model. called XRound, for specifying bidirectional transformations Keywords Model-Driven Development, Template between models of arbitrary languages. Moreover, the Processing, UML, Security Analysis paper presents powerful tool support for this language that implements bidirectional transformations, particularly to support merging of the results of model analysis with an original model. XRound and its tool support are both illustrated in the context of a case study demonstrating a particular form of model analysis, namely security risk 1. Introduction analysis (explained in Section 1.1). General lessons learned about model analysis and using XRound in the Transformations are a critical component of Model- context of merging analysis results with models are also Driven Development, particularly in the Model-Driven extracted and discussed. Architecture (MDA) [1]. To this end, the Query/Views/Transformations (QVT) [2] standard has 1.1 Context and contribution been developed, in order to provide a precise mechanism for describing transformations between models. Given a model of a system, such as a Unified Modelling QVT transformations can be unidirectional (i.e., from Language (UML) or Matlab/Simulink/Stateflow model, we one metamodel to a second not necessarily different can apply tools to analyse the model, to determine if it has metamodel) or bidirectional (i.e., reversible between two desirable properties. A variety of analyses are possible and metamodels). The former is of critical importance in are used in practice, particularly consistency checking (e.g., MDA, e.g., for transforming platform independent models does the information contained in one UML diagram (PIMs) into platform specific models (PSMs). The latter is contradict that contained in a second diagram), timing vital for supporting round-trip engineering, and also (e.g., is the worst-case execution time for a system rigorous analysis of models: the results of a logical satisfactory), failures (e.g., does the system mitigate for a analysis (e.g., correctness, timing analysis, security particular class of fault) and security. We illustrate the use analysis) may need to be reflected in the source of a of XRound and bidirectional transformations in the context transformation. For example, a static analysis may be of security risk analysis in this paper. applied to a PSM, resulting in changes being made to that Security risk analysis is concerned with discovering PSM. These changes may need to be reflected in the threat paths in a system which allow potential attackers to original PIM. access system assets. Concrete security objectives are in the form of specific unwanted outcomes to particular assets (e.g. integrity of particular data); however, the analysis transformations and independence between input and process is forced to consider all possible threat paths to output applications, while supporting bidirectional each asset, and this requires an efficient analytic tool. transformations. This language and its supporting template The basic idea behind any form of model analysis is as processor allow model analysis tools to import Extensible follows. A model (e.g., in UML) is annotated with Markup Language (XML) models with a source-specific properties. In the case of security risk analysis, the metamodel, and re-generate the XML when the analysis properties attached to a model are predicates: facts that are model is changed. The security analysis workbench true, or that we wish to assert, about the model (examples application described in Section 7 is one such application: follow in the sequel). These properties are collected by an a specialised analysis tool that imports UML models in the analytic tool, which then processes them and returns XML Metadata Interchange (XMI) format, and uses a results. The results of analysis may be additional properties bidirectional transformation to merge its results into the that need to be integrated with the original model, e.g., original XMI model. new security requirements that have been added to control The contribution of this paper is to describe the XRound threats, failure modes for collections of components, language, its motivation, its relationship with standard worst-case execution time for a subsystem. This template processing, and how it supports bidirectional integration is generally quite difficult, especially because transformations via so-called reversible templates. engineers may need to use different tools for modelling Additionally, the implementation and use of the XRound (e.g., a UML tool) and specialised analyses. language is shown to be feasible by presenting a The usual solution for lightweight tool integration of supporting template processor and a practical application. this form is template processing. A template processing XMLSource, a Java-based template processor for XRound, system applies a template to a data model via a template is described in both system and implementation terms, and processor, resulting in the extraction and formatting of the the successful use of XRound in security analysis is data for some particular application. An example of a discussed. General lessons learned about supporting template language is XSLT, which is used for transforming different kinds of model analysis are also synthesised in XML documents, usually into text or HTML. the conclusions. This is an attractive solution, since it allows designers to We commence with an overview of related work on use their preferred modelling environment, and does not transformations and model merging, and then in Section 3 necessarily require a complete definition of the languages discuss the notion of a reversible template, which is at the supported by that environment (e.g., a complete UML foundation of XRound. The required processing for metamodel). It is also preferable from the tool software reversible templates is presented. Section 4 presents perspective; for example, type checking of properties can XRound itself, and Section 5 illustrates the language with be implemented once within the analytic tool, rather than several small examples. Section 6 summarises the template in each UML environment. It is also attractive from the processor that supports XRound, and section 7 explains the perspective of compatibility with the traditional principles use of XRound in supporting security analysis. We then and practices of MDA and MDD. MDA, for example, discuss lessons learned, conclusions, and future work. operates in terms of application of