scieee AI-readable full text Open interactive document viewer

Usage policy control data app for data spaces

Peixoto, Ana Rita Abreu

Abstract

Digitalization has taken over many businesses and industries, as technology is now widely used and preferred over manual work. Therefore, technical devices nowadays contain several sensitive pieces of information that are prone to be shared with others. Consequently, over the years there has been an increasing need to protect our data and to exchange it in a secure and sovereign way, as data are one of the most valuable assets of any industry and business. Therefore, the need to implement systems that prioritize such values emerged, in order to grant continuous monitoring and control over data usage, to keep track of how data is used even after it has been exchanged with other entities. The motivation to consider Data Spaces relies on the fact that it should follow an interoperable and cross-sector approach, offering a reference implementation suitable to every industry and business, to ease the communication between different industries and to allow data sovereignty and usage control over data inside the IDS Ecosystem. Building upon this groundwork, this study presents a data app designed to implement Usage Control, integrated inside an IDS Connector. This proposal ensures that customised usage policies are included and enforced on the user side of a connector and emphasizes the protection of sensitive data. Moreover, the Data App incorporates a cipher mechanism to safely exchange cryptographic keys used to protect data assets. By incorporating this data app, the IDS initiative is able to stay truthful to its principle of ensuring data sovereignty and building a robust IDS Ecosystem.

Full text

