Scenario-driven Testing of Security-related Domain-specific Language Models



Similar documents
Quality Assurance of Software Models within Eclipse using Java and OCL

UML TUTORIALS THE USE CASE MODEL

i. Node Y Represented by a block or part. SysML::Block,

Compliance and Requirement Traceability for SysML v.1.0a

The SPES Methodology Modeling- and Analysis Techniques

Towards Flexible Business Process Modeling and Implementation: Combining Domain Specific Modeling Languages and Pattern-based Transformations

Agile Requirements Traceability Using Domain-Specific Modelling Languages

Modelling the Railway Control Domain rigorously with a UML 2.0 Profile

Specification and Analysis of Contracts Lecture 1 Introduction

Analysis of the Specifics for a Business Rules Engine Based Projects

Model-Driven Development - From Frontend to Code

Model-Based Requirements Engineering with AutoRAID

Organization of DSLE part. Overview of DSLE. Model driven software engineering. Engineering. Tooling. Topics:

A UML 2 Profile for Business Process Modelling *

A SYSTEMATIC APPROACH FOR COMPONENT-BASED SOFTWARE DEVELOPMENT

Overview. Stakes. Context. Model-Based Development of Safety-Critical Systems

Data Governance Center Positioning

Automatic Generation of Consistency-Preserving Edit Operations for MDE Tools

Requirements engineering

Transforming PICTURE to BPMN 2.0 as Part of the Model-driven Development of Electronic Government Systems

Modelling with Papyrus: Domain-Specific Modelling Languages using UML Profiles

This is an author-deposited version published in : Eprints ID : 15447

Meta-Model specification V2 D

Efficient Management of Tests and Defects in Variant-Rich Systems with pure::variants and IBM Rational ClearQuest

Semantic Description of Distributed Business Processes

Textual Modeling Languages

Kirsten Sinclair SyntheSys Systems Engineers

Modeling in Software Architecture

SOA GOVERNANCE MODEL

Toward Families of QVT DSL and Tool

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Tool Support for Software Variability Management and Product Derivation in Software Product Lines

Automatic Test Data Generation for TTCN-3 using CTE

Development Process Automation Experiences in Japan

Scenario-based Requirements Engineering and User-Interface Design

Example-driven meta-model development

Overview of major concepts in the service oriented extended OeBTO

Digital Policy Management Framework for Attribute-Based Access Control

SOFTWARE DEVELOPMENT STANDARD FOR SPACECRAFT

Introducing Simulation and Model Animation in the MDE Topcased 1 Toolkit

Invoice Only PROFILE DESCRIPTION

mbeddr: an Extensible MPS-based Programming Language and IDE for Embedded Systems

UML Profiling Comes of Age Realizing the Potential of Domain-Specific Modeling

DSL Design. Model Transformations. Model Transformations. Language g Implementation Strategies

UML/OCL based Design and Analysis of Role-Based Access Control Policies

What is a life cycle model?

Towards a Multi-Domain Model-Driven Traceability Approach

Requirements engineering and quality attributes

The Workflow Management Coalition Specification Workflow Management Coalition Terminology & Glossary

Requirements Management with Enterprise Architect

CoSMIC: An MDA Tool Suite for Application Deployment and Configuration

Co-Creation of Models and Metamodels for Enterprise. Architecture Projects.

Requirements Management with Enterprise Architect

Business-Driven Software Engineering Lecture 3 Foundations of Processes

Surveying and evaluating tools for managing processes for software intensive systems

Model Driven Interoperability through Semantic Annotations using SoaML and ODM

Execution of A Requirement Model in Software Development

Jairson Vitorino. PhD Thesis, CIn-UFPE February Supervisor: Prof. Jacques Robin. Ontologies Reasoning Components Agents Simulations

Foundations of Model-Driven Software Engineering

Model Driven Security: Foundations, Tools, and Practice

How To Write An Electronic Health Record

Int. J. Business Process Integration and Management, Vol. 2, No. 2,

