{'fraction_non_alphanumeric': 0.02483524705746928, 'fraction_numerical': 0.006791562347117902, 'mean_word_length': 4.88177048070413, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Flexible, Decentralized Access Control for Smart Buildings with Smart Contracts

Large commercial buildings are complex cyber-physical systems containing expensive and critical equipment that ensure the safety and comfort of their numerous occupants. Yet occupant and visitor access to spaces and equipment within these buildings are still managed through unsystematic, inefficient, and human-intensive processes. As a standard practice, long-term building occupants are given access privileges to rooms and equipment based on their organizational roles, while visitors have to be escorted by their hosts. This approach is conservative and inflexible. In this paper, we describe a methodology that can flexibly and securely manage building access privileges for long-term occupants and short-term visitors alike, taking into account the risk associated with accessing each space within the building. Our methodology relies on blockchain smart contracts to describe, grant, audit, and revoke fine-grained permissions for building occupants and visitors, in a decentralized fashion. The smart contracts are specified through a process that leverages the information compiled from Brick and BOT models of the building. We illustrate the proposed method through a typical application scenario in the context of a real office building and argue that it can greatly reduce the administration overhead, while, at the same time, providing fine-grained, auditable access control.


INTRODUCTION
Modern commercial buildings are complex cyber-physical systems. They are increasingly being equipped with sensors and actuators, ranging from surveillance cameras and card readers for security and access control, to thermostats and air-quality sensors feeding into the Heating, Ventilation, and Air Conditioning (HVAC) system, which controls the indoor environment while maintaining occupants comfort [5,16]. These buildings represent substantial financial investments and the management of their security is even more critical compared to older buildings.
Reasoning about and managing access to these buildings require different access policies for different types of users. For example, as a standard practice, long-term building occupants such as employees who work in the building are given access privileges to their offices and shared spaces, based on their organizational roles; on the other hand, facilities-management personnel typically have access to the more restricted spaces where equipment is installed and also to the Building Management System (BMS) which enables them to monitor and control the equipment settings. Occupants may access the sensing and control devices, such as light switches and thermostats, in the spaces to which they have physical access even though these devices may impact building areas beyond the room in which they are physically located; for example, a thermostat located in a room can determine the temperature setpoint of multiple adjacent rooms. Finally, visitors tend to have limited access, and are frequently required to be escorted by building occupants to the meeting rooms where their business is taking place; they might control equipment in these rooms, but only for the duration of their meeting. In large commercial buildings, this approach implies substantial administrative overhead and exposes the building infrastructure to various security threats.
Ideally, an automated solution is needed to efficiently manage the access privileges of a building's occupants. Traditional role-based access-control models adopted in existing access control systems Authors' address: Leepakshi Bindra, leepaksh@ualberta.ca; Kalvin Eng, kalvin.eng@ualberta.ca; Omid Ardakanian, ardakanian@ualberta.ca; Eleni Stroulia, University of Alberta, Canada, Edmonton, Canada, stroulia@ualberta.ca. arXiv:2010.08176v1 [cs.CR] 16 Oct 2020 are unwieldy, in that they require the specification of all roles and their relative authority, which is a challenge in large buildings occupied by multiple organizations, each one with their own different role hierarchy [10]. In this paper, we propose a methodology for managing building access control inspired by the concept of airline boarding-passes and the workflows around them. At any point in time, the airport is used by numerous airlines that manage their own flights at their corresponding gates and are responsible for issuing boarding passes to their passengers. Boarding passes become available shortly before passengers travel, enabling passengers to go through security, access their gate, and board their plane at the right time. Each boarding pass is associated with an individual traveller, and is valid only during a short period before the flight departure. During this period, security personnel are able to scan and verify the boarding pass. This methodology is envisioned to be implemented independent of any pre-existing access control delegation strategies, but still be co-existent with already implemented access control systems.
Our methodology can flexibly and securely manage building access privileges for long-term occupants and short-term visitors alike, addressing the challenges and risks mentioned above. We establish a set of services for fine-grained decentralized management of people's access privileges within a commercial building. We use the term fine-grained to mean (a) person-centric instead of role-based, (b) tailored to different space/system granularities, and (c) spanning multiple timescales. The underlying intuition for this work is that if a person is authorized to have physical access to a particular location in a building, then they also have access and opportunity to manipulate the sensors and control points in this space. This is because, in most cases, there is no additional access-control beyond placing the equipment behind a locked door. Also by implication, if a person should not have access to some control points, they should not be authorized to access the space where this equipment is located.
Our methodology relies on blockchain smart contracts to describe, grant, audit, and revoke fine-grained permissions for building occupants and visitors in a decentralized fashion [3]. The smart contracts are specified through a process that leverages the information compiled from the BOT [32] and Brick [6] models of the building's spatial structure, equipment, and their relations. This information enables our methodology to grant an individual with just the right access privileges to let them reach their destination within the building. We implement this intuition in the form of smart contracts, through which space-access privileges are given to (and revoked from) individuals using an API that can be invoked by different software applications. The underlying access-control service is responsible for accepting or rejecting individual access requests based on the currently valid smart contracts and their implications regarding access to sensors and actuators. We illustrate the proposed method through a typical use case in the context of a real building and we argue that it can greatly reduce the administration overhead, while at the same time providing fine-grained, auditable access control.
The rest of this paper is organized as follows. Section 2 provides an overview of the context around our work. Section 4 describes in detail our methodology for smart-building access control using a graph model for reasoning, and blockchain smart contracts for managing access. Section 5 examines the implementation of the proposed work along with use cases in which the proposed solution can greatly enhance the authorization and access control procedures in a real building. Section 6 evaluates the performance of the proposed solution in terms of throughput and delay. Section 7 presents practical considerations for using blockchain-based access control. Section 3 discusses related work on authorization and access-control solutions developed for the built environment. The paper concludes with an overview of the key contributions of our work and our plans for future work in Section 8.

BACKGROUND
We review key concepts and technologies on which our method relies in this section. Access-control privileges are managed through smart contracts implemented on a private Ethereum blockchain [11]. The reasoning process producing the smart contract as a sequence of doors, spaces and devices accessible to the visitor relies on the building's information captured in the BOT and Brick models.

Access-Control Paradigms
Access control regulates what resources users may use, based on their assigned privileges. In principle, there are three general mechanisms for reasoning about what permissions should be given to a user. Extensions to these paradigms include risk-aware access control which associates a cost to providing access, and access control using building information models (BIMs) which incorporates the knowledge of building into access control.
Role-based access control relies on an explicit, and fairly static, list of organization roles associated with privileges. In this model, each user is associated with a role, which entitles them to a set of privileges corresponding to their role(s) [36]. Commercial buildings usually host multiple organizations, each of which defines its own role hierarchy which is relevant to the areas of the building that it occupies; as a result, there is no single role hierarchy that pertains to the building as a whole. Furthermore, often times there is no single central authority who can manage roles for all building spaces.
Risk-based access control is a model where users are granted access to resources based on a scoring function that dynamically and contextually quantifies risk implicit in this privilege [23]. This approach to access control is more relevant in dynamic environments, where the specific context of the access request should inform whether the request may be honored or not. Buildings are not that dynamic and, in principle, a more explicit, less contextual, access-control mechanism is desirable.
Attribute-based access control grants access rights to users through the use of policies that combine together (with logical operators) different user, resource, object, and environment attributes [41]. In our work, we adopt this paradigm to develop a cost function that represents the sensitivity of building spaces based on their function and equipment they contain. A room with many control points, occupied by an employee in a position of authority in the organization, is more sensitive (and is, therefore, associated with a higher cost) than the building's reception for example. In principle, this cost function enables access-control policies to be defined based on sensitivity ranges. It also enables one to reason about the relative sensitivity of spaces and rationalize the access-granting process.
2.1.1 Risk-Aware Access Control. In risk-aware access control, a risk (defined by a cost function) is associated to each user who wishes to access resources. It is then compared against a predetermined threshold, before the user is granted access. This differs from traditional access control models that have predefined policies set for granting access and can be more permissive. The problem arises when "low-risk" users are automatically granted access to resources that were never intended to be accessed by them. In this work, instead of associating risks to users, we adopt a cost function to help develop access control policies where the acceptable risk level can be defined a priori.
Several cost functions have been proposed for access control. Chen et al. [14] propose cost functions for defining risk that incorporate the trustworthiness of a user, the degree of competence of a user with respect to a particular user-role assignment, and the degree of appropriateness of a permission-role assignment for a given role. Salim et al. [35] consider the monetary value of a resource or an inferred impact of misusing it (when monetary value is unavailable) as a basis for their cost function. Bijon et al. [9] propose a risk-based access control framework that incorporates the quantified risk for granting access and specific thresholds calculated based on attributes, purpose, and situational factors. Inspired by these cost functions, we take semantics and relationships of spaces and resources into account when defining the amount of risk associated with accessing spaces and resources therein.
2.1.2 BIM-based Access Control. Access control policies can be developed leveraging BIM. Skandhakumar et al. [39] provide a review of spatio-temporal access control models and propose an authorization framework that involves (a) modeling of spatial data in BIM, (b) creation of access policies based on BIM, and (c) authorization of these policies. In particular, the authors introduce 'contains', 'connected', 'adjacent', and 'accessible' relationships between building elements which are accounted for when reasoning about access policies. To capture the relationships between spaces in a building, BIM is transferred to a graph model in [37]. Despite the novelty of this model, it does not incorporate concepts such as sensors, actuators, and building subsystems which can be affected by people who are given access to the building spaces. To specify access control policies, the use of 'eXtensible access control markup language' (XACML) is proposed in [38]. XACML is a standard language for specifying and evaluating access requests. Our proposed smart contract solution is similar to XACML in that we separate authorization across different services and provide a template smart contract to execute access requests.

Blockchain and Smart Contracts
Blockchain is a distributed and shared ledger that serves as an irreversible and incorruptible public repository [27]. It enables the occurrence of a particular transaction without requiring a central authority. Compared to traditional database systems, it offers three major advantages: • As a distributed system, blockchain eliminates the need for a costly infrastructure that relies on prox cards for occupants and requires one of these occupants (or dedicated security personnel) to escort visitors to their meeting locations using their own prox cards. • Blockchain does not require a trusted third party to certify transactions, thanks to public-key cryptography and a consensus mechanism. This allows digital transactions to occur between parties that do not have pre-established trust relations, i.e., trustlessness. • The state stored in blockchain is immutable due to the use of cryptographic hash functions.
A smart contract is executable code that runs on a blockchain to facilitate, execute, and enforce the terms of an agreement between different parties. It can also be used to encode an arbitrary state-transition function. Each contract is assigned a unique address. Users can send a transaction to this address for execution. A callback function is executed when a transaction execution request is received. If the transaction is successfully completed, the contract's state is updated. Otherwise, any changes made to the state are reverted.
The development of smart contracts is supported by many blockchain platforms, Ethereum [11] being the most well known and, perhaps, the most broadly adopted one. Ethereum provides an abstract foundation layer for smart-contract development: a blockchain with a built-in Turingcomplete programming language for the specification of smart contracts, with arbitrary rules for ownership, transaction formats and state-transition functions. Ethereum has its own cryptocurrency called ether and an internal currency to pay for computations and transaction fees called gas.
Drawing on [2] that argues for democratized access to the physical resources in buildings using a blockchain, we utilize a private Ethereum blockchain to store the authorization graph of a specific building. Executing a transaction (e.g., for adding or revoking users' accesses) leads to a state change and updates this graph. The delegation of trust can be performed by any user without communicating with a central authority. The state can be read from the blockchain to verify access for any user at any time.
Our proof-of-concept implementation uses a private Ethereum blockchain over a public blockchain for performance and privacy reasons 1 . The private blockchain network is comprised of several nodes representing different groups within an organization or different organizations housed in the same commercial building. Compared to a centralized access control system which runs a private server, it provides better transparency, availability, and robustness; there is no single trusted entity and no single point of failure, the integrity of access-related data is always maintained and tenant organizations can easily audit transactions. Although privacy is easier to achieve in centralized systems, the private blockchain helps preserve privacy to some extent as only specific nodes within the organization are allowed to connect to the network. We note that private permissioned blockchains, such as the Hyperledger Fabric, and hybrid blockchains could provide advantages similar to a private Ethereum blockchain and can be considered as alternative solutions.

Building Models
The lack of a common representation for buildings has historically hindered the development of portable building applications. To address this issue, several standards for modelling building data have been conceived in recent years, examples of which are Project Haystack [1] and Brick [6]. The Brick schema [6] defines an ontology for describing the various building spaces and subsystems, their components, and relationships between them. It defines three types of entities: locations, equipment, and points. Locations are hierarchically organized, in terms of buildings, floors, and rooms. Equipment may be composed of many parts and may be connected to other equipment with certain functional relationships. They comprise complex building subsystems, such as HVAC, lighting, and plumbing. Sensors and setpoints are two types of physical points that can generate timeseries data and are used in control loops of different equipment.
Brick describes a building through a collection of triples (subject -predicate -object), following the Resource Description Framework (RDF) data model. Each triple consists of two entities connected with a relationship, which can be feeds, controls, hasPart, hasPoint, or isLocationOf. The collection of such triples forms a directed graph, where nodes represent the entities and edges represent the relationships between them. Figure 1 shows a subset of Brick entities and their relationships in an example building. The RDF syntax allows for using SPARQL (the RDF query language) to reason about various entities and relationships. For example, it is possible to retrieve sensors and control points that are located in a specific room or floor of a building, and are used to control the operation of a given Variable Air Volume (VAV) system.
Despite the effort to make Brick expressive enough to capture all important relationships between different building entities, it does not capture the adjacency relationship between different spaces in a building. This information is essential for building applications such as indoor path planning. The Building Information Model (BIM) [40], which supports computational methods for designing and constructing buildings, captures information about the building interior layout and adjacency of rooms, but unlike Brick, it lacks mechanisms for describing functional relationships between different entities [6]. BIM has been traditionally represented using the Industry Foundation Classes (IFC) [7] data model designed to facilitate interoperability in the building industry. BIM exhaustively describes composition of building subsystems, it leads to unnecessary complexity when capturing information about a building. This has motivated the Linked Building Data (LBD) Community Group 2 to create the Building Topology Ontology (BOT) [32]. BOT is a minimal ontology for describing the spatial structure of a building. It defines three types of entities, namely zones, elements, and interfaces, and captures relationships, such as adjacency and containment between these entities. Zones are hierarchically organized in terms of sites, buildings, storeys, and spaces, which are spatial 3D divisions used to model rooms. Elements are physical building components such as doors and walls. An interface is the surface where two elements, two zones, or an element and a zone meet. A subset of BOT entities and their relationships are depicted in Figure 1 for an example building. Aligning BOT with Brick allows for creating a unified RDF model of building's structure and equipment, thereby enabling the use of SPARQL to reason about the sequence of doors and rooms that need to be traversed to go from one location to another location in a building, and equipment that can be accessed in these rooms.

RELATED WORK
Conventional methods for authentication, authorization, and revocation rely on a trusted central authority. For example, the existing authorization method LDAP [43] uses Role-Based Access Control (RBAC) with a single central authority. Kerberos [28] and Jabber [34] are similar in that respect. Several systems are also developed to eliminate the central authority, examples of which are CCN [21] and the Web of Trust [12,13]. They adopt a decentralized peer-to-peer trust model in which a principal, denoted by a public key, can publish a signature of another public key to denote trust. SmartTokens [18] relies on a token-based access control system for NFC-enabled smartphones, in which the delegation of access to other smartphone users can be accomplished without a central authority. Although SmartTokens uses symmetric cryptography, users need to present all delegated tokens through the delegation chain in order to be verified. In recent work [26], a lightweight distributed authorization protocol is proposed supporting delegation of access right to a smart device in the form of a Bloom filter. This method of delegation uses secured hashing to prevent the permission from being forged.
RBAC-SC [15] performs role-based access control using blockchain and a challenge-response protocol for authentication. FairAccess is a cryptocurrency blockchain-based access control framework [30]. This work is different from ours as a distinct smart contract is created for the access control policy of every resource-requester pair. Furthermore, they include the IoT devices in the blockchain, whereas there are IoT devices that do not have the capabilities to run the blockchain on them. In another line of work, a distributed architecture called ControlChain is proposed [31]. ControlChain enables the expression of a wide variety of access control models, such as RBAC [19], OrBAC [22] and ABAC [20], deployed on IoT. This mapping is enabled due to the use of a Decoder entity that automates the translation of access control model and rules to their supported mechanisms. However, none of the these decentralized systems addresses how building metadata can be linked with smart contracts to extend access control to spaces and equipment in the building.

Access Control in Buildings
Using smart contracts for authorization and delegation of trust was originally proposed in WAVE [2]. WAVE uses smart contracts and blockchain as a global ledger for all authorizations, Delegation of Trust (DoT), and revocations, guaranteeing that all participants know the current state of all permissions. The same transparency is achieved by our work. WAVE also supports out-of-order and non-interactive delegation, which is replicated in our smart contracts. In [4], the authors' experiments reveal that a Blockchain-based access control system will not scale to a global size. They state that Blockchain introduces about a minute of latency when adding objects to Ethereum. However, with a private blockchain for a small number of buildings, our solution works well as described in our implementation since managing permissions is infrequent as compared to accessing permission data. Also, the calendar application helps provide access well in advance, reducing the effect of latency. To address the scalability issue that may arise in a large campus comprised of several commercial buildings, other access control methods could be considered in future work.
BOSSWAVE [3] builds on WAVE to provide democratized access to the physical resources in buildings. Our system is similar to WAVE in that they both leverage blockchain technology. However, using smart contracts for authorization to spaces and doorways apart from building subsystems and equipment is novel in this work. We develop APIs to help interact with the smart contracts; this will define fine-grained access control for any type of user.

METHODOLOGY
Our access-control methodology involves four steps: (1) creating a unified RDF graph of a building by aligning the building's BOT and Brick models; (2) identifying all possible paths between two locations using a graph traversal algorithm which is implemented by a sequence of SPARQL queries; (3) determining the cost of each path by running a number of SPARQL queries; (4) granting, revoking, and verifying user permissions to access rooms and equipment therein using smart contracts. These steps are implemented using three services [16]: • Building-Representation Service determines the cost of an indoor-path using information captured in the Brick model. • Path-Planning Service relies on the BOT model to find all possible paths between two given locations. These paths are presented to the user along with their costs, enabling the user to choose a desired path. • Access-Control Service specifies a smart contract, given a delegator, a delegate, a path corresponding to a sequence of building spaces and doors between them, and a time period during which the delegate should be able to access the resources on this path. It also handles validation of a delegate's authority to access a door, at run-time.
Below we explain our methodology using an application scenario and discuss how the above services facilitate this application.

An Illustrative Application Scenario
Consider a simple application scenario, where a group of individuals are invited to a meeting that takes place in a specific room of an office building. The process starts with a calendar invitation created by the meeting host, listing the invitees using their email addresses, the room where the meeting is to be held, and the time when it is to take place. The first step is to examine whether the invited individuals are known to the access-control service: if not, new entities need to be created to represent their credentials (Section 4.4). Next, the possible paths in the building to reach the meeting room are computed (Section 4.2). In this paper, we only consider the problem of indoor path planning, from a main building entrance to a meeting room; nevertheless, our methodology can be extended to the overall problem of planning a path from each individual's location, taking into account their route preferences and parking needs, as long as the relevant information is captured by some geospatial model. Each of these indoor paths is presented to the meeting host along with a cost that represents the overall risk of giving the invited individuals access to the rooms located on this path (Section 4.3) and the building elements (equipment, sensors, and setpoints) that contribute to it. The host reviews the possible paths and selects the preferred pathway, which is by default the path that has the lowest cost. The selected pathway is then transformed into a smart contract (Section 4.4), where the meeting host delegates each invitee with the necessary privileges to access the various doorways on the path, and a personalized QR code (akin to a boarding pass) is generated to represent each contract. These QR codes are shared with each participant in the calendar invitation. Before the meeting occurs, each meeting participant arrives to the building and scans their individual QR code to open doors on the path from the building entrance to the designated meeting room. Each QR code scan invokes a request to the Ethereum ledger (Section 4.5) to verify that the bearer is authorized to access the corresponding door at the present time, given that they have already opened some other doors in a the order pre-specified by the indoor path selected by the meeting host. If the meeting host has access to these rooms and had authorized the meeting participants to access these rooms before the meeting, the access is verified and a control signal is sent to the actuator, i.e., the electric door strike, to open the door. The process repeats for each door along the path. We elaborate on these steps in the following.

Building Modeling for Access Control
The first step of our methodology is to create the BOT and Brick models of the building (if they do not exist already) and align them to create a RDF graph queryable via SPARQL. This RDF graph represents the relationships defined in both Brick and BOT. It allows for identifying pathways in the building using a graph traversal algorithm and quantifying the cost-sensitivity of each pathway. Figure 2 depicts the floor plan of an example commercial building occupied by a single organization. We manually converted this floor plan into a RDF graph model of the building based on the BOT ontology 3 . This model describes the building's topology in terms of where rooms, doors, walls, and other physical elements are located and their adjacency relations. The left panel of Figure 1 shows a small subset of nodes in the resulting RDF graph: two rooms of type Zone (subclass of Space) and a door between them of type Element. Each room is connected to the door with the adjacentElement relationship.
Similarly, we created the Brick model of the building in RDF. This involves extracting point names and their types from the BMS, inferring functional relationships between different equipment, and identifying their location from blueprints of the building. The middle panel of Figure 1 shows a small subset of nodes in the resulting RDF graph: two rooms and a HVAC zone of type Location, a VAV system of type Eqipment, and a temperature sensor, a temperature setpoint, and a reheat command of type Point. The VAV system is connected to the HVAC zone with the feeds relationship, as it supplies air to this zone. The HVAC zone is comprised of the two rooms, so it is connected to them with hasPart relationship. The temperature sensor and setpoint are located in one of these rooms and are therefore connected to it via isLocationOf relationship. The reheat command is computed based on the difference between the measured and setpoint temperatures and is used to actuate the VAV system; thus, the temperature sensor and setpoint are connected to the command via controls relationship, and the VAV is connected to all three of them via hasPoint relationship. Once the Brick and BOT models are created, the next step is to align the two models that is to ensure the entities corresponding to the same building location (e.g., room) in Brick and BOT models are the same in both sets of triples. Otherwise, it would be impossible to reason about which pathway enables access to which equipment, which is necessary for establishing our cost function as discussed in Section 4.3. To this end, we identify syntactic entities that represent the same semantic entity in the two graphs and join them to create a new entity. This new entity is a subclass of Location in Brick and Space in BOT and therefore can be connected to entities defined in both Brick and BOT. The borders around Room_1-1-120 and Room_1-1-121 in Figure 1 show the new entities created by merging respective entities in Brick and BOT models.

Quantifying Sensitivity of a Space
The issue of facility security is quite complex, especially when buildings house expensive or sensitive equipment. Intuitively, the characterization of the sensitivity of a space in terms of standard zones defined in Section 4.3.1 considers the activities taking place in the space and possibly the role of its occupants, but it does not consider the equipment housed in, or accessible through, the space. This is why, our access-control methodology proposes a composite sensitivity function for each space that integrates information about (a) equipment and subsystems a user may be able to potentially control by accessing this space, (b) sensor readings a user may be able to read by accessing this The RDF model of the building can be used to annotate each building location with its sensitivity level. We assume that there are some broadly shared and agreed-upon principles for quantifying the sensitivity of locations. This is a realistic assumption in this domain; in our work, we have adopted the 'Hierarchy of Zones' as described in the 'Operational Security Standard on Physical Security' of the Government of Canada 4 . We note that similar specifications exist in several other countries, such as the United States 5 and New Zealand 6 .

Defining Sensitivity of Security
Zones. The Canadian standard defines five zones, as seen in Table 1. Access to public zones, such as the grounds surrounding the building, do not need to be controlled. Reception areas may be inaccessible to visitors, except during specific times of the day or for specific reasons. Access to operations zones is limited to personnel who work there and to properly escorted visitors. Security areas are limited to authorized personnel and to authorized and properly escorted visitors. Finally, high-security areas are limited to authorized, appropriatelyscreened personnel and authorized and properly-escorted visitors. The standard advises that both security and high-security zones should be monitored 24 hours a day, and that zone levels should be accessed in order, i.e., a high-security zone can only be accessed from a security zone.
We use the Zone entity in BOT to model different security zones that exist in a building. Consider for example the rooms 1-1-100, 1-1-101, 1-1-102, 1-1-112, 1-1-114, 1-1-144, 1-1-150 in Appendix A.3. Rooms 1-1-102, 1-1-101, 1-1-100 are considered as reception zones, since they are the locations that visitors can access when coming from a public zone without any credentials. Room 1-1-112 is considered an operations zone, as only employees are allowed to access the area with proper credentials. Connected to room 1-1-112 is room 1-1-114, which is considered to be a security zone, as it is physically restricted from room 1-1-112 and additional credentials are required to access the area. It should be noted that room 1-1-114 must be accessed from room 1-1-112, as a security zone should only be accessed through an operations zone. Room 1-1-144 is an example of a high-security zone that must be accessed from room 1-1-150 which is classified as a security zone.
To quantify the sensitivity of the five security zones mentioned above, we map them to an ordinal scale of 0 to 4, with 0 being a public zone, which is not at all sensitive, and 4 being a high-security zone, where access should be carefully controlled. We choose the ordinal scale because the order of security zones signifies their relative importance (e.g., a high-security zone, labelled 4, is more important than a public zone, labelled 3). Thus, each room/space in the building is associated with the cost of its zone.
SELECT ?entity ?x WHERE { ?entity rdfs:subClassOf ?x . ?x rdfs:subClassOf brick:Point . } Fig. 3. We obtain all the point types based on the following SPARQL query which obtains the first sub-class of the brick point class in the graph model Building subsystems and points should have different sensitivity costs assigned to them. This is because some subsystems may control more critical aspects of a building (e.g., the lighting system is less critical than the HVAC system), and some points in a subsystem may be more important than others (e.g., using the thermostat to adjust the temperature setpoint is more impactful to the building occupants than simply reading the value of a temperature sensor).
To account for the fact that some equipment and points are more sensitive than others, we used the Analytic Hierarchy Process (AHP) [33] to create a suitable scheme for weighting the sensitivity of each type of equipment and sensing/control points. AHP is a decision-making technique that can be used to prioritize the attributes relevant to a decision-making task: by pairwise comparing these attributes, it helps stakeholders decide on the importance of each attribute relative to others. It has been used for a wide variety of applications, including assessing risk in operating pipelines [17] and quantifying the overall quality of software systems [25]. In principle, this process should be undertaken by facility-management personnel in collaboration with building owners and occupants. For this work, we answered the questions specified in Appendix B.1 on the scale defined in Appendix B.2 to develop a list of weights for all types of points (sensors and setpoints) in our model. These weights are shown in Table 2.
In addition to its type, the sensitivity cost of a particular piece of equipment or a sensing/control point depends on what other, and how many, physical components they could impact. This intuition is illustrated in Figure 1. In this figure, Temperature_Setpoint_1-12 is a Point element of type Setpoint and Temperature_Sensor_1-12 is a Point element of type Temperature_Sensor. These are points of the VAV_1-12 Equipment and are both located in Room_1-1-121. VAV_1-12 feeds fresh air into HVAC Zone_1-12 which is of type Location. Room_1-1-120 and Room_1-1-121, which are also of type Location, are parts of the HVAC Zone_1-12. In estimating the sensitivity of this room, we argue that one would have to take into account the fact that VAV equipment can be impacted by the actions of the room occupants, who may read the Temperature_Sensor_1-12 value and control the Temperature_Setpoint_1-12. Thus, Room_1-1-121 is more sensitive than Room_1-1-120 and occupants need to be aware of this when granting permissions to other occupants and visitors.

Defining Sensitivity of an Indoor
Path. Finally, the overall sensitivity cost of a potential indoor ℎ is calculated as the sum of all the costs of the rooms it includes based on their security zone classification, plus the costs of all points located in the rooms . The total cost of each point is initially assumed to be the value of 1, and increases with the number of rooms affected by point . Furthermore, the cost is scaled by weight( ), the sensitivity of the point as established through the AHP process and seen in Table 2. This intuition is captured by the following function: where ℎ is a sequence of rooms , sensitivity( ) is the numerical value of security zone classification for room , is a point (e.g., a setpoint or a sensor) that is part of a subsystem, weight( ) is the weight given to point (determined by AHP), and control( ) is the number of locations or zones affected by point . For example, in Figure 1, we see that Temperature_Setpoint_1-12 has control( ) = 2 as ambient air temperature of two rooms would be affected by adjusting this setpoint. A complete calculation for the costs of Pathway 1 and Pathway 2 can be found in Appendix A.4.
It is important to explain here the role of the building model in computing the path-sensitivity cost function above. We have developed a set of SPARQL queries based on the building's RDF model (see sub-graph in Appendix A.1) to compute: • the sequence of adjacent rooms leading from one location to another, e.g., the main building door to the meeting room; and • the set of points located in a room, their types, and the locations they influence through control. We seek to answer the following questions with SPARQL queries in the namespaces found in Appendix A. The two queries above are repeatedly invoked, starting with the building's main entrance as < > to find an adjacent door or room ? using the query from lines 1-2. For each of the ? s, if ? is a door, then the query from lines 3-4 is executed next using ?
as < > to find more doors or rooms. Otherwise, the query from lines 1-2 are repeated with the ? as the new < >. This process is repeated until the destination meeting room < > has been reached. Note that when a query returns multiple rooms or doors, we need to repeat this process for each of them separately. Using these two queries allows the Path-Planning Service to perform a recursive depth-first search by finding adjacent resources to each 'Room'.
Q2 -what is the sensitivity of a location based on its security zone classification?  15 ?equipment bf:feeds ?zone . 16 ?zone bf:hasPart ?location . 17

}
The first query from lines 1-7 determines the points that are located in <location> and their types (subsubtype = Temperature_Setpoint and subtype = Setpoint). The second query from lines 9-16 decides whether the point influences any other locations by determining the equipment of the command that the point controls and seeing if the equipment feeds any locations. These queries are executed by the Building-Representation Service to determine the cost of an indoor-path.

Managing Smart Contracts
Upon selecting an indoor path that meeting participants can follow to reach the meeting room, a smart contract must be specified and run by the Access-Control Service to authorize the participants to open the required sequence of doors and access certain spaces shortly before the meeting starts. Users who already have access to (some of) the building's systems and spaces can delegate access to other individuals. This creates a tree-like structure of an authorization graph, as depicted in Figure 1. This implies that the process has to be bootstrapped with some original space manager(s), e.g., the Building Manager in Figure 1. Traditionally, they might be the building-security personnel, or (some of) the long-term building occupants.
In our application scenario, the meeting host (the delegator in Figure 1) is assumed to have access to the whole floor (including Room_1-1-120 and Room_1-1-121) and can thus delegate access to the spaces and doorways in the path leading to the meeting room (i.e., Room_1-1-120). Hence, the delegator grants the meeting participant (the delegate in Figure 1) access to all the doors and rooms in the path they have selected, which implies that all the rules mentioned in the smart contracts should be satisfied for the delegation to succeed. To that end, the delegator first uses the smart contract to create a new unique entity for the delegate, assuming that she is not already known to the system (otherwise the existing entity is used to add a new access rule). Each entity is a node in the authorization graph, therefore creating a new node for Visitor B. The delegator provides the delegate's address, which is the public key of the delegate, along with the sequence of permissions implicit in the chosen path and the period during which these permissions should be valid, in effect, a period covering the meeting duration. If no failure is encountered in the creation of entity and all the requirements of the contract are fulfilled, a valid entity is created for the delegate.
Next, a new access rule has to be created, containing the delegator's entity (the meeting host) as the source, the delegate's entity as the target, the expiry time after which the access rule will become invalid, and the list of resources that the delegate is allowed to access. This creates the relationship between two nodes, Occupant A and Visitor B in Figure 1, i.e., the delegator and the delegate, which describes the access rule. The list of resources received from the Path-Planning Service are stored in the order they should be invoked, starting from the building's main entrance and concluding with the meeting room. At run time, the in-order access of the list of locations and doors is evaluated, which helps the delegate to navigate in the right path. The destination and equipment that can be accessed by the delegate are also stored.
Once all the requirements to create a new access rule in the smart contract are fulfilled, a successful transaction is executed. A failure would revert any changes that were made to the contract's data.
An important advantage of smart contracts is the flexibility they afford in the revocation process. Once a smart contract has been issued to authorize a delegate with access to some spaces, it cannot be deleted; the blockchain is immutable and anything stored on the blockchain as a transaction cannot be deleted. To revoke this authorization, the access rule assigned to that user must be made invalid. Similarly, to remove a user from accessing any system or space in the building, for instance when an employee leaves the organization, the entity belonging to that user is made invalid. This is enough to make sure that this user can no longer access building spaces and equipment therein. Once a rule or entity is made invalid, it can no longer be reused for the same address of the delegate.

Checking Credentials at Run-Time
Upon arrival, when the delegate tries to access any space or equipment, the data from smart contracts need to be read by the Access-Control Service to validate whether the delegate's credentials authorize them to access the spaces they attempt to access. To that end, the access rule assigned to the delegate is read from the blockchain. From this data, the duration and validity is first checked. If the access rule is valid, the set of accessible resources assigned for the delegate are checked and the permissions granted to the delegate, as a part of the access rule, are verified. If the requested action is included in the set of permissions and the requested resource is included in the set of accessible resources, then the user will be allowed to access the requested resource. Similar is the case for accessing points and equipment. In order to read or modify the temperature setting in the room, the accessibility needs to be checked and the smart contract decides if the requested action can be taken.

IMPLEMENTATION
In this Section, we describe the prototype implementation of our methodology on our own private blockchain using the Ethereum network. Ethereum is a blockchain platform that includes a Turing complete scripting language called Solidity for building, deploying, and implementing smart contracts. These contracts have no restrictions in terms of size and are stored in the blockchain. Our methodology relies on three smart contracts, namely Archives, Implications and Exclusions. They are defined as follows: • The Archives contract manages and stores the entities and access rules for each user. Any creation or deletion of entities or access rules leads to a state change. The state of the Archives contract is read to verify access.
• The Implications contract cross-verifies the validity of access rules and processes the path resources that should be accessible to an entity for a specific access rule. A state change takes place only when a new rule is created. • The Exclusions contract is used when the delegator chooses to provide a list of all the resources that the delegate is not allowed to access, even though they are in spaces that the delegate is allowed to reach. These smart contracts are compiled and deployed using scripts. For each contract, a unique bytecode and contract address is created. The contract address is used to access a contract in the private blockchain network, either from external functions or from another smart contract. An API, illustrated in Figure 4, enable the client applications, such as our meeting-planning example scenario, to interact with the deployed smart contracts. The API exposes a number of operations, receiving (or producing) JSON objects as input (or output).

Adding a New User
As shown in Figure 4a, the delegator provides the address of the delegate to the meeting-planning application to create a calendar invitation. This address is used to verify if an entity exists already for the delegate, or a new entity needs to be created by the Access-Control Service 7 . The start and expiry times for the entity should also be provided by the delegator. If no expiry time is specified, the implication is that the contract is valid for the foreseeable future until it is explicitly revoked. In our application scenario, meeting participants should only have access to the building for a specific time period. Hence, the expiry time must be provided.
In addition to the delegate's address, and start and expiry times, the set of permissions that the delegator intends the delegate to possess must be provided as input to the API. These include read (for accessing sensor measurements) and write (for changing the value of a setpoint) permissions for points and equipment resources. The permissions set also includes a flag to indicate whether the new delegate entity is allowed to further delegate access to other users. The meeting-planning application interacts with the Access-Control Service, providing the required information as depicted in Step 3 of Figure 4a. This information is sent to the Archives contract to create a new entity. The contract checks validity of the input and creates an entity for the given delegate's address.
Once all the checks of the smart contract are successful, the delegator has to sign the transaction using their private key. Any failure in the transaction would revert all the changes made. If a valid response is not returned from the smart contract, the entity is not created for the delegate. The API reads the transaction hash received from the contract's callback function and finds out whether a valid entity was created for the delegate. Every entity created has a unique address assigned to it.

Adding a New Access Rule
After creating a new entity for the delegate, the delegator can proceed to create an access rule, based on the spaces and equipment resources that the delegate is authorized to access. In our application scenario, the meeting participants must be allowed to access all spaces they need to go through to reach the meeting room, and all sensing and control points located in this meeting room. This is exactly the information that the path-planning queries Q1 and Q3 deliver (refer to the discussion in Section 4.3.3). If the delegate is already known to the system and has previously had  access to some resources in the building, access must only be provided for the additional spaces that are on the selected path. The delegator has two options with respect to the various points located in the destination room: (a) they may authorize the delegate to access all of them, except an explicitly excluded set, or (b) they may include all of them in the contract (default behaviour). The Exclusions contract is used to implement the former. The permissions set mentioned in the previous section determines if the delegate can read sensor measurements or write control setpoints in the destination space.
The smart contract's function requires information such as the delegator's and delegate's addresses. The contract verifies the entities through these addresses. In addition, the contract checks if the delegator's entity has the permission to grant access to new users.
For each access rule, the Path-Planning Service provides a list of resources for the delegate to access as shown in Figure 4b. This list is generated when the delegator selects a path (likely the one that has the lowest sensitivity cost). The associated list of path resources and inaccessible equipment (that could be specified by the delegator) is stored with the Implications and Exclusions contracts. These contracts identify a unique access rule using its hash. The two contracts are called from the Archives contract when a new access rule is being created to add the path resources and excluded equipment list. In our application scenario, the Implications contract defines the order in which the visitor should access the doors to reach the meeting room. But if access is being granted for an occupant, there needs to be no restriction on the order of the path that should be followed. This processing is also done by the contract apart from storing the list.
Other parameters required by the contract's function include the start and expiry times for the access rule being created and the main or destination resource, as in Step 5 of Figure 4b. All the fields are packaged into the request in JSON format. The API runs a callback function to the smart contract to create the new access rule with the provided fields. The access rule is uniquely identified with a hash created using the delegator and delegate's information. The Archives contract is called to create the access rule. It verifies the entities, checks the granting rights of the delegator, and also validates that such an access rule was not defined earlier and is a new access rule for the delegate.
A valid access rule is created with the required fields as shown in Steps 6-7 the delegator signs the transaction using their private key. If the response returned from the smart contract is not a success value then the new access rule for the delegate is not created. The API reads the transaction hash received from the callback function of the contract and responds if a valid access rule was created for the delegate.

Verifying User's Access Privileges
While accessing a resource, the existing entities and access rules are read from the smart contract. It is important to note that the run-time verification of the user's credentials simply queries the private blockchain and does not cause a state change. Thus, it does not require any "gas" (i.e., has zero transaction fee). However, creating a new entity for the delegate or adding new access rules costs a specific amount of "gas" since they result in state changes on the private blockchain.
When the meeting participant arrives to the building and tries to access a specific resource, e.g., the meeting room, a request is sent to the API endpoint to verify if they indeed are authorized to access this resource. As in Steps 1-2 of Figure 4c, the API request requires the entity and access rule of the delegate, the resource name, and the action to perform. The state of the smart contract is read to retrieve the details of the entity and access rule for the delegate. The functions of the smart contract check the validity of the entity and access rule, and verify its start and expiry times. Next, the permission set is inferred from the entity, the main resource, the implication and excluded resources are found from the access rule. This process is described in the Figure 4c.
After receiving this data from the contract, the requested resource is looked up in the implications and excluded resources. If it is not found, a query is invoked (Q3 in Section 4.3.3) to identify all the resources related to the main resource with the required type of relationship, shown in Steps 3-4 of Figure 4c. If the requested resource is included in the returned resources, then the delegate has access to the requested resource. Otherwise, the delegate is not authorized to access the requested resource.
If the resource is equipment or a point in Brick, then the permissions from the delegate's entity are verified to see if they can read or write (control) the requested resource. Once the validation process is completed, the API returns a JSON response indicating whether the requested action is allowed or not. Since these actions do not need to be mined, they are performed immediately without any delay.
Similarly, whenever a visitor enters the building through the main door, they have to follow the path to which the access was provided. Hence, the delegate has to follow a sequence of doors in order to reach the destination room. For this, the smart contract function reads the set of implications A user pointer is used to store the current location of the delegate. When a delegate tries to access a resource present in the set of implications, the pointer's current value and the requested resource are verified in the sequence of the path. If the order of requested access matches the path, the delegate is allowed to unlock the door through hardware control of the smart lock. If there is a mismatch, it would imply that the delegate has either tried to enter a wrong door or has skipped a door on the way. This method enforces that the delegate follows the path he is supposed to and not get lost on his way to the destination.
The time to access the implications should also be considered when specifying the start time. For instance, access could be provided to the delegate 30 minutes in advance so that they can come in early and reach the designated room. Requests invoked to check access for a user at different stages are logged. In future work, we plan to add new smart contracts for tracking the number of times the state of the contract is read to verify access to a certain zone, and the users who requested access.

EVALUATION
We simulate a number of concurrent meetings in the example building depicted in Figure 2 to evaluate the performance of the proposed system in realistic scenarios. This building has five conference rooms that could be used to hold meetings in parallel. To create different load levels, we consider 3 types of days: busy, average, and quiet days. We assume that there are more concurrent meetings with more participants on a busy day than an average day or a quite day. For each type of day, we model the number of meetings held in each conference room by a Poisson process. Hence, the intervals between successive meetings held in the same conference room are exponentially distributed. We assume that the duration of a meeting could span from 60 minutes to 150 minutes, so we sample the length of each meeting from this uniform distribution.
The next step is to model arrivals and departures of meeting participants. We consider a window of 30 minutes before the meeting starts and after it ends, and use a Poisson process to simulate arrivals and departures in these two windows. Figure 5 shows example schedules for all meeting rooms in the 3 types of days we considered. The color intensity depicts the number of participants of each meeting; the darker the color is the more people attend the meeting. Figure 6 shows the cumulative number of people in the building throughout the day for the 3 types of days. We have a maximum of around 70 meeting participants on busy and average days, and a maximum of 30 meeting participants on quite days.
When access is delegated to an attendee, the paths to these meeting rooms are received from the path planning service. Accordingly, we calculate the number of requests a participant makes to receive and verify access. The average number of requests is between 4.5 and 5.5 requests per participant in our simulations.

Analyzing Delay and Cost
Performance evaluation is done on a private blockchain network consisting of 2 mining nodes. The API sends simultaneous and parallel requests to these nodes and transactions are executed by the miner nodes. We measure the latency of transactions as perceived by the user, i.e., the time between the user issuing a request to the access control service and receiving a response from the service. As described in Section 5, the access control service interacts with the blockchain mining nodes to issue transactions. Table 3 describes the average delay for adding a new entity for a user unknown to the system and adding access rules for each participant of the meetings to the blockchain. It also shows the cost associated with transactions to add new entities and access rules. At the time of evaluation, one ether was equal to approximately 143.68 USD. We now present the distribution of delays obtained for verifying user's access privileges, e.g., when meeting participants arrive to the building. Our simulations indicate that this type of request is completed between 0.26 and 0.37 seconds. Thus, we can expect a maximum delay of 0.37 seconds to decide whether or not to grant an access request. This delay is within the acceptable range in real applications.

Scalability
Lastly, we increase the number of mining nodes in the private blockchain network from 1 to 4. We consider two performance metrics, namely throughput and average latency, and we measure performance as the system load (the total number of transactions) increases in each case. We assume that transactions are evenly distributed among the nodes in the network. Figure 7 shows the performance evaluation results obtained from 5 independent runs for an average day schedule. It can be seen from the figure that (a) the average latency decreases in most cases as we increase the offered load, and (b) throughput increases linearly with the offered load until it reaches a maximum, which depends on the number of nodes. When the load exceeds this threshold, performance starts to fall apart. Observe that increasing the number of nodes improves performance in terms of both throughput and latency in general. With 4 nodes in the blockchain network, according to Figure 7, we can handle around 2400 requests per minute with an average latency as low as 30 milliseconds.  [24] build a tool, called 'Hawk', which helps developers create privacy-preserving smart contracts without the need of cryptography. The tool is responsible for compiling smart-contract code to a privacy-preserving version. Watanabe et al. [42] propose encrypting smart contracts before deploying them to the blockchain network so only those participants who have the key can access the contract's content (i.e., the state). Bernable et al. [8] provide a comprehensive review of privacy preserving blockchain approaches. For example, secure multi-party computation splits the smart contract between a number of parties with secret keys to compute parts of the smart contract so that a complete picture of a smart contract is not given. Zero-knowledge proofs can provide verification of smart contracts without revealing any information except for the proof to be true; this process can be quite costly. Commitment schemes allow for proofs to be verified with minimal disclosure of secrets. Mixing is also an option where transactions are hidden by generating additional transactions to create noise and hide the original transaction. Furthermore, user privacy can also be maintained in a hybrid blockchain solution where identity is managed by an external public blockchain service, while access smart contracts are maintained on a private blockchain. Our proof-of-concept implementation uses a private Ethereum network which addresses privacy concerns to some extent as all participating nodes are within the organization. Nevertheless, any of the above approaches can be implemented on top of our access-control service when the meeting participants and times are sensitive and must be protected from some nodes in the network. Transaction fees: Cryptocurrency fees are a fundamental part of blockchain-based software platforms. In some public ledgers there is a minimum fee required for a transaction to be accepted, which helps avoid unwanted and inappropriate transactions. In our work, the creation of entities and access rules require a fee, which has to be paid by the entity initiating and signing the transaction. However, checking access privileges does not cost transaction fees, which constitute the most common type of operations. When a user tries to access a resource, the API is called to query information from the smart contract and decide whether the requested access is allowed. This can be done from any resource and does not incur any fee. It should also be noted that with a private Ethereum network, the difficulty of the mining process can be decided by the management, and ether could be mined and potentially transferred to the accounts of participating nodes as needed. Block time: Transactions take time to get accepted into the blockchain. However, verifying access privileges does not need to execute transactions to query information from the smart contract's data. The information can be retrieved immediately from the blockchain by the devices when the API is called. Apart from this, the creation of new entities and access rules can have long delays in execution. This implies that users may have to wait for some time till their access privileges are granted, since this process requires the execution of two transactions, namely (a) the creation of a new entity and (b) the creation of a new access rule. To mitigate the potentially long wait times, one might raise the transaction fees for the creation and revocation operations to minimize the time spent adding or removing the entities and access rules into the blockchain network [29].

CONCLUSION AND FUTURE WORK
In this paper we proposed a methodology that supports reasoning about and flexibly managing the access privileges of occupants and visitors in smart buildings. Our methodology combines the Brick and BOT models of a building to plan an indoor path between two locations and determine the path's "cost", in terms of the sensitivity of the spaces it goes through and the equipment contained in these spaces. Furthermore, our method uses smart contracts to manage the space and equipment access privileges of users, at specific times and subject to specific constraints. The unification of RDF graphs that portray building metadata and smart contracts for authorization is done through the use of API endpoints to interact with the smart contracts. We demonstrated through an example use case that the proposed access-control methodology is suitable for managing access privileges in large multi-tenant commercial buildings and can greatly simplify the labor-intensive security protocol that is currently being followed in such buildings.
With small modifications to interact with the actual building's BMS, the system can be extended to enable real-world applications without changing the authorizing smart contracts. Furthermore, incorporating the use of roles instead of individual users receiving access is another extension that we plan to make in future work. Using role-based access control could help group similar types of users into one role and provide them with identical access. For example, all the occupants of an office room with multiple workstations should have access to the same set of physical resources. This approach would be applicable in single-tenant buildings.
Finally, we plan to investigate how to reduce the cost (ether) of using smart contracts. A comparative study of using data from RRS and smart contracts directly will be performed in terms of cost and time. Apart from authorization, authentication, and revocation, it is possible to build several other applications on top of the existing authorizing smart contracts and the building metadata schema, thanks to adaptability and flexibility of the proposed solution.

A.3 Building Security Zones
The classification of security zones is carried out by the building manager based on the function of each room in the example building. Figure 8 illustrates this classification.

B.1 Questions and Answers
We ask questions to compare the importance of different types of Points, e.g., sensors and setpoints. The sensors installed in our example building are temperature, damper position, humidity, and occupancy sensors. The setpoints available in our example building are temperature, humidity, and airflow setpoints. For each set of Points, we do a pairwise comparison of its elements using questions, such as How important/critical is element compared to element in the building?. We answer these questions using the rating scale described in Appendix B.2. Each set of questions achieve a consistency ratio of less than 0.10 as recommended for the AHP process.
For the sensors, we achieve a consistency ratio of 0.024 answering the following questions: • For the setpoints, we achieve a consistency ratio of 0.055 answering the following questions: • How important is Temperature Setpoint compared to Airflow Setpoint? 2 • How important is Temperature Setpoint compared to Humidity Setpoint? 1 • How important is Airflow Setpoint compared to Humidity Setpoint? 1 The resulting weights from answering these questions are shown in Table 2. Table 4. This rating scale is taken from [33] and used to compare two elements relative to each other in terms of their importance. Note that the reciprocal can also be used to compare elements in the other direction.

B.2 Rating Scale
Rating Definition 1 Equal importance 2 Equal to moderate importance of one over another 3 Moderate importance 4 Moderate to essential importance 5 Essential or strong importance 6 Essential to very strong importance 7 Very strong importance 8 Very strong to extreme importance 9 Extreme importance