University of Minho School of Engineering Ana Rita Abreu Peixoto Usage Policy Control Data App for Data Spaces october 2023 University of Minho School of Engineering Ana Rita Abreu Peixoto Usage Policy Control Data App for Data Spaces Master’s Dissertation in Informatics Engineering Dissertation supervised by Doutor Fábio André Castanheira Luís Coelho october 2023 Copyright and Terms of Use for Third Party Work This dissertation reports on academic work that can be used by third parties as long as the internationally accepted standards and good practices are respected concerning copyright and related rights. This work can thereafter be used under the terms established in the license below. Readers needing authorization conditions not provided for in the indicated licensing should contact the author through the RepositóriUM of the University of Minho. License granted to users of this work: CC BY-SA https://creativecommons.org/licenses/by-sa/4.0/ i Acknowledgements I would like to express my gratitude towards some people and entities that had an important role during my time working on this topic. Firstly, I would like to express my gratitude for the support and guidance of my thesis advisor, Professor Fábio Coelho, as well as the useful feedback and commitment to this work. His know-how and mentorship revealed valuable tools in the making of this thesis. Additionally, I would like to show appreciation for the support received from INESC TEC, which partially financed this work. The support from the Technical University of Vienna team, who received and supported me during my Erasmus semester doing this thesis could not go unnoticed. A special thanks to Professor Schahram Dustdar and Professor Victor Casamayor for welcoming me to their team. I would also like to express my gratitude to my dear friends, Raquel, Luísa, Luís, Filipa, and Carolina, who have accompanied me throughout my bachelor’s and master’s, supporting me during these 5 years of my academic journey and my thesis. I am deeply grateful to my mother, whose love, encouragement, and sacrifices have been essential to my academic journey, and to my boyfriend, Bruno, for his understanding and encouragement during this project. Their support and belief in my competencies fueled me to get to the end of this work. Moreover, I want to give a special mention to my beloved dogs whose companionship and affection were crucial during the process of researching and writing this thesis. Their presence has been a source of comfort, which maintained my mental well-being during this demanding task. On a final note, I would like to acknowledge the resilience, perseverance, and commitment I found within myself, that were essential to the successful completion of this work. I learned to self-motivate and prioritize while undertaking this project. This work is financed by National Funds through the Portuguese funding agency, FCT - Fundação para a Ciência e a Tecnologia, within project UIDB/50014/2020 (9747/BII-E-B4/2022). ii Statement of Integrity I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. University of Minho, Braga, october 2023 Ana Rita Abreu Peixoto iii Assinado por: Ana Rita Abreu Peixoto Num. de Identificação: 30297198 Data: 2023.10.31 15:06:11+00'00' Abstract Digitalization has taken over many businesses and industries, as technology is now widely used and preferred over manual work. Therefore, technical devices nowadays contain several sensitive pieces of information that are prone to be shared with others. Consequently, over the years there has been an increasing need to protect our data and to exchange it in a secure and sovereign way, as data are one of the most valuable assets of any industry and business. Therefore, the need to implement systems that prioritize such values emerged, in order to grant continuous monitoring and control over data usage, to keep track of how data is used even after it has been exchanged with other entities. The motivation to consider Data Spaces relies on the fact that it should follow an interoperable and cross-sector approach, offering a reference implementation suitable to every industry and business, to ease the communication between different industries and to allow data sovereignty and usage control over data inside the IDS Ecosystem. Building upon this groundwork, this study presents a data app designed to implement Usage Control, integrated inside an IDS Connector. This proposal ensures that customised usage policies are included and enforced on the user side of a connector and emphasizes the protection of sensitive data. Moreover, the Data App incorporates a cipher mechanism to safely exchange cryptographic keys used to protect data assets. By incorporating this data app, the IDS initiative is able to stay truthful to its principle of ensuring data sovereignty and building a robust IDS Ecosystem. Keywords usage control, app, data iv Resumo A digitalização apoderou-se de muitos negócios e indústrias, visto que, nos dias de hoje, a tecnologia é amplamente utilizada e preferida ao invés do trabalho manual. Desta forma, os dispositivos eletrónicos da atualidade contêm cada vez mais informações pessoais e confidenciais que são propensas de ser partilhadas com outras entidades. Consequentemente, tem havido uma necessidade crescente ao longo dos anos de proteger os nossos dados de forma a tornar a sua partilha mais segura tendo em conta o conceito de soberania de dados, visto se tratarem de um dos ativos mais valiosos de qualquer setor e negócio. Desta forma, surgiu a necessidade de implementar sistemas que priorizem estes valores, de modo a fornecer monitorização contínua e controlo sobre o uso dos dados, para monitorizar como os dados são usados mesmo depois de serem transferidos para outras entidades. A opinião consensual sobre os Data Spaces assenta no facto de estes deverem seguir uma abordagem interoperável e inter setor, através de uma implementação de referência suscetível de ser personalizada e adequável a todas as indústrias e negócios, de forma a facilitar a comunicação entre diferentes indústrias e permitir a soberania e controlo de uso dos dados dentro do Ecossistema IDS. Tendo em conta as ideias apresentadas, este estudo apresenta uma aplicação desenhada para implementar controlo de uso sobre os dados, ao integrá-la num IDS Connector. Esta proposta permite a costumização de politicas de acesso aos dados no plano de controlo do utilizador do connector. Permite ainda a incorporação de mecanismos de cifra de dados e troca segura das chaves criptográficas consideradas, para troca de dados entre as Apps. Ao incorporar esta aplicação, a iniciativa é capaz de se manter fiel ao princípio de garantir a soberania de dados e construir um Ecossistema robusto. Palavras-chave controlo de uso, aplicação, dados v Contents 1 Introduction 1 1.1 Contextualization ................................... 1 1.2 The problem ..................................... 2 1.3 Main Contributions .................................. 2 1.4 Document Structure .................................. 2 2 Background 4 2.1 International Data Spaces ............................... 4 2.2 Layers of the Reference Architecture Model ...................... 5 2.2.1 Business Layer ................................ 6 2.2.2 Functional Layer ............................... 14 2.2.3 Process Layer ................................ 16 2.2.4 Information Layer .............................. 19 2.2.5 System Layer ................................ 21 2.3 Security, Certification and Governance ......................... 24 2.3.1 Security Perspective ............................. 24 2.3.2 Certification Perspective ........................... 33 2.3.3 Governance Perspective ........................... 35 3 Workflow 38 3.1 IDS .......................................... 38 3.2 Dataspace Connector ................................. 39 3.2.1 Data Model ................................. 40 3.2.2 Data Provider ................................ 42 3.2.3 Data Consumer ............................... 49 3.2.4 Software Tests and Conclusions ....................... 50 vi Chapter 1 Introduction 1.1 Contextualization As the era of digitalization grows and thrives, there has been a shift from traditional industry to services being processed by a computer or a technology device. This resulted in more data being produced in industrial areas, having a huge impact on matters such as privacy, surveillance, transparency, and censorship (1). Data is going to be processed, stored, and possibly shared with other entities, increasing the need to establish access control over data. Moreover, businesses and companies could improve their supply chain’s transparency by adding this principle of ownership and control over their own data, in which case the business would know exactly what happens in each stage of the supply chain. Consequently, there was a need to create a rule book to enable digital sovereignty, which can be accomplished by the International Data Spaces (IDS) initiative. It has been institutionalized by the International Data Spaces Association (IDSA) since 2015 and aims to build a data ecosystem allowing secure data exchange between trusted partners and data sovereignty for the creator of the data. The prior statement means that every 2 entities in this ecosystem would be able to self-determine how their data is used and under which circumstances, even if it is shared. This initiative lies on European values such as privacy and security, data sovereignty, and trust. These principles can be achieved in the IDS through machine-readable contracts that specify in which conditions data may be used (22). The EU Strategy for data acknowledges that Data Spaces should be interconnected and interoperable. Data sharing and exchange within specific domains and sectors (health, energy, education, etc.) is already happening in existing initiatives. However, each of these initiatives follows its own approach, and therefore they are not always interoperable, nor do they usually consider data privacy or data sovereignty. The IDS initiative acts as revolutionary in this sense, as it brings a new vision of data exchange relying on data sovereignty. 1 1.2 The problem The problem at hand aims at improving the functionalities of the main component of the IDS Ecosystem, the IDS Connector. The present work focuses on studying the International Data Spaces initiative and the presented Reference Architecture Model to implement data spaces. Moreover, the reference implementation of the components is also put to the test, in order to validate if it achieves the promised purpose, data sovereignty. This work is based on the analysis of the IDS-Ram version 3 (15), the reference implementation of the core technical component, the IDS Connector, and the respective documentation describing its function. The analysis concludes that key features require improvement. These features are relevant to ensure Usage Control, and therefore data sovereignty in the data exchange process, as there was no mechanism to ensure usage control after data was exchanged. Additionally, the existing implementation is not completely modular to all sectors of activity, compromising the cross-sector and multi-domain requirements. It is crucial to analyze all the above-mentioned aspects in order to design a viable and executable solution to this problem. 1.3 Main Contributions The IDS Connector designed by the IDSA aims to ensure data sovereignty inside an IDS ecosystem, ensuring that the Usage Policies defined by the Data Owner are respected even after data has been transferred to other entities. In order to achieve these goals, it is necessary to improve the Usage Control policies present in the IDS Connector, by creating a Data App that encapsulates this logic, offering a separate component for this subject. The present work aims at offering a solution that covers this aspect and implements this feature correctly, in order to achieve the main goal of this initiative, data sovereignty, improving the reference implementation of the IDS Connector. By developing an external app, it will be possible to transfer data between entities without losing power over its use, when considering an IDS environment. Therefore, this work aims at the correct implementation of the IDS Connector, assuring that its promised features are in fact executable and operable. 1.4 Document Structure This document holds 7 chapters: 2 •Introduction: Context and some important insights about the problem. •Background: This section contains all relevant information and background about the problem, in order to understand the work to be developed. •Workflow: This chapter comprises all research done about the existing implementations of the components of the Ecosystem, analyzing its ups and downs and verifying which features could be improved. •IDS Ecosystem Tests: Investigates different ecosystems and compares them to find the best. •Solution: Here is presented the solution for the encountered problem. •Discussion: Functional tests and discussion of the obtained results. •Conclusion: Final thoughts, an overview of the work done, and future work. 3 Chapter 2 Background 2.1 International Data Spaces The International Data Spaces emerged to integrate data sovereignty principles in data ecosystems and marketplaces. It is defined as a distributed network of data endpoints (instances of the International Data Spaces connector) that enables the secure exchange of data and guarantees data sovereignty (21). The main goal is to establish a secure environment to exchange data following an interoperable approach, assuring secure data linkage amongst the IDS components. To achieve this goal, a Reference Architecture Model (version 4) specifies the participants and the rules of this ecosystem, including requirements to assure security and trust. The IDS initiative has a broad range of targets: research purposes (the present work fits into this category), standardization activities (to create a global standard for data exchange) and development of solutions for the market (an IDS can provide software services to the market). Furthermore, it is important to be aware of the strategic requirements on which the IDS initiative relies, to understand its goals: (1) Trust, which is assured by guaranteeing that all participants are evaluated and certified before accessing the ecosystem, (2) Security and Data Sovereignty, meaning that technical components should also be evaluated and certified before accessing the IDS Ecosystem, (3) Decentralized Ecosystem of Data, as data is stored physically in the data owner, requiring it to be transferred to a trusted party when one wants to access it, (4) Standardized Interoperability, as all connectors must be able to communicate with each other, (5) Adding Valuable Apps, to the Connector in order to provide additional services and functionalities to the developed connector and, finally (6) Data Markets, enabling the creation of services that make use of data apps (15). These principles and initiatives are driven by the need to achieve data sovereignty in some real-world contexts, including data-driven business ecosystems. In such ecosystems, there are great incentives for working as a team since it improves the quality of the final product. As the focus is to create value through 4 data and teamwork, sharing data between the involved parties inside the ecosystem is crucial to obtaining a successful product. As more companies collaborate in business ecosystems, a double-edged sword problem arises: companies need to guarantee their data is protected, but at the same time it needs to be shared to produce a final product. In order to ensure these 2 perspectives simultaneously, data sovereignty needs to be considered, and data must be classified according to its economic value: private data needs a greater level of protection than public data. Besides, other existing initiatives already addressing this matter, do not take into consideration all the standardization activities needed to assure data sovereignty in the context of data sharing and data exchange. The goal is not to replace previous implementations, but rather extend them so as to achieve a standard norm for data sharing and data exchange (15). Additionally, the IDS also appears as a solution to link existing cloud platforms in a safe and trustworthy ecosystem and to improve its standardization, to avoid the creation of cloud platforms following distinct architectural patterns and heterogeneity amongst them (15). Moreover, the impact of the IDS on Big Data and Artificial Intelligence is clear as these are technologies that might be driven by internal and external data (obtained through a data sharing process, in order to achieve better analytic results). The same happens with the world of the IoT, where a lot of data are generated and processed and may be of interest to different stakeholders (15). There is also a relation between Blockchain Technology and the IDS since it could play roles in the IDS such as the Clearing House and the Broker (explained in detail in the next sections) and assure data transparency (accessing data regardless of its location) and consistency (maintaining information uniformly across the network), complementing the existing data sovereignty guaranteed by the IDS (15). Lastly, it is important to note there is a strong correlation between the IDS and Industry 4.0, as the latter reveals an industrial revolution where the integration of new technologies over manual work is preferred (15). 2.2 Layers of the Reference Architecture Model The IDS RAM defines all its components in a detailed perspective and is structured in 5 layers: Business Layer (main roles of the IDS and interactions between them), Functional Layer (functional requirements of the IDS), Process Layer (interactions between all components of the IDS, offering a dynamic system view), Information Layer (defines a static and dynamic process of the IDS) and the System Layer (more detailed layer about logical software components) (15). Furthermore, there are 3 perspectives that need to be included in all five layers: Security,Certification, and Governance (15). 5 Figure 1depicts this structure and shows how each layer intersects each perspective in the IDS RAM, therefore implementing them in each layer. Figure 1: Reference Architecture Model Structure 2.2.1 Business Layer This layer provides a higher level of abstraction and comprises the business roles a participant can have in an IDS and the basic patterns of interaction with one another. These roles are divided into 4 categories and most of them are required to go through a certification process to be part of the IDS (13) (15): •Core Participants This category includes roles such as Data Owner, Data Provider, Data Consumer, Data User, and App Provider, which are essential to every data exchanging process occurring in the IDS. 6 Role Functionality Data Owner This concept is not defined in a legal view, but in an operational perspective, being the creator of data and the one having control over it. This entity can define Data Usage Policies to determine in which conditions its data may be used and by whom, and even the Payment Model in case other parties want to access it. Its main responsibility is to make data available in the IDS and to provide access to data. In most cases, the Data Owner is also the Data Provider, but that is not mandatory. When these 2 roles are performed by different entities, the Data Owner has to grant access to the Data Provider so it can make data available to a Data Consumer, by means of a contract. Data Provider Allows data exchange between a Data Owner and a Data Consumer and at the end of this operation can log its details for further analysis. In addition, it can use data apps to enrich or transform data and can also provide a Broker Service Provider containing metadata about existing data sources, in order to ease the connection with the Data Consumer. Otherwise, the Data Consumer can connect directly with the Data Provider. Regarding the connection with the IDS, if the Data Provider does not have the technical infrastructure incorporated to perform this action, it may use a Service Provider. Data Consumer It is an entity that makes use or consumes the data, received from a Data Provider. It can search for the desired data asking a Broker Service Provider for its location and metadata and then connect with the corresponding Data Provider. In case it already knows all the necessary information, it can connect directly with the Data Provider. Other functionalities include logging of details after concluded operations, use of data apps to transform or improve data, and the possibility to use a Service Provider to connect with the IDS. 7 Data User Is the legal entity that has the rights to use the data, as defined in the Usage Policies by the Data Owner, and it can be simultaneously a Data Consumer. App Provider Development of data apps to be used in the IDS, that go through a certification process to increase trust. These apps can then be used by Data Consumers and Data Providers. Table 1: Core Participants •Intermediary Participants This category comprises roles that are essential to the functioning of the IDS, which act as intermediary trusted entities, and can only be assumed by trusted organizations. The same organization can simultaneously play the Broker Service Provider, the Clearing House and/or the Identity Provider roles (13) (15). Role Functionality Broker Service Provider Its focus is receiving metadata from Data Providers and providing metadata to Data Consumers, which may query data in a structured manner. Clearing House Assures clearing and settlement services, meaning that a financial transaction or data exchange must be completed successfully for both parties involved (each one must receive what was expected). The way this assurance is granted is because the Clearing House receives logs from the Data Consumer and the Data Provider after the operation is completed and can verify if everything went accordingly. 8 Identity Provider This entity is crucial to assure that the IDS is a secure and reliable environment, by assigning identities to each participant. There are two types of trust that can be considered: Static Trust (certification of participants and core technical components) and Dynamic Trust (active monitoring of participants and core components), and both are implemented in the IDS. The Identity Provider offers an identity service and is composed of a Certification Authority (CA), a Dynamic Attribute Provisioning Service (DAPS), and a service named Dynamic Trust Monitoring (DTM), in order to assure trust in the IDS. This service is crucial to prevent unauthorized access to data inside the ecosystem. The Certification Authority is responsible for issuing, managing, or revoking certificates (public key and IDS-id) to each pair of Participant-Core Component. This means that an identity is generated for each existing pair in the ecosystem, upon request of the participant. Next, this certification information must be passed on to the Dynamic Attribute Provisioning Service, which is responsible for managing the dynamic attributes of the participants. Finally, the Dynamic Trust Monitoring service is responsible for continuous monitoring of participants in the ecosystem to classify their level of trustworthiness. It communicates with the DAPS in order to inform it about the trust level of each participant in a data exchange/sharing transaction. App Store Provider Is responsible for providing and receiving metadata of Data Apps, developed by App Providers. Vocabulary Provider Provides vocabularies to annotate or describe datasets. Table 2: Intermediary Participants •Software or Service Provider(s) IT Companies that provide software or services to be used by the International Data Spaces participants (13) (15). 9 Role Functionality Service Provider It is useful when participants do not have the technical infrastructure to connect with the IDS, in which case data needs to be transferred to the Service Provider. It can also include data apps to perform a specific action over data (data cleansing, data analysis, etc.) and can be considered a Data Consumer and a Data Provider at the same time. To use the functionalities of a Service Provider, data needs to be transferred to its infrastructure. A Service Provider can also request an evaluation of a component. Software Provider Offers software to implement the functionality required from the IDS to participants. This is done by an agreement between a Software Provider and a participant, which remains outside the scope of the IDS. Table 3: Software or Service Providers •Governance Body The governance body are the entities with power and authority inside an organization. These entities are responsible for certification inside the IDS and to assure trust in this ecosystem, making sure that only reliable organizations are inside the ecosystem (13) (15). Role Functionality Certification Body Acts as a supervisor of the Evaluation Facilities in the certification process. It is responsible for certificate participants and core components of the data spaces. Evaluation Facilities Along with the Certification Body, it is responsible for certificate participants and core components of the data spaces. A participant needs to ask the Evaluation Facility to be certified, and this certification relies on a contract between both entities, allowing the participant to access the ecosystem. 10 having a correct self-description, it is deployed inside the Data Providers Connector to further access by other IDS Connectors. It is important to notice that depending on the requesting connector conditions, the returning self-description might differ (13). 2. The second step is optional and corresponds to the announcement of the self-descriptions in a central component, the IDS Metadata Broker (e.g. Broker Service Provider). As mentioned previously, this component can aggregate information about numerous Data Providers and ease the search done by the Data Consumer when trying to access data. Each participant must select the appropriate Metadata Broker. As the Data Provider owns the data asset, it may change it as well as its description at any time, and a should maintain the distributed self-descriptions at the IDS Metadata Brokers updated in order to protect its reputation (13). Furthermore, there is another way to find data offers in an IDS Ecosystem based on a Web Crawling Architecture. This approach relies on two additional structures: Federated Cache Node, FCN (makes data offers public) and a Federated Cache Crawler, FCC (is able to obtain information from other connectors FCN). After having retrieved information from another connector FCNs, the Data Consumer can search for relevant data in its FCC. For this approach to work, it would be necessary that the Data Consumer has information about current Data Providers in the ecosystem. This could be achieved by querying central components of the IDS (13) (15). Figure 4: Hybrid setup - Crawling Self-Descriptions and Metadata Broker from (13) • Contract Negotiation The IDS also focuses on defining the usage policies of each data asset available, defining under which conditions a Data Provider might provide access to its data to a Data Consumer. As mentioned 17 previously, each data asset has its own description, including its usage policies that are in the form of a Contract Offer (13). A Contract Offer is usually predefined by the Data Provider. Nonetheless, a Data Consumer can issue a Contract Request at any time containing its desired usage policies. Then, a Data Provider can accept it or not, until they both agree and obtain a Contract Agreement (Data Usage Contract) (13). A simple way to obtain a Contract Agreement is by a Data Consumer sending a Contract Request to a Data Provider, which can simply accept or reject it. In a more complex negotiation, there could be a counteroffer from the Data Provider, and both entities would continue negotiating until they reached a consensus and obtained a Contract Agreement. This contract must be approved, signed, and persisted by both entities involved. Moreover, if at any time either entity does not agree with the usage policies, the contract may be revoked (13). In some cases, after the approval of a Contract Request/Offer and its validation by the Data Provider, it can be sent to the Clearing House for further verification and approval. Once the Clearing House signs the contract it is returned to the Data Provider, which then sends it back to the Data Consumer (13). This whole process can also be initiated by the Data Provider, which keeps being the last entity to sign the contract as it is the owner of the data (13). • Exchanging Data The process of exchanging data succeeds in the contract negotiation phase. After reaching a Contract Agreement, either entity is now able to invoke a Data Operation (data upload or download, data transformation, etc. (13). Transferring data from the Data Provider to the Data Consumer can happen synchronously or asynchronously, depending on whether the consumer has to wait for the data to arrive or not, respectively. Moreover, data can be exchanged following a pull-request strategy (if the Data Provider requests the Data Consumer to grab the data) or a push-request strategy (when the Data Consumer asks the Data Provider for the desired data) (13). Furthermore, the Data Consumer can choose to subscribe to content from the Data Provider, which then can send updates about the data according to the predefined criteria (e.g. periodically) (13). During this process, it is important to maintain all usage policies defined in the Contract Agreement 18 (13). • Publishing and using Data Apps Connectors in the IDS can make use of data apps in order to transform or manipulate their data. Such apps are available in the IDS App Store by the App Providers. These entities may go through the onboarding process and its applications may require certification from the certification body. These apps are made available for IDS Participants (13). • Policy Enforcement Lastly, it is important to take into account how policies are enforced inside an IDS Ecosystem. For this matter, a technical approach is considered along with legal contracts or rules, which focus on monitoring a system’s actions over data. There are 6 entities considered for this purpose: Policy Enforcement Point (PEP), which intercepts the data when it is transferred to a connector and then passes it to a Policy Decision Point, which can then evaluate its policies and decide whether to return it back to the PEP or not. The PDP is also responsible for assuring usage control at all stages, such as before usage (pre-condition), during usage (on-condition) and after usage (post-condition) and is able to intercept usage policies in terms of context information and instructions (with the help of the Policy Information Point (PIP) and the Policy Execution Point (PXP)). Finally, entities such as Policy Management Point (PMP) and Policy Administration Point (PAP) are responsible for making policies available to the PDP and support the specification of usage policies, respectively (13). It is important to notice that after an entity goes through the onboarding step, its next operations can be divided into 2 phases: the Control Phase and the Transfer Phase. The former comprises Data Offering and Contract Negotiation, whereas the latter has to do with the Data Exchange process itself (13). 2.2.4 Information Layer This layer describes how data should be represented and described inside the IDS, offering a standard model based on an agreement between IDS participants in order to achieve compatibility and interoperability between them. The main goal is achieving semi-automated resource exchange (13). This model should be cross-sector and interoperable, and therefore generic for any domain, which can be modeled through shared vocabularies and data schema (13). There are 3 levels of formalization that can describe the IDS Information Model, each of them according to a certain level of abstraction (13): 19 •Conceptual Representation This is the highest level of abstraction, comprising this document, UML models and documentation. It is a more descriptive analysis offering an overview of the model. This section will also describe a digital resource at a higher level of abstraction. Adigital resource is an entity that can be exchanged between participants of the IDS for forwarding, processing and/or consumption. A resource can materialize in documents, messages, images, media files, etc. To better understand how digital resources are modeled inside the IDS ecosystem, let us use the Separation of Concerns (SoC) and concern hexagon principles, which work by looking at a subject at a time and independently, in order to offer a clear vision of a resource. The Concern Hexagon has 6 main concerns: –Content: to describe the content of a digital resource 3 aspects can be considered: a simple and abstract description of the resource itself, its representation as an image, text, audio, etc., and a resource as a materialized instance/artifact. –Concept: this concern allows the interpretation of the content described previously through annotations, in terms of informal keywords attached to the resource by the Data Provider, terms which are retrieved from authority and are controlled vocabularies, or types in order to specify individual characteristics of a resource. –Context: allows a relation between a resource and an entity, focusing on 3 aspects: determining the time period this content covers, where it was obtained (space), and which real-world entities are related to it (e.g. time periods, country codes, etc.). –Communication: is concerned with transforming a resource content into one of the representations available. To do so, it focuses on 3 aspects: defining which operation is intended to happen (exchange, processing, visualization, or persistence of digital content), what the endpoints of the two entities communicating are, and the structure and information inside the messages exchanged. –Commodity: this concern is about determining the value and utility of a resource, in terms of Provenance to ensure that the content is reliable, the quality of the resource according to quality statements, the usage policies of the resource, and, finally, the pricing to obtaining it. –Community of Trust: this last concern is about assuring that the IDS is a safe and certified 20 ecosystem. This is done by: ensuring participants of the IDS undergo a certification process, the same happens to the connectors and, finally, the contracts in the IDS are also meant to obtain trust in the ecosystem. •Declarative Representation This representation takes a step further in materializing the Conceptual Representation, offering a machine-readable specification of its concepts, therefore forming an IDS Vocabulary. •Programmatic Representation The Programmatic Representation is focused on developing the Information Model using a programming language data model, allowing developers to create instances of the model according to the IDS Vocabulary. 2.2.5 System Layer Finally, the System Layer presents itself as the last layer of the Reference Architecture Layer. After analyzing all possible participants of the IDS in the Business Layer, it is time to focus on how they can be technologically implemented, resulting in the technical core of the International Data Spaces. Identity Provider The Identity Provider is extremely important in order to allow access management and access control decisions inside the IDS, as it provides an identity to all entities, therefore allowing identification (identify identities), authentication (verifying an entity), and authorization (access control decisions based on identity). This component is represented in Figure 5and consists of 3 sub-components (13): • Certification Authorities (CA): Manage certificates (signing certificates handed by valid connector instances, revoking invalid certificates, etc.). • Dynamic Attribute Provisioning Service (DAPS): Is responsible for issuing dynamic, up-to-date information about connectors and connectors, embedding it into Dynamic Attribute Tokens (DATs). When two connectors establish a connection, they exchange their DATs in order to evaluate each other’s trustworthiness. This allows more flexible and dynamic management of certificates, decreasing the need to revoke old and issue new certificates, as it allows the inclusion or change of attributes if necessary. 21 • Participant Information Service (ParIS): As referred previously in section 2.2.1, the ParIS is an entity that contains information about IDS participants, allowing unrelated participants to establish a connection. Its architecture is very similar to a metadata broker, but instead of storing information about connectors and resources, it stores information about participants, which can then be queried by other entities. This entity is depicted in Figure 5and is composed of a Server (host IDS Endpoints), Database (store self-descriptions), IAM (Identity and Access Management - check identity claims and validate authorization), Index (optional - speed up search) and Website (optional - interface for human interactions). Figure 5: Identity Provider Components IDS Connector The IDS Connector is the entity responsible for exchanging data and is the core technical component of the IDS, being operated by either the Data Consumer or the Data Provider. These participants may operate multiple connectors in order to achieve load balancing or data partitioning. According to the level of security required, one could have a Base Connector or a Trusted Connector, which differ as the Trusted Connector comprises a higher level of security requirements and specifications. Moreover, they can be classified as external connectors (executes the data exchange between participants in the IDS) or internal connectors (facilitate access of internal data to external connectors) connector (15). The Connector Architecture uses application container management to separate all components and deploy each of them in a secure and controlled environment. Furthermore, to ensure data privacy, any operation regarding data should proceed as close as possible to the data source (15). 22 Thus, a connector should run on top of a Virtual Machine/Hardware and an Operating System. Moreover, as it comprises multiple containers, there is a need to create an Application Container Management, isolating components from one another and providing a more secure platform. Finally, a container can comprise a Connector Core Service, which is responsible for Data/Metadata management, Contract/Policy Management, etc. It can also comprise an IDS App, in case it is downloaded from the App Store, or a Custom App, if it is developed by the connector itself (13). To sum up, in Figure 6are depicted all functionalities of an IDS Connector. Figure 6: Connector Functionalities from (13) App Store and Data Apps The IDS App Store is the platform in which certified IDS Data Apps are made available for download. It should support app registration, publication, maintenance and query. Regarding applications, these can be of 3 different types: Smart Data App (small tasks regarding data - transform, cleaning, etc.), Adapter App (make enterprise information systems available to the connector), or Control App (allows controlling the connector from external sources) (13). 23 Metadata Broker A Metadata Broker is comprised of an IDS Connector, and an endpoint for publication, registration, maintenance, and query of self-descriptions. As it contains an IDS Connector, the Metadata Broker also needs to go through a certification process, provide a self-description with information about itself, have a valid IDS identity, and use a valid DAT. Moreover, in order to store all the self-description documents, it needs an efficient scalable database. Finally, it can make use of indexing to speed up the querying of self-descriptions and may require a website interface for human interaction (13). Clearing House The technical component responsible for operating the Clearing House consists of an IDS Connector, and its main function is to log information relevant to clearing and billing, as well as usage control (13). It acts as an intermediary in the billing process between 2 connectors exchanging information. 2.3 Security, Certification and Governance The focus of this section is to analyze how Security, Certification, and Governance can be achieved inside the IDS (13). 2.3.1 Security Perspective It is crucial to guarantee security inside every IDS Ecosystem, in order to identify all entities, protect communication and transactions, and also control data usage after data is exchanged. This principle can be achieved as the IDS connector implements the Security Architecture. Firstly, a very important aspect of the IDS Security Architecture is the establishment of trust and identity management inside this ecosystem (13). Consequently, it is crucial for components to have an identity. When talking about a connector, the central unit of the IDS to ensure sovereignty in data exchange, it is important to consider its components: its platform (hardware, firmware, operating system and run-time environment), connector core services, its configuration and IDS apps related to it. Consequently, an identity identifies its Connector, comprising its platform, core services and IDS Apps. However, contrary to what happens with the Certification of a component, its identity is a unique value and identifies a single instance of the connector with their Apps on a qualified platform (13). The same principle can be replicated to other entities which have a Core Service running on a reliable platform (Broker, DAPS, etc.). 24 Every IDS Component comprises a Platform Instance(Container Management, Operating System, Hardware) and a Service Instance (Data Apps and/or Core Services), which means its identity relies on the combination of both. To achieve this purpose, there is an identity (C_UID, Component Unique Identifier) associated with the service instance, representing both the service and platform instances. This identity uniqueness must be assured by the Identity Provider and it is mapped to a Connector Instance Key (CIK) usually for TLS purposes. Depending on the trust level desired, platforms may require their own identifier (P_UID, Platform Unique Identifier). Furthermore, in order to assure data sovereignty in data exchange, it is not enough to identify other IDS Components, but also additional information about the other company and the software stack being used: Company Description (verified information about the company) and Software Manifests (must be certified and validated). Figure 7depicts the Identity Lifecycle of a component inside the IDS, which can be subdivided into 3 phases (13): 1. Provisioning: New components entering the IDS Ecosystem and after being certified, must acquire a valid identifier. It is issued a Component Identifier (C_UID) and a Platform Identifier (P_UID), accordingly to the trust level required. 2. Maintaining: Maintenance of identifiers is necessary when are released new software versions. If the trust level remains the same, the identifier remains as it was. 3. Out of Service: This phase happens when the component is no longer available. Certificates are revoked and the component’s identity is removed. Lastly, it is important to notice that Participants such as organizations or individuals must also have an identity (O_UID), as they will operate an IDS component. To conclude, there are identifiers related to Core Services/Components (C_UID), Platforms (P_UDI, which are only required depending on the level of trust desired) and Participants (O_UID, to identify organizations participating in the IDS). Another important aspect of security inside the IDS is Securing the Platform, meaning the hardware and software components. Both of these components form the Trusted Computing Base (TCB) and are crucial to ensure data integrity (data remaining consistent over time) (13). There are 3 ways of creating a TCB: 1:1 mapping a connector to a platform, where a connector uses a single platform and it is used by a single connector; 1:n mapping multiple connectors being deployed 25 Figure 7: Identity Life Cycle of an IDS Component on a single platform; n:m mapping multiple connectors on multiple platforms (e.g. Kubernetes). For each of these scenarios, there are some hardware security measures that could improve its safety which range from cryptoprocessors to confidential computing (13). Moreover, it is important to fulfill some Security Requirements to strengthen the IDS Ecosystem: •Integrity and Authenticity of Software: Avoid undesired behavior through a Secure Boot. •Remote Attestation: Happens when an entity needs to prove its integrity to another. The solution for this problem combines the use of a Secure Boot with a Measured Boot, storing the results of all integrity verification. •Data Integrity and Confidentiality: Can be achieved by encrypting data before storage and also preventing unauthorized access. •Isolation of Processes: Interactions between applications should be minimized and each should only have the privileges it requires, in order to reduce the attack surface. •Tracking Events: Keeping logs of all events in the connector in case of attack, in order to understand what happened. •Protecting Keys: Private Keys are sensible and should never be displayed to users or processes. •Protecting from Malicious Administrators: Trust Level 3. An administrator must never have direct control over any layer of the system but have its own predefined and restricted management 26 asset. Whereas Data Usage Control focuses on enforcing policies and duties when exchanging data, Data Provenance Tracking focuses on transparency and accountability (13). The implementation of Data Provenance Tracking can be made along with the Data Usage Control, using the PEP to log data exchange transactions. 2.3.2 Certification Perspective The IDS is built upon data security and data sovereignty concepts, meaning each participant needs to respect the established rules inside the ecosystem. These rules are ensured by the Certification Process, which will be presented and detailed in the present section of this document (13). Firstly, it is important to notice which entities are required in the IDS Certification schema (13): •Applicants: It is the entity that requires certification and should trigger a certification process by submitting an application. •Evaluation Facilities: It should be contracted by an Applicant and is responsible for checking if a certain organization/individual checks all requirements in order to be certified. Is only supervised by one Certification Body. •Certification Body: Can supervise and cooperate with multiple evaluation facilities. Only grants a certificate if both the Evaluation Facility and the Certification Body agree. Furthermore, in Figure 9bellow, are described the different levels of trust and assurance a participant/organization can obtain inside the IDS, respectively, and how they can be combined. These levels are used to characterize organizational processes and operational environments of participants and allow offering them suitable certificates. A higher trust level means that an entity needs to fulfill more criteria in order to be certified whereas a higher assurance level means that the applicant needs to provide more evidence in order to be certified. As referred to in section 2.2.3, this is the first step of the Certification Process and is the Operational Environment Certification, aiming to allow an entity inside the ecosystem (13). After the participant is allowed inside the IDS ecosystem, the next step is the IDS Component Certification. This is necessary in order to assure the reliability of each component inside the ecosystem (13). Figure 10 depicts 3 levels of assurance and trust of components, where the assurance level applies to any component being certified (connector, broker, etc.) and the trust level applies specifically to connectors, and how these categories can be combined (13). 33 Figure 9: Operational Environment Certification Matrix from (13) In order to certify Operational Environments and Core Components, it is necessary to go through a 3-step process: Application Phase (trigger an IDS Evaluation and Certification Process), Evaluation Phase (evaluation of applicant accordingly to the evaluation criteria) and Certification Phase (decision of a positive/negative result of certification). Each of the mentioned steps may differ based on the assurance level desired (13). This Certification Process relies on the previously mentioned entities: Applicant, Evaluation Facility, and Certification Body. Since the Evaluation Facility is the entity that will interact directly with the Applicant for its certification, all Evaluation Facilities must be approved by the Certification Body. This process comprises 3 phases (13): •Preparatory Phase - This phase is relevant to gathering important documents and information. The Evaluation Facility should submit an application form and sign a contract with the Certification Body. •Audit Phase - Its purpose is to ensure that each Evaluation Facility will follow the IDS Certification scheme and rules. •Approval Phase - The Certification Body decides whether or not the Evaluation Facility was approved. 34 Figure 10: IDS Component Certification Matrix from (13) 2.3.3 Governance Perspective This section will focus on how Governance can be incorporated inside the IDS Ecosystem, defining the requirements that must be fulfilled by the ecosystem and how to achieve compliance with negotiated rules and processes. These rules and processes are not dictated or predefined. Instead, companies are allowed to define their own rules and agreements, by using a framework that can be customized (IDS) according to each participant’s needs (13). The main focus is on how to achieve Data Governance, i.e., defining data policies that apply to data in any of its processes. The IDS approach to this matter goes beyond an organization’s borders, meaning that every entity inside the ecosystem must respect the data policies of each data asset, therefore allowing reliable interoperability and control over the use of data by its owner (13). There are some central entities responsible for data governance and data management activities (13): •Data Provider: Technical Component:IDS Connector - Offers a set of rules allowing a Data Provider/Owner to define the usage policies to apply to its data; Allows defining a pricing model and pricing. The Data Provider/Owner is capable of (13): –Defining usage policies for data assets (who can access the data, when, under what conditions, etc). –Transferring data (which contains previously defined usage policies attached). 35 –Publishing metadata (including usage policies previously defined) to Broker. –Receiving information from Clearing House about data transactions (who accessed the data, etc.) –Billing Data (charges the price of a certain action related to a data resource). –Monitoring policy enforcement (are usage policies being respected?) and managing data quality. –Describing the data source (metadata self-description). –Authorizing Data Provider (in case of Data Provider =Data Owner). •Data Consumer: Technical Component:IDS Connector - Offers a set of rules, allowing a Data Consumer to act in conformity with the usage rules attached to a data asset (defined by its Data Provider/Owner). The Data Consumer is capable of (13): –Respect usage policies attached to a data resource. –Search for existing data at a Broker Service Provider. –Nominate Data Users. –Receiving information from Clearing House about data transactions (as it is part of the data transaction). –Monitoring policy enforcement (it should respect data usage policies). •Broker Service Provider: Technical Component: Broker Service Provider Component - Allows the registration of data by the Data Provider and its querying by the Data Consumer. The Broker Service Provider is capable of (13): –Match demand and supply of data. –Provide Data Consumer with metadata (with information about the data itself). •Clearing House: Technical Component: Clearing House Component - Logs data about data transactions. The Clearing House is capable of (13): 36 –Log data transactions. –Monitor policy enforcement (assures both parties do as they promised). –Provide data accounting platform (for billing purposes). •App Store Provider: Technical Component: App Store Provider Component - Offers a platform for publishing and retrieving data apps. The App Store Provider is capable of (13): –Offers Data Services (Data visualization, etc). –Provide metadata and a metadata contract-based for users. –Provide data apps. 37 Chapter 3 Workflow This section explores and characterizes existing implementations of IDS components, as well as software tests and comparisons with theoretical documentation provided by the respective entities. The work made here is of great significance to provide insight into the current developments and to understand which improvements must be taken into account. Firstly, deep research on all IDS components was conducted, as to understand the global ecosystem and how it could be implemented in practice. Then, the scope of this work turned out to be the Dataspace Connector (2) as it is the main entity of the IDS ecosystem. Several software tests were made in order to understand its functionalities and find possible inconsistencies. In the next sections, a detailed explanation of the prior topics will be provided. 3.1 IDS After analyzing and studying the structure of the IDS Ecosystem, all its components, and inherent processes, it is time to understand how it can be implemented and used in practice. Firstly, it is important to understand which components are already being developed or ready to use. In fact, the following components and their level of development can be considered (10): •App Store: Work in Progress. •Clearing House: Work in Progress (Version 1.0 available). •IDS Connector: Continuously being improved. •IDS Identity Provider: – Certification Authority (CA): Work in Progress. – Dynamic Attribute Provisioning Service (DAPS): Stable. 38 – Participant Information System (ParIS): Work in Progress. •IDS Meta Data Broker (IDS-MDB): Stable. Most components are still being developed and improved, being the DAPS the only one currently with a stable implementation. Moreover, it is possible to execute some of the IDS Components mentioned above and build a Minimum Viable Data Space (11), considering the minimum components to exchange data between 2 entities in a secure and sovereign way. Thus, it is crucial to consider at least the following IDS Components: • 2 or more IDS Connectors. • Certification Authority (CA). • Dynamic Attributes Provisioning Service (DAPS). • Metadata Broker. As a starting point to build this environment, it is possible to use the IDS Testbed (6), which is a preconfigured environment with all minimum components. This setup allows component behavior testing, interoperability testing of IDS Components, preparing IDS Certification, and acts as a starting point for building data spaces (6). 3.2 Dataspace Connector Turning to the Dataspace Connector (2), it is important to understand its behavior as to how it was in fact implemented, and if it comprises all the functionalities it promised, in order to assure data sovereignty. There are various implementations of Dataspace Connectors over the internet, but the one of most interest to this study is the one developed originally at the Fraunhofer ISST and is now being maintained by sovity (3), as it is the one following the Reference Architecture Model, explained in the previous sections. This is also the software used by the IDS-Testbed (6) mentioned above, where its functionalities are put to the test. This implementation (2) is able to extend existing software in order to integrate IDS connector functionalities, or also serve as a base for the development of its own software. In addition, it allows registration and persistence of IDS Resources to an internal or external database, therefore acting as an intermediary between the data source and the IDS Ecosystem. It promises to use the IDS Information Model and the 39 IDS Messaging Services for messaging handling, as described in the RAM. The IDS Connector (2) can act as both the Data Provider (make data available to other entities) and the Data Consumer (request data from other entities). It is also expected to support various usage control rules, which should be implemented and enforced, in order to ensure data sovereignty through all stages of the data exchange process. Moreover, identity management is assured by the DAPS of the Identity Provider (3). The level of certification of this component is currently classified as the Base Certification level, as it does not require specific hardware in order to use it. The IDS Connector can be deployed using Docker or Kubernetes for more automated deployment, or can also be deployed locally with custom configurations to fit a specific use case. The connector can be configured through a configuration file, customizing information such as title, description, security profile, etc. This file is loaded when the program first starts, although there is an endpoint developed for configuration purposes where some of these aspects can be modified after the connector execution. When running the connector, it is protected by an authentication mechanism in order to protect access to its functionalities. The credentials can and should be customized when hosting and deploying of own connector. After authenticating, all REST endpoints are available to be used in an intuitive interface, built with Swagger-UI. 3.2.1 Data Model One of the most important aspects of the IDS Connector is its Data Model, to understand how data is stored and organized inside the IDS Connector. Table 6offers an overview of the entities that are part of the data model and its attributes. There are some considerations to take into account. First, the connector distinguishes between Offered and Requested Resources. An Offered Resource is only made available to other connectors in the catalog if it contains at least one rule and at least one representation with at least one artifact. Moreover, every resource must be associated with one or more catalogs and can be subscribed to by entities that listen to updates on the resource. The main difference between these resources relies on the fact that Offered Resources are able to be published in Metadata Brokers, contrary to what happens with Requested Resources. Regarding Catalogs, this is the most high-level entity which comprises all Resources of the connector, being offered or requested. 40 Entity Provided Attributes Automated Attributes Catalog title, description created, modified Offered Resource description, keywords, title, publisher, sovereign, language, license, endpointDocumentation, samples, payment_method created, version, modified Requested Resource license, sovereign, title, keywords, description, publisher, endpointDocumentation, language modified, created, version Representation title, mediaType, language, standard created, modified, remoteID Artifact title, accessURL, username, password, description, value bytesize, checksum, automated- Download, numAccessed, created, remoteAddress, remoteID, modified Contract consumer, provider, title, start, end modified, created, remoteID Rule title, value, description modified, created, remoteID Agreement - remoteID, confirmed, achieved, value, created, modified Brokers title, description, location id, creationDate, modification- Date Subscriptions title, description, target, location, subscriber, pushData id, creationDate, modification- Date Table 6: Data Model Attributes - adapted from (3) 41 3.2.2 Data Provider The IDS Connector is the core technical component of the Data Provider and thus must allow it to provide resources and data for other entities. To achieve this goal, and using the current implementation of the connector, there is a sequence of steps that should be followed (2) (3): 1. The first step a Data Provider needs to go through for publishing data and making it available for other entities is the creation of entities to populate the database, in order to build a catalog. These entities are the ones defined in the Data Model. •Create Catalog: The IDS Catalog is the most high-level entity, in which the available resources and other information about the connector are made available. In order to create an entity of this type it is necessary to send a ”POST /api/catalogs” request. The body of this request is depicted below in JSON format and contains the 2 basic attributes title and description , which are not mandatory for the creation of a catalog. As mentioned in the table 6, these attributes can be provided by the user, and the attributes creationDate and modificationDate are automatically generated, therefore can not be customized in this JSON file. Moreover, in order to customize the catalog attributes, it is possible to add the desired attributes which must be a string. For example, in the creation of the following catalog, an additionalAttribute was considered, which was not previously on the Data Model. This attribute will then be automatically moved to an attribute called additional which stores customized attributes. After a catalog is created in a connector, other connectors can already access it, although there aren’t yet any offers available. 1{ 2"title":"Example Catalog", 3"description":"This is an example Catalog", 4"additionalAttribute":"Example of additional attribute" 5} 42 After completing all the steps described above, the Offered Resource is available in the Catalog for further access from other connectors to be consumed. 3.2.3 Data Consumer The IDS Connector also acts as the core technical component of the Data Consumer, supplying the necessary features to request and consume data from other connectors. In order to achieve this goal, it is necessary to exchange messages between the 2 connectors, as depicted in Figure 11, Figure 11: Data Consuming Process The sequence of steps depicted in Figure 11 are described below (6): 1. Request self-description: The first step to consume data is to request the self-description of the connector containing the desired data. This is done by using messaging endpoints of the connector and sending a ”DescriptionRequestMessage” through the ”POST /api/ids/description” request. The response from the Data Provider should contain its self-description and available catalogs. 2. Request Catalog: After analyzing the self-description of the Data Provider and obtaining the Catalog ID desired, it is time to request the catalog itself, sending a ”DescriptionRequestMessage” 49 again but specific to the desired catalog. If there are any offered resources available, it is possible to access the offer id, artifact id and rule id desired. This information will be valuable and crucial for the next request. 3. Start Negotiation: After having accessed the necessary information, it is possible to start contract negotiation. This is done by sending a ”ContractRequestMessage” to the Data Provider, informing the desired resource and artifact. Moreover, the request body should contain a contract offer, which should match the one associated with the resource in order to obtain access to it. Depending on this factor, the Data Consumer can receive a ”ContractRejectionMessage” or a ”ContractAgreementMesage”. The negotiation proceeds until an agreement is achieved, in which case the agreement id is provided to the Data Consumer. 4. Request and download artifact: This can be achieved through the ”GET /api/agreements/id/artifacts” where the agreement id is obtained in the Data Provider response accepting the contract. The response to this GET request contains the URL to download the data. 3.2.4 Software Tests and Conclusions This section presents two tests conducted in the connector in order to analyze how their implemented features work: the first focuses on testing the connector’s interoperability and its modular feature, and analyzes how flexible it is in adding customized attributes to the current data model representation; the second test will focus on testing the Usage Control policies in order to find out if they are correctly implemented and enforced throughout the data asset’s entire lifecycle. For the first case, it was necessary to have the Data Provider create a simple Resource, Catalog, Artifact, and Representation, all containing a customized field year . 1{ 2"title":"DWD Weather Warnings", 3"description":"DWD weather warnings for Germany.", 4"paymentModality":"undefined", 5"year":2022 6} Listing 3.1: Resource with ”year” field 1{ 2"title":"IDS Catalog", 50 3"description":"This catalog is created from an IDS info model catalog .", 4"year":2022 5} Listing 3.2: Catalog with ”year” field 1{ 2"title":"Example artifact with weather data", 3"description":"This is an example artifact that contains information about weather data", 4"value":"Weather Content", 5"year":2022 6} Listing 3.3: Artifact with ”year” field 1{ 2"title":"Example Representation", 3"description":"", 4"year":2022 5} Listing 3.4: Representation with ”year” field Moreover, a Contract comprising the PROVIDE_ACCESS usage rule was created for the Offer above, and all links between entities were considered in order to provide an Offered Resource to other connectors. After creating this entity, it was consumed by a Data Consumer connector. The obtained conclusion regarding this test was that when another connector tries to consume this information with extra attributes and receives it on the Data Consumer side, the consumer connector is unable to correctly translate it, as the Resources and Artifacts consumed do not follow the same structure as on the Data Provider side. On the Data Consumer side, the additional variable year previously added is lost, thus allowing us to conclude that inter-operability is not successfully achieved nor the cross-sector goal, as it is not possible to exchange data correctly when customizing entities. For the second test, regarding Usage Control, it was necessary to attempt a data exchange considering multiple usage policies, creating a different Offered Resource for each policy, and experimenting with the Data Consuming of these assets to observe if these policies were enforced on the Data Consumer side. 51 It was noticeable that some Rules were not correctly implemented, therefore compromising usage control and, consequently, data sovereignty inside the IDS Ecosystem. In fact, regardless of the Usage Control Rule picked for a specific transaction, the final result is one of the two: the data asset is downloaded to the local machine or the download is prohibited. With this approach, it is impossible to control data usage as the Data Consumer receives the data in its local machine and therefore is able to use data as it pleases, without being forced to respect the usage policies defined by the Data Provider. Moreover, the contract negotiation that is currently implemented is very primitive, as the Data Provider simply accepts or rejects a Contract Offer, and is not able to respond with a Counter Offer. 52 Chapter 4 IDS Ecosystem Tests As mentioned in section 3.2.4, currently the Dataspace Connector(2) implements few usage control policies, limiting data sovereignty control in the Dataspace. Most importantly it limits organisations adopting the connector as there is not an easy way to extend the available policies. The work presented in the next sections will focus on finding a way to mitigate this problem, proposing the development of an external usage control app that can be downloaded and instantiated in the connector. The development of an external app will allow the usage control logic to be encapsulated on a separate component, not conflicting with the few existing data usage policies available in the Dataspace Connector (2) implementation. The reference architecture model sponsored by IDSA details the logical specification of the protocol but does not officially provide a reference implementation of the required components. Departing from the architecture, some associated organizations provide several reference implementations of the dataspace components including the connector. In order to understand which reference implementation shows the best conditions to be considered, this section details a series of tests made in order to understand which ecosystem and connector implementation to consider. These tests can range from the basic deployment of the connector to the deployment of an example data app itself. In the following subsections, these tests are explained in detail according to each goal. Table 14 below offers a general overview of some conclusions obtained through the testing of 3 reference implementations: the Dataspace Connector (2), the Trusted Connector (14), and the TSG Connector (30), and depicts a summary of the features provided by each one of these approaches. 53 DS Connector Trusted Connector TSG Connector Connector deployment Kubernetes ✓×✓ Docker ✓ ✓ ✓ Integration Broker ✓×✓ DAPS ✓×✓ App Deployment ×✓ ✓ Data Exchange Connector of same type ✓ ✓ ✓ Other connectors × × × Table 14: Comparison between connectors 4.1 IDS Testbed and Dataspace Connector The first approach that was considered was the IDS Testbed (6), which deploys 2 entities of the Dataspace Connector (2), 1 entity of the Metadata Broker (9) and 1 entity of the DAPS (12). This simple IDS Testbed is easy and straightforward to deploy as it is and allows the communication between the 2 Dataspace Connectors (2), one acting as a data consumer and the other acting as a data provider while being integrated into an IDS Ecosystem with a Broker and a DAPS to ensure secure communication and reliability. As depicted in Table 14, this approach supports both the deployment through docker and Kubernetes (4), but the latter does not support neither the integration of the Configuration Manager nor the camel routes, therefore making it not suitable to integrate data apps. Furthermore, it is necessary to understand how the Dataspace Connector (2) integrates data apps in its core. For this purpose, its endpoints were analyzed, and reached the conclusion that if the Dataspace Connector (2) was used as it is, the App Store would be needed, in order to allow the download of data apps and further deployment inside the connector. Nonetheless, this approach would implicate the deployment of the App Store (7) itself which is not present in the available IDS Testbed (6), and the reconfiguration of the entire IDS setup presents as a rather complex and out-of-scope task for this work. Moreover, it would require an understanding of the App Store as a whole and the process of adding new apps to it by 54 a developer connector (16). To mitigate the requirement of having an App Store deployment, the Dataspace Connector (2) source code was analyzed and refactored, adding the required, yet missing, endpoints to add and configure the use of data apps. A new docker image of the connector was deployed and considered in this work. Moreover, it was also necessary to take into account the configuration of a portainer container (27) that the Dataspace Connector (2) would integrate, to allow container management of all app instances deployed by this connector. Therefore, the information in Table 14 regarding the integration of data apps inside the Dataspace Connector (2) on not being possible refers to the base implementation of the dataspace connector and not the improved version, which was obtained in the scope of this work. To allow the deployment of Data Apps in a connector, Data apps require their own docker image, so that the connector can download them from a docker registry and perform actions such as starting or stopping the data App. The improved connector was integrated into the IDS Testbed (6) environment to allow the required with the other components. Furthermore, for this ecosystem there is also an example app template (8) available that acts as a base for the development of new data apps, allowing the focus to be on the development of the app itself, assuring a base app to work upon. 4.2 Trusted Connector The next reference implementation considered was the Trusted Connector (14) and its integration with other IDS Components (Metadata Broker and DAPS). The deployment of an entity of the Trusted Connector (14) can be achieved through docker, instead of Kubernetes, as depicted in Table 14. This deployment is rather simple and straightforward from a user point of view when considering docker and there are some pre-configured setups easing the deployment of multiple entities of a trusted connector. At first, it was tested the communication between 2 Trusted Connectors (14) which revealed a success. Then, some tests regarding data exchange between 1 Trusted Connector (14) and 1 Dataspace Connector (2) were made, and were not possible to perform, due to huge differences between the user interface of these 2 approaches and the way each one of these reference implementations exchange their messages. Thus, the tests showed that the Trusted Connector (14) and the Dataspace Connector (2) were not interoperable, as they are not able to communicate or exchange messages with each other, due to their different 55 interfaces and endpoints. Therefore, the tests revealed it is only possible to exchange information between 2 trusted connectors or 2 dataspace connectors. Regarding the ecosystem itself, the approach using the Trusted Connector (14) did not consider other entities in its environment other than the 2 connectors, therefore not including the Broker and DAPS entity, which are crucial to assure a minimum testing environment. Furthermore, it was considered the integration of the Trusted Connector (14) inside the IDS Testbed (6), which did not reveal successful due to the huge differences in each implementation and environment. The last topic to address in this analysis was the data app integration, which was easily achieved through the user interface available. 4.3 TSG Playground and Connector The TSG Playground was the last approach to be tested, and the one that was revealed more complex. This approach offers what is called the ”TSG Playground”, which acts as a testing environment composed of 3 entities: an Identity Provider (with the Dynamic Attribute Provisioning Service), a Metadata Broker and a Test Connector (31). The playground hosts one instance of the TSG Connector (30) online, allowing to seal the contract negotiation stage and later the data exchange stage, with a locally deployed instance of the connector. In order to connect with this online setup, an identity certificate is needed, which can be created and retrieved from the available Identity Provider. The local connector can be deployed either by docker-desktop or Kubernetes, although the deployment is recommended using Kubernetes in order to be able to access all the functionalities of this environment, including the deployment of data apps, which is crucial for this work. The deployment through dockercompose revealed easier and simpler, but had a major drawback, relying on the fact that this approach does not allow for installation and management of data apps, since all the orchestration is done by the Kubernetes clusters that are created during the deployment of the Test Connector (31). Consequently, the more reliable way to deploy this strategy requires knowledge about a different technology, Kubernetes, that the previous two did not require, as depicted in table 14. This fact represents an increase in complexity when compared to the other previous alternatives. When deploying the TSG Connector (30) using docker, it was possible to access the user interface and even to communicate with the online entities. However, as mentioned previously, this is not the desired way to deploy this TSG Connector (30) due to the need to orchestrate data apps. On the other hand, when testing the deployment 56 using Kubernetes, the process itself was revealed more complex and challenging, although achieving a similar result which also allowed communication with the online setup. Regarding data apps and their integration in the TSG Connector (30), it was reached to the conclusion that the approach considered in this implementation had a different structure than the previous 2, as the app integration was not something tangible and visible on the connector user interface post-deployment. Differently than what happened with the Dataspace Connector (2) and the Trusted Connector (14), which allowed the integration of data apps after the deployment of the connector and had endpoints for this purpose, the way the TSG Connector (30) allowed integration of data apps was prior to its deployment and was made by means of adding the desired app and configuration information to the respective helm chart and therefore deploying this helm chart using Kubernetes. Furthermore, there were some tests made regarding the deployment of an example data app integrated into the connector, which revealed successful after extensive reading of documentation and trial. In conclusion, the tests done for this environment focused ultimately on deploying the Test Connector with an example data app locally on a Windows device, which required setting up the Kubernetes environment built within Docker Desktop and helm configuration files. This process required the use of tools such as minikube, to allow the deployment using Kubernetes. 4.4 Comparison Table 14 provides a general overview of the features provided by each alternative. The two strongest alternatives are the Dataspace Connector (2) within the IDS Testbed (6), and the TSG Connector (30) integrated into the TSG Playground (31). The Trusted Connector (14) was not considered, due to not being included with a wider ecosystem considering entities such as the Broker and the DAPS, which are the basic entities necessary to establish the data space. Although the integration of data apps was successful and easily done, the cons are stronger than the pros for the Trusted Connector (14) approach, as it is not interoperable with other connectors and it does not have its own IDS ecosystem, which makes this approach an avoidable scenario. The TSG Environment (31) (30) revealed far more complex and it would be necessary to dive deeper into this approach in order to develop a Data App for this system. Therefore, the IDS Testbed (6) revealed the best reference implementation. This approach was the one being analyzed since the beginning of this work, therefore there was already an extensive comprehension of its modules and components, which made it more reliable to work upon. Besides that, this approach 57 offers a complete environment comprising the DAPS and the Broker, offering integration with the required identity control. Finally, the source-code refactor achieved on the Data Space connector, allowed Data Apps to be deployed without requiring the use of an external App Store. 58 Therefore, in order to achieve the purpose of building a Usage Control Data App for the Dataspace Connector (2), the first step was to analyze which policies were already present on the connector and study if it would be necessary to implement any extra policies, and if so, how it could be done. It was crucial to understand if the policies available could reflect usage control, and not only access control, as the latter reveals simpler to implement and does not fulfill the purpose of the app on its own. For a better understanding of this topic and problem, Table 15 below was built taking into account the policies that were already previously analyzed in chapter 3.2.2, with the additional analysis of how difficult it was predicted to be implemented (on a scale of 1-3, 1 being the easiest), and if it was a matter of access control or usage control (in which case, it could be implemented on the Data Provider or Data Consumer side, accordingly). Usage Restriction Level (1-3) Attributes Notes Side SECURITY_PROFILE _RESTRICTED_USAGE 1 profile Allows download of data asset if the security profile matches. Provider (Access Control) CONNECTOR_REST RICTED_USAGE 1 url Allows download of data asset to a specific connector. Provider (Access Control) PROHIBIT_ACCESS 1 - Data asset cannot be accessed/- downloaded. Provider (Access Control) PROVIDE_ACCESS 1 - Allows full access of data asset. Provider (Access Control) USAGE_DURING _INTERVAL 1 start,end Stricts data access/usage to a certain period of time but does not delete it after the time is up. Consumer (Usage Control) N_TIMES_USAGE 1 value Data asset in the intermediate layer, it cannot be downloaded to the machine and can only be accessed N times. Consumer (Usage Control) 65 DURATION_USAGE 2 duration Data can only be accessed during a period of time. It is necessary to set a timer and when the timer comes up the user cannot access the data. Consumer (Usage Control) USAGE_UNTIL _DELE- TION 2 start,end,date Stricts data access/usage to a certain period of time and deletes it in ”date”. Consumer (Usage Control) USAGE_NOTIFI CATION 3 url Defines the URL of the connector that wants to receive notifications every time data is used/accessed. Access to data is always granted, even if the log message cannot be sent. Provider and Consumer (Access & Usage Control) USAGE_LOGGING 3 - Send usage/access logs to the clearing house. Data access is still granted, even if the message does not reach the Clearing House. Provider and Consumer (Access & Usage Control) Table 15: Access and Usage Control Policies As mentioned previously, Table 15 depicts all usage policies currently present in the Dataspace Connector (2) and some information that was useful during this investigation. It is organized according to the complexity level, from 1 to 3, and each line is colored depending on whether it is a policy regarding Access Control, Usage Control, or both. In addition, the fact of being Usage or Access Control influences if the logic will be on the Provider or the Consumer side, as the Provider side app will deal with access control (who can access the data) and the Consumer side of the app will deal with usage control (after the access was granted). In this table, there is also a small description of each policy with some useful considerations that might be needed to keep in mind when implementing a data usage control app. Furthermore, the column ”attributes” is also useful as it adds more information about the policy especially relevant for 66 creating the usage rules and performing tests. Consequently, these policies can represent different data flows varying from a lower level of complexity to a higher level and therefore these policies are enough for the purpose of the data app. Moreover, the implemented data app focused on enforcing 8 out of 10 policies depicted in this table, being the Access Control and Usage Control policies. 5.3.1 Data App Overview The data app follows the logic present in Table 15, where it is depicted that some policies could be granted on the Provider side whereas other policies should be ensured on the Consumer side of the App. Figure 17 depicts how this Data App was developed taking into consideration two sides of the app, and each one of these is triggered according to the current situation, whether the connector is acting as a Data Provider or as a Data consumer, and for each case there are some specific responsibilities associated. Figure 17: Data App Structure Furthermore, it is also important to understand the data flow between connectors and their data apps, as well as having a higher-level view of the implemented solution. For this purpose, Figure 18 represents the data flow that comes after the actions depicted in Figure 15 are concluded. After the data has been requested by the Consumer Connector, it goes as follows: 1. After having received the request from the Data Consumer, the Data Provider forwards the received information and data to its own Usage Control Data App, so it can process it and analyze the received policy. 67 2. Once it receives the data, it knows that the processing is on the Provider side, and starts processing the received usage policy. In this scenario, it follows the logic present in Table 15 and is responsible for the assurance of Access Control, in case it receives one of the Access Control policies and then sends a response to the Data Consumer whether granting access to the data or not. In case it receives a Usage Control Policy (Table 15), the Provider Data App simply parses and transforms the data received to a different format that the Consumer Data App will be able to interpret. 3. The Provider Data App then has 2 options: in case the policy regards access control, it can authorize or forbid access to data; in case it concerns Usage Control, it simply forwards the parsed data to the Consumer Data App. 4. Once the data reaches the Consumer Data App, it then analyses if it is an Access Control Policy, in which case it simply stores the information received from the Provider Data App and closes the process. Otherwise, if the case is Usage Control Policies, it has the responsibility to ensure that the policies are respected. 5. After the data is received on the Consumer Data App, the Data Consumer may try to access it, by sending a request to the available endpoints on the Data App. 6. The Data Consumer App should then ensure that the Usage Policy is enforced by authorizing/forbidding access to the data. It should also allow or forbid access to the previously computed Access Policies. Figure 18: Data Flow App 5.3.2 Data Model In order to understand the flow of messages and data between entities, it is necessary to first understand how data is organized in the system. First, for this prototype, it was considered that the data would 68 be stored in local data structures, as depicted in Figure 19. It was considered an entity AppData which will hold all the information about the requested artifacts in a Map structure, where each ArtifactID should have a DataObject associated, with all the necessary information to ensure each policy. This AppData structure was considered in order to improve performance in the lookout for the desired artifact, as it provides a much simpler way of accessing artifacts by its ID. Furthermore, this DataObject entity will also flow in the network between data apps, therefore it should provide complete information about the desired artifact to the receiving app. Each one of these variables has a specific purpose regarding each policy: • artifact_id : holds the artifact id in question. • value_artifact : it stores the JSON value of the artifact but in string format for Access Control policies. It is empty in the case of Usage Control policies. • usage_policy : the usage policy associated with the artifact in string format. • access : this variable holds information about the type of access associated with this artifact, when being sent from the App Consumer to the App Provider and can have one of 3 values: 0 - the App Consumer did not authorize access to this artifact; 1 - access granted freely; 2 - the App Provider must ensure Usage Control on its side. • policy : this is also a variable very useful when sending information from the Consumer App to the Provider App, as the Consumer parses all the information received in raw format from the Connector and then fills this variable with the corresponding policy, so when this message reaches the App Consumer it straightly has knowledge about the policy being currently evaluated. • encrypted_data : this field holds the value of the artifact in its encrypted format and it’s empty when it’s an Access Control policy. • counter : it is useful for N Times Usage policy. • encrypted_key : holds the encrypted AES Key (for Usage Policies). • control : control variable for time-wise policies. 69 Figure 19: Data Model 5.3.3 Encryption Mechanisms As described in the previous section, when the policy in question regards Access Control, it is not necessary to consider any encryption mechanism, as the control is done on the Provider side and the Consumer may then fully access the data or not have any access at all. However, when the matter is Usage Control, there are some additional considerations that are necessary to take into consideration. Usage Control Policies are policies that should be ensured, even after the first access to the data was granted, which leads to the problem initially existing in the Dataspace Connector (2). The development of an app revealed a fair solution for this problem, by its capacity to encapsulate all the software logic on a separate component without interfering directly with the Dataspace Connector (2) code. Furthermore, this app should act as an intermediate layer standing between the connector and the data, assuring that the Usage Policies are respected, to achieve the ultimate goal, data sovereignty inside the IDS Ecosystem. Nonetheless, solely building an app might not be enough, as the data would circulate between entities unprotected and could easily be accessed in case it is intercepted, for instance. Encrypting data revealed a crucial aspect to guarantee that communication is secure by increasing data protection. Therefore, it was necessary to investigate the existing encryption mechanisms and techniques, in order to understand what would be a positive approach to consider in this Data Usage Control App. It was reached the conclusion that there are two main techniques, symmetrical and asymmetrical encryption. The symmetrical approach focuses on using the same key to encrypt and decrypt the data by all entities involved, whereas the asymmetrical approach comprises 2 different keys to encrypt and decrypt data (17). By using only 1 key to encrypt and decrypt the data, when talking about symmetrical encryption, it 70 is crucial to find a reliable and safe way to share the key between entities. Furthermore, this algorithm is popular for its performance, as it is highly efficient when treating large amounts of data in providing a high level of security. On the other hand, asymmetrical encryption algorithms focus on having 2 separate keys, 1 public key to encrypt data that everyone has access to, and 1 private key that is used to decrypt data and is private to the entity. However, the drawbacks of using asymmetrical encryptions held on the fact that these algorithms are not as efficient for large volumes of data, impacting their performance. This technique offers more security than asymmetrical encryption as it operates with 2 keys, where 1 of them always remains privately secured. Regarding the specific algorithms for each one of the previously described techniques, there are various options, from which the most widely used are AES and RSA algorithms, in the case of symmetrical and asymmetrical encryption, respectively. The AES algorithm was chosen due to its security in comparison to others such as DES, as it uses a longer key and therefore heightens security. Regarding asymmetrical encryption, the option was RSA due to its efficiency when compared to other asymmetrical algorithms. Figure 20 depicts the sequence of actions required in case the chosen approach was AES Encryption. In this case, there would be an AES Key for each data asset, and this key would be used both for encrypting and decrypting this data asset. However, as it is possible to observe, the Data App on the Consumer side would need to have access to the same AES Key that was generated on the Data Provider side. For this purpose, it would be necessary to ensure that the keys were shared safely between these entities and that no unauthorized entities would access the AES Key, as that would provide it with a means to decrypt data and then access it. Figure 20: AES Encryption Diagram Example On the other hand, Figure 21 illustrates the flow in case the decision goes towards RSA, in which case the Consumer would have its own Private and Public Keys, where the latter could be shared freely amongst entities. Having access to this Public Key, the provider can encrypt the data, which can only be decrypted by using the corresponding RSA Private Key, meaning that only the Consumer would be able to decrypt it and then access the data, eliminating the problem of sharing keys. However, this option might not be 71 suitable when treating large volumes of data, which is the case in a data space environment. Figure 21: RSA Encryption Diagram Example Figure 22 depicts the adopted solution to solve this problem, considering a combination of the previously described algorithms, RSA and AES. Considering these 2 algorithms revealed a fair solution as it is possible to use the AES algorithm (symmetrical approach) to encrypt the data asset, and then the RSA algorithm (asymmetrical approach) to encrypt the AES Key previously used to encrypt the data asset. This method allows the sharing of the AES Key securely between entities and guarantees that only the desired consumer, who owns the corresponding RSA Private Key, is able to decrypt the AES Key, and consequently decrypt the data asset. This approach solves the previously encountered problems in using these techniques isolated. Figure 22: AES and RSA Encryption Implemented 5.3.4 Sequence Diagrams This section will focus on explaining how each one of the implemented Access and Usage Control policies was implemented inside the data app: Connector Restricted Usage, Security Profile Restricted Usage, N Times Usage Policy, Duration During Interval, Duration Usage, and Usage Until Deletion. 72 Figure 23 depicts the flow of messages that are generated once step 4 (Figure 18) is performed. The data reaches the Data App through its /input endpoint, in a raw format, and as a string. Then, it is necessary to parse this message and access its most important components, which is done by the method processInfo present in the InputController , creating the necessary objects for this action. Finally, it is necessary to parse this information to understand which policy should be taken care of, which is done by the ProviderProcessor , acting on the Data App Provider side. This diagram portrays a very important part of the system which is the logic of the Data App on the provider side and how it can be triggered, which is a task of the ProviderProcessor . Figure 23: Sequence Diagram Provider Data App 73 Next, the step that follows the previously explained flow corresponds to the analysis of each Access/Usage Policy and how the enforcement of each one of these was achieved. The first consideration that needs to be taken into account when analyzing how each policy was implemented, is the contractRequestProcessor method which is performed in all cases, and it is responsible for gathering information such as the Artifact Data, the Usage Policy, and the Artifact URL/id. These data do not come straight in the Contract Request received from the Data Consumer, therefore it is necessary to perform some parsing and additional requests in order to obtain all the necessary information to evaluate each policy. Secondly, it is relevant to take into consideration how the App is actuating with the Dataspace Connector (2) and its main functionality, which is to act as a middle layer between the connector and the data, meaning that the data will always be held on the Data App and not directly transferred to the connector. However, for some policies access may be granted in all cases, whereas in other cases there might be some usage control enforcement needed. In both cases, the data will remain on the Data App and the Consumer will have to request it from the Data App any time it desires to access it. Then, from all the policies depicted in Figure 23, the first ones to be implemented were the ones regarding Access Control, due to their simplicity when compared to the Usage Control policies. There are some particular considerations regarding Access Control policies, being the fact that no encryption was necessary for this case, as the Consumer has 1 of 2 options: it either fully accesses the data (after the access was granted) or it does not have access to the data at all. •Connector Restricted Usage: This policy is responsible for ensuring that only a specific connector can access the data in question. This can be achieved by verifying if the consumer connector issuing the request corresponds to the connector allowed to access the data, which is present in the usage policy associated with the data. This flow is depicted in Figure 24 and contains the logic previously described. The access variable for this policy is set to 0, as its evaluation is done on the Provider App. Once the Consumer App receives the data, it is able to identify that it was already previously evaluated by the Provider App by looking at this access variable, and its only action regarding this data is to allow access to the Data Consumer when it desires to access the data. 74 Figure 30: Usage Until Deletion Sequence Diagram 81 Chapter 6 Discussion This chapter provides a series of functional tests that assess the developed Usage Control Data App, in order to understand the changes and improvements this app will bring to the Dataspace Connector (2) in the currently considered reference implementation. Tests do not focus on performance, as the goal is to observe that the final goal was reached and that usage control is finally enforced inside this IDS Testing Environment. Finally, it discusses the achieved results and their impacts. 6.1 Testing and benchmarking The functional tests assess each usage control policy. These tests were performed locally on a machine with the characteristics depicted in Table 16. Characteristic Description Memory 16.0 GB Processor Intel(R) Core(TM) i7-8750H CPU Speed 2.20GHz to 2.21 GHz Storage 256 GB Operating System Windows 11 Home Graphics Intel(R) UHD Graphics 630 Table 16: Machine Specifications The test considers that Connector A acts as Data Provider operating on https://localhost:8080 and Connector B acts as Data Consumer operating on https://localhost:8081 , trying to access the data and that each one of these connectors has its own Usage Control Data App operating on a separate URL, https://localhost:8083 and https://localhost:8084 , respectively, as depicted in Figure 31. 82 It is important to note that the Data App Endpoint responsible for showing the data, in the cases when it is authorized, will send one of two messages: the data asset in case it is authorized, or an error message informing the access was not granted. Therefore, to analyze how the Data App is functioning and how certain policies are working, it is necessary to observe some log messages generated by the Data App. Figure 31: Deployment Diagram 6.1.1 Connector Restricted Usage This policy restricts the data access to a certain connector, and to show that it is correctly implemented and functioning between data apps, two different use cases were prepared, one to show that the Data Consumer can not access the data to which it was not authorized, and the other to show the opposite, that is, that it can access data in case it is the authorized connector. Therefore, two example Resources were created in the Data Provider (Connector A), one for each case. The first case will be the scenario in which Connector B is not authorized to access the Resource, and the Resource was created with the following Data Usage Policy associated: 1{ 2"title":"Connector Restricted Usage Policy", 3"description":"Example of unauthorized access", 4"type":"CONNECTOR_RESTRICTED_USAGE", 5"url":"https://localhost:8080" 6} Listing 6.1: Connector Restricted Usage Policy for unauthorized access When considering this URL, as in the code snippet above, only Connector A is authorized to access the data, therefore when Connector B sends the request to access, it should be denied. For this purpose, when accessing Connector’s B Data App interface and trying to visualize the data of the requested data asset, the access should not be granted, as depicted in Figure 32. In addition, the Data App itself also 83 shows a log message informing that the access was not authorized, as Figure 33 shows. Figure 32: Error message Figure 33: Connector Restricted Usage - Unauthorized Access Log Message On the other hand, when considering a Resource created with the following Usage Policy associated, Connector B should be able to access the data received from Connector A, as the authorized URL corresponds to Connector B’s own URL. 1{ 2"title":"Connector Restricted Usage Policy", 3"description":"Example of authorized access", 4"type":"CONNECTOR_RESTRICTED_USAGE", 5"url":"https://localhost:8081" 6} Listing 6.2: Connector Restricted Usage Policy for authorized access In this case, there is no Error message provided by the Data App, but the value of the Resource instead, which can be read by the Data Consumer. Furthermore, the Data App also shows a log message indicating that the connector is authorized to access the data, as depicted in Figure 34. Figure 34: Connector Restricted Usage - Authorized Access Log Message 6.1.2 Security Profile Restricted Usage The Security Profile Restricted Usage Policy is very similar to the previous case, as there are 2 scenarios considered, based on the security profile of Connector B, which is trying to access the data. Since its security profile is BASE_SECURITY_PROFILE, it was necessary to consider the case in which the Connector’s A Resource had the same security profile associated with this policy, and the opposite case, in which 84 the security profile has a different value. For the first case, the usage policy associated with the Resource in Connector A should be the following: 1{ 2"title":"Security Profile Restricted Usage", 3"description":"Example of unauthorized access", 4"type":"SECURITY_PROFILE_RESTRICTED_USAGE", 5"profile":"BASE_SECURITY_PROFILE" 6} Listing 6.3: Security Profile Restricted Policy for unauthorized access When considering a Resource with a Usage Policy associated as depicted above, with the security profile set as BASE_SECURITY_PROFILE, it matches Connector’s B security profile, and therefore its Data Usage Control App will be able to receive the data. Furthermore, in this case, there is a log message provided by the data app informing that the security profile matches and therefore the data access can be granted, as shown in Figure 35. Figure 35: Security Profile matches - Log Message On the opposite side, considering a Resource with the following usage policy in Connector A, Connector B will not be able to access this data as the usage policies in these two cases differ. 1{ 2"title":"Security Profile Restricted Usage", 3"description":"Example of unauthorized access", 4"type":"SECURITY_PROFILE_RESTRICTED_USAGE", 5"profile":"TRUST_SECURITY_PROFILE" 6} Listing 6.4: Security Profile Restricted Policy for unauthorized access In this case, access will not be granted to Connector B, as the security profile does not match its own Security Profile, and therefore the message shown by Connector’s B data app when it tries to access the data of this artifact is the same as in Figure 32 and the data app log as depicted in Figure 36. 85 Figure 36: Security Profile does not match - Log message 6.1.3 Duration Usage The next policy to be evaluated is the Duration Usage policy, which establishes a duration time for accessing the data. For the testing of this policy, the approach will focus on trying to access a resource at a certain time, and checking if it is still available after the pre-defined amount of time. The next code snippet shows an example of this policy defining the duration usage for 90 seconds. 1{ 2"title":"Duration Usage", 3"description":"Example of duration usage policy", 4"type":"DURATION_USAGE", 5"duration":"PT1M30.5S" 6} Listing 6.5: Duration Usage Example Policy In the first attempt to access the resource, it will be fired a timer set to the duration defined in the usage policy, in this case, it is 90 seconds. When the timer is set, the data asset is decrypted and made available to the Data Consumer. Figure 37 shows the log message associated with the initialization of the timer, which means that the asset will be available until the timer stops, which should take 90 seconds. This fact is revealed true as it is depicted in Figure 38, which shows the time at which the timer stopped and it corresponds to exactly 90 seconds after it started, as it was expected to happen. This implementation only allows the access once for the period of time defined, meaning that after the timer stops the Data Consumer will no longer be able to access it. Figure 37: Initializing timer log message Figure 38: Stopping timer log message 86 6.1.4 N Times Usage The tests performed for this policy will focus on attempting to access the data N times until it is no longer allowed. For this purpose, the following usage policy will be considered: 1{ 2"title":"N Times Usage", 3"description":"Example of N Times Usage", 4"type":"N_TIMES_USAGE", 5"value":"5" 6} Listing 6.6: Duration Usage Example Policy After the Consumer’s Data App receives the encrypted data from the Provider’s Data App, the Data Consumer is able to request it from the app and can only access it 5 times. When this action is triggered, the app evaluates if the user can access the data, in which case it is decrypted. There are some log messages printed by the Consumer’s App regarding access to the data, as depicted in Figure 39. Once the user exceeds the number of times it is allowed to access the data asset, it is no longer granted access to the data asset, and the data is no longer decrypted. Figure 39: N Times Usage Logs Furthermore, for the user, there is also a message shown by the data app interface, as depicted in Figure 40, informing that it is not allowed to access data once it accesses the data N times. Figure 40: Not Allowed Error Message 87 6.1.5 Usage Until Deletion This usage policy limits the data usage from a certain date to another and deletes the data asset from the database at a specified DateTime. For its testing, the following usage policy was considered, which should allow access to the data between the start and end values, in which case data is decrypted and the Consumer can access it. The artifact should be deleted at date . 1{ 2"title":"Usage Until Deletion", 3"description":"Example of Usage Until Deletion Policy", 4"type":"USAGE_UNTIL_DELETION", 5"start":"2023-10-21T23:10:00Z", 6"end":"2023-10-21T23:15:00Z", 7"date":"2023-10-21T23:15:00Z" 8} Listing 6.7: Duration Usage Example Policy Figure 41 shows a log message printed by the Data App when the Data Consumer tries to access the resource before the start date, which should not be allowed, therefore the data is not decrypted, and the app does not grant access to the resource in this case. Figure 41: Not Allowed Log Message Furthermore, Figure 45 shows an example log message printed by the Data App in case access to the data asset is granted, and data should be decrypted at this point. Figure 42: Allowed Log Message Finally, Figure 43 depicts the log message when the date is reached and it’s finally time to delete the asset from its database. After this event, the data app no longer holds any data about the artifact and further attempts to access the data will be unsuccessful. 88 Figure 43: Asset Deleted Log Message 6.1.6 Usage During Interval This policy is very similar to the one before, with the only difference being that the data is held on the Data App’s database for an undetermined amount of time and it is not required to be deleted at a certain date. An example policy of this kind that was tested is the following: 1{ 2"title":"Usage Until Deletion", 3"description":"Example of Usage Until Deletion Policy", 4"type":"USAGE_DURING_INTERVAL", 5"start":"2023-10-21T23:35:00Z", 6"end":"2023-10-21T23:40:00Z" 7} Listing 6.8: Duration Usage Example Policy When trying to access the data before the start time, it is not allowed, as depicted in Figure 44, and access to the data asset is not granted to the Data Consumer, and the data is not decrypted. Figure 44: Not allowed to access data log message Furthermore, as Figure 45 shows, when the current date is in between the pre-defined start and end dates, the data app prints a log message informing that it is possible to access the data asset, and data can be decrypted to grant access. Figure 45: Allowed to access data log message 89 6.2 Discussion Considering the conducted tests, it is possible to conclude that the implemented solution was able to reach the previously set goals to deploy improved usage policies whose data assets are secured via an encryption scheme. The Data Consumer is forced to respect the Data Provider’s usage policies regarding its data asset in its entire life cycle, even after the data is transferred to another entity. The responsibility of ensuring Usage Control was transferred to the Data App, being its task to ensure the encryption and decryption of data between data space connectors. This Data App is a reliable entity that needs to be certified in order to be accepted by all involved parties. In addition, the data should always be held on the Data App to not lose control over it and to ensure security. Moreover, for strict usage policies, or even customizable encryption schemes between parties, the Data App as a software component whose target is to act as a distribution mechanism of software in the Data Space, may unlock the adoption by organizations with stricter data-sharing rules and opening the possibilities of the data space. It is important to notice that this work focuses mainly on building a prototype and on the Data App’s architecture and logic, and is built on the current Data Space construct deemed as a reliable communication protocol between entities. 90 This work is financed by National Funds through the Portuguese funding agency, FCT - Fundação para a Ciência e a Tecnologia, within project UIDB/50014/2020 (9747/BII-E_B4/2022).