SOA Enabled Workflow Modernization

A DSL Toolkit for Deferring Architectural Decisions in DSL-Based Software Design

A Pattern-based Framework of Change Operators for Ontology Evolution

A Pattern-based Approach to Business Process Modeling and Implementation in Web Services

Integration of Application Business Logic and Business Rules with DSL and AOP

On General-purpose Textual Modeling Languages. On General-purpose Textual Modeling Languages

Role-Based Access Control (RBAC) Role Engineering Process Version 3.0

The Software Development Process

UPROM Tool: A Unified Business Process Modeling Tool for Generating Software Life Cycle Artifacts

VICCI. The Eclipse Modeling Framework (EMF) A Practical Introduction and Technology Overview. Dipl.-Inf. Christoph Seidl

Semantic-enabled Software Engineering and Development

A Pattern-driven Generation of Security Policies for Service-oriented Architectures

Implementing reusable software components for SNOMED CT diagram and expression concept representations

Transcription:

Scenario-driven Testing of Security-related Domain-specific Language Models Bernhard Hoisl June 25, 2013

Introduction, Definition, Motivation MDD: software engineering technique, abstracting problem domain via models, M2M/M2T transformations DS(M)L: a specialized (modeling) language tailored for a particular application domain (e.g. access control, backup policies, or system auditing) in the context of MDD DSML based on the MOF/UML: de facto standard for software system modeling, standardized modeling extensions, tool support, maintained through the OMG, builds upon a standardized metamodel Scenario-driven Testing of Security-related Domain-specific Language Models 2 / 20

Introduction, Definition, Motivation Scenario-driven Testing of Security-related Domain-specific Language Models 3 / 20

Introduction, Definition, Motivation Objectives An integrated approach for modeling processes and process-related RBAC models (roles, hierarchies, statically and dynamically mutual exclusive tasks etc.) Integrated modeling of business processes and process-related duties; particularly the modeling of duties and associated tasks in business process models An approach to provide modeling support for the delegation of roles, tasks, and duties in the context of process-related RBAC models Modeling of confidentiality and integrity of object flows in activity models Modeling support for the notion of mutual exclusion and binding constraints for duties in process-related RBAC models Incorporation of data integrity and confidentiality into the MDD of processdriven SOAs Integration of context constraints with process-related RBAC models and thereby supporting context-dependent task execution An approach for the definition of audit requirements and specification of audit rules at the modeling-level Domain Business processes, role-based access control (RBAC) process- Business processes, related duties Business processes, delegation of roles, tasks, and duties Data confidentiality and integrity RBAC (consistency checks for duties) Integrity and confidentiality for service invocations Business processes, RBAC, context constraints Audit rules Scenario-driven Testing of Security-related Domain-specific Language Models 4 / 20

Introduction, Definition, Motivation Use case: Integration of security-related DSML core language models DSML core language model captures all relevant domain abstractions and specifies the relations between these abstractions Integration enables the reuse of DSMLs by composing two or more languages into an integrated DSML to implement a new domain or to integrate domain viewpoints DSML C target AuditableEvent target :CompositionLink «merge» «merge» :CompositionLink DSML A DSML B source AuditEvent Event source Scenario-driven Testing of Security-related Domain-specific Language Models 5 / 20

Scenario-based Testing As it is almost impossible to completely test a complex software system, effective means are needed to select relevant tests, to express and to maintain them, and to automate test procedures whenever possible Scenarios can help to reduce the risk of omitting or forgetting relevant test cases, as well as the risk of describing important tests insufficiently Scenarios are used to specify user needs as well as to explore and to define (actual or intended) system behavior Scenarios can be described in different ways at various abstraction levels (e.g., via structured text, graphical models, or formal specifications) Scenario-driven Testing of Security-related Domain-specific Language Models 6 / 20

