Automated Code Generation for NFC-Based Access Control
Total Page:16
File Type:pdf, Size:1020Kb
Automated Code Generation for NFC-based Access Control Ludovico Iovino Martina De Sanctis Maria Teresa Rossi Computer Science Department Computer Science Department Computer Science Department Gran Sasso Science Institute Gran Sasso Science Institute Gran Sasso Science Institute L’Aquila, Italy L’Aquila, Italy L’Aquila, Italy [email protected] [email protected] [email protected] Abstract—Access control systems provide a security applica- cross-platform development is a barrier for solution providers tion for controlling access of persons through controlled gates. due to the high cost of development and maintenance of The gate, such as a door, can have a lock mechanism for targeting development to different platforms. securing the area from unauthorized access. Radio Frequency Identification (RFID) / Near Field Communication (NFC) is a This paper explores a case study about the migration of key technology for sensor communication enabling a ubiquitous an old chip card based access control system to a new way and pervasive computing network, popularly employed in access of authorizing people with Near Field Communication (NFC) control systems. In this paper we investigate a case study about tags. In the chip card based version of the system, the standard the migration of an old chip card based access control system to this new way of authorizing people, based on NFC tags. To plastic card which contains an embedded microchip has to be this aim, we propose a Model Driven approach that supports physically inserted in a reader to be read; in case data stored (semi) automatic code generation for enabling the communication on the chip allows the access, it enables the electric door lock. between an IoT infrastructure and platforms for Facility Access Usually, the card reader hosts the logic for the access control Management. Specifically, the approach combines the benefits of and, for each equipped door, the code implementing this logic NFC and Tinkerforge (i.e., an open source hardware platform) technologies with model driven techniques. As a consequence, has to be distributed and released on the reader(s). In addition it allows the reduction of the implementation efforts, by also to the access control system, a human resource management providing snippets as exemplary code usage, while making the system is used to associate a person to the card, to have a whole development process less error-prone and time consuming. registry in case the card gets lost or a check is needed. Currently, a new way of interaction is provided by NFC I. INTRODUCTION technology [6], which enables the ’touching paradigm’ where Access control systems provide a security application for the interaction can be identified as ”the deliberate bring- supervising access of persons through controlled gates. The ing together of two devices, for the purpose of obtaining gate, such as a door, can have a lock mechanism for securing services” [7]. NFC requires two compatible devices to be the area from unauthorized access. Internet of Things (IoT) is close to each other, basically touching them for enabling a new concept of integrated network of devices in the field of contactless identification and interaction. Moreover, most of information technology where devices communicate with each the commercial solutions for access control management also other. IoT security in building access control is a relevant field offer pre-packaged software systems for human resources where building security is implemented through IoT network. management. The main issue with these existing solutions Every device is connected with the related sensors, which is the impossibility of customizing the authorization logic, trigger the control mechanism communicating with the rest provided by the tool vendor. In case they offer customization, of the infrastructure. this service is extra-paid and quite expensive. Model-driven engineering [1] aims at tackling the complex- Tinkerforge [8] is an open source affordable system of build- ity of software systems via abstraction, using models as first- ing blocks using the concept of pluggable module, helping to class entities. Models are employed both for descriptive and simplify the implementation of IoT projects. The implementa- prescriptive purposes [2]. Model Driven Development (MDD) tion of the building blocks is based on intuitive API available approaches open to code-generation strategies, to reduce time for many programming languages, e.g., Java, PHP, Python. to market and improve quality of software [3]. Furthermore, This system, offering a high degree of abstraction, might ease Model Driven approaches, and in particular model transforma- the technical implementation with less code to be developed tions, can be successfully employed for supporting platform with respect to other components. The main advantage in independent to platform specific translation, also implementing selecting a target technology such as Tinkerforge is that it multi-platform code generation from single input model of the can be used to build systems interacting with other platforms system [4], [5]. This is quite relevant, given that nowadays and customize the access control algorithm for the required Copyright © 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). 31 purpose, since the code has to be developed. Moreover, the building blocks of the infrastructure can be selected and mounted, based on the requirements, and easily extended. Despite this selection offers a good trade-off between devel- opment and provided functionalities, the code controlling the devices has to be manually written, although some examples and documented APIs are provided on the website. In this paper, we propose a Model Driven approach that supports (semi) automatic code generation for enabling the communication between an IoT infrastructure and an existing web platform for Facility Access Management. In particular, by combining the benefits of NFC and Tinkerforge technolo- gies together with model driven techniques, the presented approach is able to generate software components, in the selected target language. This way, it allows reducing the implementation effort, also by offering snippets as exemplary code usage, while making the whole development process less error-prone and time consuming. The paper is organized as follows: section II offers a case study for introducing the domain in which the proposed ap- Fig. 1. Access Control Metamodel. proach, presented in section III, is applied. Section IV explores the related works and section V draws some conclusions, by also briefly mentioning possible future developments. then is delegated to the access control infrastructure, that in this case is implemented with the selected NFC technology. II. CASE STUDY This technology mounted near to the door of a room will In this section, we expose the case study we designed identify the tag used by the client and it will trigger the from a project experience with a company. Specifically, the authorization mechanism, by also communicating with the company we deal with it is a gym that is organized in diverse access control system. For instance, the access control system rooms, distributed in several floors of a building. Each room can expose web services or API devoted to this task. is equipped with different facilities to host specific activities Case Study Configuration. As introduced in section I, Tinker- (e.g., training, rehab, pilates). Activities are scheduled in forge is an open source platform of building blocks belonging different time slots from Monday to Saturday, with diverse to three categories, namely Bricks that, in turn, can control frequencies, and assigned to the available rooms. The clients different modules called Bricklets. Then, the communication of the gym can enroll in different courses and/or activities, interface of these building blocks can be extended by using by choosing different offers and subscriptions. The company Master Extensions. More precisely, each Brick has one task, wants to exploit the subscriptions that clients hold, to auto- which in our case study consists in checking the communica- matically check if they have access or not to each specific tion and authorization. Bricks are stackable, in the sense that room in the building. This way, it can be easily controlled if can be mounted on top of each other by creating a hierarchy. only authorized clients regularly registered in certain activities, For simplicity, in this paper we consider non-stackable Bricks. effectively attend it. Bricklets, can be connected to a Brick with a cable and We use a metamodeling approach to represent the case depending on the Bricklet type, different sensors, displays, I/O study introduced above. To better comprehend the application interfaces can be added. Master extensions are used to change domain, we engineered the requirements for the system in the the interface from USB to either Ethernet or WIFI. metamodel in Fig 1. An AccessControlSystem is organized To support a basic configuration in our case study, we to manage a list of Activities that can be conducted in the consider an architecture composed of a single Brick per door facility, and specifically in the available Rooms in specific (room) and multiple connected Bricklets, namely an NFC TimeSlots. In fact, each room has a Timetable of activities, reader, a speaker (beeper), a led display and a relay to control performed in specific WEEKDAYs and time. The system can the door lock. Relays are switches that can electronically register Clients associated to a Person with all the fields for open and close circuits and, in our case study, they control 4 the identification (hidden for lack of space). Each client can circuits (from which the name of the component quad relay). be linked to MemberShips with a specific start and end date Moreover, each client has to receive a NFC tag (card, sticker or related to an Activity. The access control system can manage bracelet) that has to be enabled for the entrance. Logically, the who is authorized to access a room in a specific date and steps to be performed when entering a room are the following: time.