Scenario-based Testing checked against 0..1 Setup sequence 0..1 Expected result Test result 0..1 0..1 1..* 1..* returns Test suite Test case Test scenario 1 Test body 0..1 0..1 * * * Cleanup sequence Precondition Postcondition 0..1 * Scenario-driven Testing of Security-related Domain-specific Language Models 7 / 20

Scenario-based Testing of DSML Core Language Models: Process Description ad: A scenario-based testing activity (domain expert) Create scenario descriptions (DSML engineer) Translate scenario descriptions into tests (domain expert, DSML engineer) Review scenario tests (DSML engineer) Perform meta-modeling action (DSML engineer) Run scenario tests [tests succeed] [tests fail] Scenario-driven Testing of Security-related Domain-specific Language Models 8 / 20

Scenario-based Testing of DSML Core Language Models: Problem Statement Create natural-language scenario descriptions Translate scenarios Run scenario tests Scenario-driven Testing of Security-related Domain-specific Language Models 9 / 20

Scenario-based Testing of DSML Core Language Models: Our Approach Natural-language scenario descriptions on the requirements-level Executable test scenarios (for a dedicated platform) Transformation via linguistic rule-based step definitions Tool-support: testing framework based on Eclipse EMF, Epsilon, Xtext Create natural-language scenario descriptions Step definitions Run scenario tests Scenario-driven Testing of Security-related Domain-specific Language Models 10 / 20

Example: Process Description Scenario testing a security-related DSML core language model composition ad: Scenario testing a DSML core language model composition (DSML engineer) Define step definitions see Listing 3 (domain expert) Create natural-language scenario descriptions see Listing 2 (domain expert, DSML engineer) Determine requirements specification format see Listing 1 [reuse step definitions] [apply step definitions] (DSML engineer) Perform language modeling action Comparison rules Transformation rules Merge rules Metamodel DSML 1 Match trace Metamodel DSML 1 Load models Match elements ECL Copy elements ETL Merge elements EML; see Listing 5 Metamodel DSML 2 Metamodel DSML 1 Metamodel DSML 2 Metamodel DSML 2 (DSML engineer) Transform scenario descriptions into tests (domain expert, DSML engineer) Review scenario tests [tests succeed] (DSML engineer) Run scenario tests see Listing 4 [tests fail] Match trace Composed metamodel Scenario-driven Testing of Security-related Domain-specific Language Models 11 / 20

Example: Security-related DSML Core Language Models NamedElement name : EString Signal data : EString subscribe 0..* 0..* AuditEvent publish auditevents 0..* Condition 0..* conditions AuditRule 0..* auditrules EventSystem transition StateMachine states 0..* State 1 0..1 Transition target NamedElement name : EString 0..* Event events Scenario-driven Testing of Security-related Domain-specific Language Models 12 / 20

Example: Integration of Security-related DSML Core Language Models DSML C target AuditableEvent target :CompositionLink «merge» «merge» :CompositionLink DSML A DSML B source AuditEvent Event source Scenario-driven Testing of Security-related Domain-specific Language Models 13 / 20

Example: Requirements-level Scenario Description (Excerpt) Test case 2 Primary actors Preconditions Trigger/Setup Test scenario 1 Preconditions Expected result Ascertain that each triggered AuditableEvent can be sensed by the monitoring facility. System auditor, distributed-systems operator All metamodel constraints for the source DSMLs must hold for DSMLC. The model-transformation workflow to integrate the metamodels of DSMLA&DSMLBis executed. AnAuditableEvent issued by atransition must publish at least onesignal. AuditableEvent has all structural features ofauditevent andevent. Instances ofauditableevent must refer to at least onesignal instance. Scenario-driven Testing of Security-related Domain-specific Language Models 14 / 20

Example: Scenario-based requirements specification language (metamodel & textual concrete syntax) RequirementsSpecification NamedElement name : String [1] features 0..* Feature in_order_to : String [0..1] as_a : String [0..1] i_want : String [0..1] scenarios 0..* Scenario given : String [0..*] when : String [0..*] then : String [1..*] RequirementsSpecification:"..." Feature:"..." Inorderto"..." Asa"..." Iwant"..." Scenario:"..." Given"..." When"..." Then"..." Scenario-driven Testing of Security-related Domain-specific Language Models 15 / 20

Example: Requirements-level Scenario Description (Alternative Format; Excerpt) RequirementsSpecification:"DSMLs A and B integration" Feature:"Monitor AuditableEvent" In order to"ascertain that each triggered AuditableEvent can be sensed by the monitoring facility" As a"system auditor and distributed-systems operator" I want"that AuditableEvents shall publish Signals" Scenario:"AuditableEvent shall publish at least one Signal" Given"that EventSystemStateMachine.AuditableEvent has all features of EventSystem.AuditEvent and StateMachine.Event" When"in metamodel EventSystemStateMachine metaclass AuditableEvent references metaclass Signal" Then"instances of EventSystemStateMachine.AuditableEvent shall refer to at least 1 Signal instance"... Scenario-driven Testing of Security-related Domain-specific Language Models 16 / 20

Example: Scenario-transforming Step Definition varstepdef:map=map{ -- tests if multiplicity >= 1 between two classifiers Set{ "^instancesof(\\s+)\\.(\\s+)(?:shall must)refertoatleast(\\d+)(\\s+) instances?$" } ="assertfalse(\"an $1 shall publish at least $2 $3.\", $0!EClass.all->selectOne(c c.name =\"$1\").eStructuralFeatures->first().lowerBound < $2);" -- more step definitions }; Scenario-driven Testing of Security-related Domain-specific Language Models 17 / 20

Example: Generated Scenario Tests --DSMLs A and B integration @TestSuite operation dsmls_a_and_b_integration(){ --Monitor AuditableEvent: --In order to ascertain that each triggered AuditableEvent can be sensed by the monitoring facility --As a system auditor and distributed-systems operator --I want that AuditableEvents shall publish Signals @TestCase operation monitor_auditableevent(){ --AuditableEvent shall publish at least one Signal @TestScenario --Given that EventSystemStateMachine.AuditableEvent has all features of EventSystem.AuditEvent and StateMachine. Event $pre EventSystemStateMachine!EClass.all->selectOne(ae ae.name ="AuditableEvent").eStructuralFeatures.size() = EventSystem!EClass.all->selectOne(ae ae.name ="AuditEvent").eStructuralFeatures.size() + StateMachine! EClass.all->selectOne(ae ae.name ="Event").eStructuralFeatures.size() operation auditableevent_shall_publish_at_least_one_signal(){ --When in metamodel EventSystemStateMachine metaclass AuditableEvent references metaclass Signal if(eventsystemstatemachine!eclass.all->selectone(c c.name ="AuditableEvent").eStructuralFeatures->first(). etype.name ="Signal"){ --Then instances of EventSystemStateMachine.AuditableEvent shall refer to at least 1 Signal instance assertfalse("an AuditableEvent shall publish at least 1 Signal.", EventSystemStateMachine!EClass.all-> selectone(c c.name ="AuditableEvent").eStructuralFeatures->first().lowerBound < 1); } } }... } Scenario-driven Testing of Security-related Domain-specific Language Models 18 / 20

Example: Scenario-test Reports Scenario-driven Testing of Security-related Domain-specific Language Models 19 / 20

Concluding Remarks Discussion Ambiguity of requirements: step definitions help to reduce the number of semantic variation points of ambiguous natural-language requirements Consistency of requirements: executable scenario tests add to the conflict-free definition of requirements (otherwise tests will fail) Singularity of requirements: pattern-based step definitions recognize conjugated scenario steps Traceability of requirements: forward traceability via step definitions; backward traceability via the scenario-test report Verification of requirements: evidence collection via executable test scenarios for the proof that system can satisfy requirements Further information: http://nm.wu.ac.at/modsec Scenario-driven Testing of Security-related Domain-specific Language Models 20 / 20