© Shilpa Karkeraa 2020
S. KarkeraaUnlocking Blockchain on Azurehttps://doi.org/10.1007/978-1-4842-5043-3_6

6. Blockchain Points of Integration

Shilpa Karkeraa1 
(1)
Mumbai, India
 

At this stage of the book, we will discover the external and internal interactions of blockchains. Interactions can vary from sourcing of metadata, to onboarding of users, to connecting all the dots of the ecosystem surrounding the blockchain application. This helps us focus on the points of integration that are crucial for a successful seamless workflow that utilizes the benefits of a truly decentralized platform.

Here, the focus is not on the technology itself, but rather on the processes that were in place before the blockchain technology was being considered. While you unfolded different learnings of what a blockchain is in the first half of the book, the second half helps you to visualize its implementation and execution for the challenges around you. Focus on the existing centralized platforms, the people operations, and the offline practices, and revisit each of them closely. Each pain point in the old existing practices will help you identify the right plug (data) point to connect to the blockchain.

We will focus on four important points of integration that make large movements in implementation:
  • Data sourcing – Enterprise integration with existing systems

  • Onboarding – Compliance and regulatory requirements

  • Authorization – Access control and security access

  • Automation – Processes for auto-trigger/alerts of smart contracts
    ../images/474923_1_En_6_Chapter/474923_1_En_6_Fig1_HTML.png
    Figure 6-1

    Framework: Point of integration for a blockchain implementation

Data Sourcing: Enterprise Integration with Existing Systems

One of the prime reasons to learn how to use blockchains with Microsoft Azure is that it brings you the complete infrastructure for this point of integration at an Enterprise level. The Azure Blockchain Workbench allows for a completely agnostic set of options for various types of blockchains and their integration with companies based on existing IT ecosystems and workflows.

With large-scale enterprises becoming more and more data driven, using the correct decentralized practices in digital form has become of utmost importance and drives business decisions. And as organizations across industries would have a varied use case for a block chain application and a very different IT architecture built to cater to its functioning, Microsoft Azure comes in as a bridge that can accommodate both of these challenges. And as organizations get more and more data driven with a lot of aspects of their operations digitizing, the constant tussle of centralizing vs decentralizing shall continue and grow even further. Hence a tool like Microsoft Azure enables organization an easy and sustainable way to decentralize their processes effectively without entirely disturbing existing operations over the Enterprise Tools that were being used before Blockchains.

Consider a 10,000-person organization. The CIO wishes to make business decisions based on company strengths and weaknesses. However, the reporting of this is not very transparent, as there is a hierarchical, non-tangible process by which to derive this data offline. To avoid biases, companies integrate productivity measures in digital form; for example, the number of sales visits, number of converts, value of business, and so forth. These measures existed long before technological tools were introduced. However, with blockchains the process to trace and track these measures has become more transparent and tangible. So, when all actions update on a chain, decision-making can be a closed-loop online activity that measures and drives impact.

With this need to be connected to the stakeholders of the business—be it employees, clients, or suppliers—in tangible, traceable forms that are immutable, decentralized, and secure, blockchains are an obvious Enterprise requirement. The Azure Blockchain Workbench facilitates the smooth integration of Microsoft environments with the various elements of blockchains.

Let us see the variants of data sourcing that require different forms of integration. Data in Enterprises may be of the following types:
  • Structured – Databases, CSV files, etc.

  • Unstructured – Speech recordings, image scan documents

  • B2B – Business-to-business data flow

  • B2C – Business and consumer data

  • Crowd-sourced – Such as Wikipedia

  • Different volumes – Varying scales of data

Based on the type of data and the processes around the data, the mode of integration is selected.

In this chapter, we will focus on the most common form of structured data found in Enterprises across various domains.

Structured Data Sources

Every platform requires metadata to initiate decentralization of any process as well as towards storage of information across the distributed ledger. For instance, before blockchaining the KYC (Know Your Customer) process for a financial institution, one must source the existing data from the centralized software platforms. Most enterprises rely on smooth transitions before investing in any new technology. Based on this common expectation before adoption of Blockchains, Azure SQL Databases, one of the most widely used databases, supports easy integrations for smoother migrations from Legacy Sofwares to the adoption of Blockchains. This integration allows to source the metadata to the platform seamlessly. The flow of structured data could occur in various forms:
  • Connectivity to backend systems and existing platforms, such as Microsoft Dynamics 365, which may run ERPs and CRM applications in the organization. In such software, SQL servers are used, which can be smoothly integrated with the blockchains for data-sourcing purposes (Figure 6-2).
    ../images/474923_1_En_6_Chapter/474923_1_En_6_Fig2_HTML.png
    Figure 6-2

    Data sourcing from Azure SQL Database servers to Azure blockchains

  • Certain activities may be on the chain and certain are allowed to be off chain. When the impact of blockchains does not affect the storage of data for reporting or display purposes (non-audit related), storage onto SQL can easily be off-loaded (Figure 6-3).
    ../images/474923_1_En_6_Chapter/474923_1_En_6_Fig3_HTML.png
    Figure 6-3

    Delivery of data from distributed ledgers to off-chain databases, such as SQL servers on Azure

  • Bi-directional flow of data based on different purposes and triggers. Blockchains may store on SQL servers non-trivial data that could be used for intermediate reporting and analytics.

  • SQL servers may invoke different logic apps and event triggers in the Azure Blockchain Workbench whenever the threshold of data limiters is crossed, as defined in the smart contracts or consensus algorithms (Figure 6-4).
    ../images/474923_1_En_6_Chapter/474923_1_En_6_Fig4_HTML.png
    Figure 6-4

    Shared set of action items in terms of data distribution for different purposes

Connectivity and Definition of SQL Integrations with Blockchains

There are two steps in this process:
  1. 1.

    Establishing connectivity. The SQL Server Management Studio provides a preview of the SQL storage in the Blockchain Workbench. Before defining the database schema, you can see the changes in data flow. The basic step of integration is to set up the right set of IP addresses for the blockchain nodes and the SQL server. Then you must enable the Read-Write settings based on the directional flow of data.

     
  2. 2.

    Defining database views, application views, application role views such as buyers and sellers, user allocation to the application user, and the connection status of the application user.

     

Other ERP integrations involving PowerBI, SAP, and Excel could also be sourced to fit the blockchain ecosystems.

Azure Cosmos DB Integrations with Blockchains

Azure Cosmos DB is a globally distributed, multi-model database service for any scale. This NoSQL database provides multi-master nodes with connectivity across the globe while transparently maintaining replicas throughout. However, this is not to be confused with blockchains. Azure Cosmos DB appropriately aligns and integrates aspects of shared distributed ledgers with blockchains.

When you require an immutable, append-only ledger and are dealing with multiple parties in a trustless network with known permissioned stakeholdership, you need a combination of permissioned blockchains with Cosmos DB to maintain the distributed storage and traceability.

In other cases, where consensus is not a prime requirement, Cosmos DB may suffice without the blockchains. Such cases include those where distribution is maintained and aspects such as encryptions can be implemented on top of the arrangement. One of the Unique Selling Proposition (USP)/key differentiators of considering Azure Cosmos DB is its openness to integration with other technologies, while at the same time allowing decentralization from its foundation, along with other aspects of blockchains.

Platforms that wish to decentralize could easily transition from SQL, MongoDB, Gremlin Graph, Cassandra, Tables, and CSVs to Azure’s Cosmos DB on a large global scale.

Let’s understand a use case for Azure Cosmos DB with blockchains and then get into the technical details.

Let’s understand the use case by Microsoft over the XBOX Game Publishers’ Royalties that are accessible over the Azure Blockchain Services. This example, showcases the transparency facilitated in terms of tracing royalties from a credible source. Game publishers can access royalty statements through this assembly of technology. The process involved is a mix of on-chain tracing, off-chain visualizations & immutable audit of processes. Thereby Azure Cosmos DB enables the distributed storage of the royalties across the globe whereas the Blockchain Service maintains the states of all processes maintaining credibility of the information stored. The Blockchain Service also enables the automation of rules over the royalties in the form of Smart Contracts.

Let’s break down the implementation to better understand the process flow.
  1. 1.

    Metadata is sourced from off-chain storage, such as Azure Cosmos DB, SQL, or MongoDB.

     
  2. 2.

    Blockchain nodes are initialized with the required information and the purpose of consensus, if defined.

     
  3. 3.

    Further elements, such as event triggers, allow serverless code to be driven on-chain with alerts and triggers.

     
Here are the steps for integration:
  1. 1.

    Reshape data schema to Azure Cosmos DB from SQL centralized forms.

     
  2. 2.

    Restructure data structures to key value, column family, documents, and graphs.

     
  3. 3.

    Global distribution

     
  4. 4.

    Create a multi-master replication protocol based on validation only or a form of consensus.

     
  5. 5.

    Check geographical limitations and policies.

     
  6. 6.

    Identify the levels of trust and permissions required for the processes.

     
  7. 7.

    Stack elements relevant to the processes.

     

These steps are applicable when the distributed ledgers of data require the blockchain aspects of connected validations and triggers of smart contracts. One needs to identify the right confluence of integration for a seamless experience.

For example, enterprises that maintain large-scale data jobs on Apache Spark can seamlessly connect to Cosmos DB for the append-only transparent ledger. Further, if the data jobs require a closed-loop consensus, Azure Blockchain Workbench enables it. See: https://docs.microsoft.com/en-us/azure/cosmos-db/spark-connector.

Similar integrations can be established for IoT hub networks as well as SharePoint systems with blockchains.

Onboarding: Compliance and Regulatory Requirements

Once the sourcing of data is identified, data is sorted, structured, and stored appropriately. The classification of data for private and public blockchains as well as for on-chain and off-chain activities is crucial. Such classification is linked to the policies that establish protection rights and regulations with which every business must comply.

At the same time, the process by which the data is handled is crucial, along with the state of the data, when we talk about blockchains. For instance, a normal registration of a centralized online platform merely requires an email and password set up, with some more details. However, the process of storing the password and email is unknown to the end user. There may be unsecured platforms that store passwords in plain-text and may leak out values that could be used on secured platforms as well. Thus, onboarding a user onto a blockchain differs from such common practices.

Onboarding starts with the machine addresses, private and public keys, and the validation of other nodes, depending on the type and purpose of the blockchain.

Therefore, the second touchpoint of consideration is how this sourcing of data is seamlessly onboarded to blockchains. This onboarding may be at the start of the blockchain setup, or during intervals, or during ongoing operations, or during any number of event triggers.

However, how it is done is highly crucial to keeping the sensitivity of the data and the credibility of its state in mind. As this integration touchpoint is quite vulnerable to attack, the following aspects have to be scoped out:
  • Cybersecurity

  • Compliance

  • Regulations

  • Geographic policies (e.g., Europe)
    • GDPR

    • PSD2 and e-Privacy

  • Industrial domain policies
    • Maritime

    • Manufacturing

    • Medical

This integration touchpoint does not have direct tools to implement; it is more of a design consideration for the integration of processes related to onboarding. This varies highly based on the application, location, and domain of the blockchain platform.

GDPR Considerations for Blockchains

The General Data Protection Regulation (EU) 2016/​679 (GDPR) is a regulation in EU law that covers data protection and privacy for all individual citizens of the European Union (EU) and the European Economic Area (EEA) . It also addresses the transfer of personal data outside the EU and EEA areas. The GDPR aims primarily to give control to individuals over their personal data and to simplify the regulatory environment for international business by unifying the regulations within the EU.

This consists of three main aspects.

Definition of Purpose and Consent

While onboarding users, the definition of purpose must be clearly conveyed. Along with this, the rightful consents to use the data must be clearly described. This European policy has ensured such practices on a centralized platform. How does this apply to blockchains? The answer is in the smart contract triggers, which may comply and check in case of any deviation. For example, if a user has not provided consent, the blockchain platform must clearly convey and commit to the bylaws defined in the foundation of that blockchain.

Subject Access Request (SAR)

Upon the request of a user, SAR allows the retrieval of all personal information for that user from the platform. On an immutable ledger facilitated by blockchains, the complete history of data is traceable yet secure as the ability to access this data resides purely with the user.

Failure to comply with this provision may penalize the company with a fine of up to 20 million GBP or 4 percent of global turnover, whichever is higher. Such clauses may auto-trigger when such bylaws are broken. But the question here is, why would companies ever program a blockchain to become such non-profitable systems? The answer to this is that it enables the users to also have a beneficial contract during onboarding . The governance mechanism must require both stakeholders - the organizations & the users to comply with the regulations put forth in the smart contract mutually. It gives the user an avenue to put forth his terms. It may involve penalties or refunds based on the conditions agreed by both parties as a part of consensus. Since the user here is not a mere subscriber, this peer-to-peer relationship is master to master, and so the clauses must be balanced.

Data Breach Notification

The user must be notified if the platform faces a security breach so that suitable actions can be taken by the user. This also can be a part of a smart contract during onboarding.

Based on these three aspects, the Azure Compliance Manager extends an array of tools to be utilized for any policy defined over the cloud components and enforced throughout. This does not mean it comes embedded with the Azure Blockchain suite, but since the architecture lies in the same environment, it is easier to integrate them for their specific purposes.

More here: https://azure.microsoft.com/en-in/overview/trusted-cloud/compliance/.

Azure’s Compliance Manager offers various tools for various purposes. It covers an array of global policies and regulations across countries, industries, and timelines.

Azure Blueprints

Azure Blueprints allows businesses to utilize templates that are pre-defined as per policies and regulations, such as ISO, GDPR, etc., or to make custom templates for the entire organization to follow while building independent applications or company-wide applications. (This is currently a free service offered by Azure, allowing one to adhere to international policies, but it is not known how long they will keep it that way.)

When building international blockchains with users across different industries and countries, these templates must be considered to avoid national conflicts over data privacy and protection rights.

Azure Policy

Here, independent policies are defined. As we saw, Blueprints provides a template/framework for policies and security rules. The policy definition takes place in this tool. The blockchain policies for nodes and transactions can be stored here while designing universal policies.

Azure Security Center

When one activates the Security Center on Azure, a monitoring agent is actively deployed over the virtual machine components. It actively checks for threats and attacks. Similar to the security checks for SQL injections, brute-force attacks, and so forth in centralized systems, blockchain nodes have to be actively monitored for the same.

In case, in a trustless permissionless network, there are collusions observed in the patterns of fraudulent validations, the Security Center could trigger policies to avoid such attacks and safeguard the on-chain activities (Figure 6-5).
../images/474923_1_En_6_Chapter/474923_1_En_6_Fig5_HTML.png
Figure 6-5

Security processes

Exercise

Refer to the preceding process flow and identify the right integration components for this flow in an insurance company.

Authorization: Access Control and Security Access

Most enterprises enforce access control for various roles and activities. Based on the login credentials and metadata from the preceding stages, the proper access control is selected and functionalities are catered. Now, in case of an attack, if the lowest authority becomes vulnerable, the entire hierarchy of control will fall. Therefore, considering the ongoing practices of access control, it is highly crucial to embed the existing processes of access control onto the blockchain.

Azure Active Directory is widely used to maintain access control over all applications based on a common protocol. This component requires integration with the decentralized blockchain platform. The entity of access control is mapped from the existing record of users to the hashed machine addresses.

Another aspect of security is the Azure Key Vault, where the user stores and maintains their set of public keys and backs up the private keys if desired. However, storing keys centrally again defies the initial purpose of blockchains, as the key could be made vulnerable to attacks or leaks, making it less secure. The main reason to use the Azure Key Vault is to seamlessly integrate the existing security mechanisms with the blockchain activities.

Another form of authorization is the validator nodes, which are dependent on human intervention to approve new peers. There could be nodes assigned to forming consensus to issue CA certificates authorizing a new user on the chain.

Lastly, smart contracts may enforce a checklist of pre-requisites for the user, perhaps a minimum set of documents or a biometric scan and iris scan, to gain authorization.

The smart contract integration for such an application must consist of the following:
  • Right to access – It should allow users to understand how the contract is designed.

  • Restricted programming – It should eliminate vague definitions in code.

  • Informed triggers and alerts – It should activate conditional activities as defined.

  • Forgotten state or deletion actions – It should manage states of data on rollbacks and deletion requests.

Automation: Processes for Auto-trigger/Alerts of Smart Contracts

Since the onset of the digital era, most businesses have transitioned online, including bringing their data online. However, there are still large-scale companies relying on off-chain practices due to a failure to integrate with modern systems.

This is exactly where automation by smart contracts can facilitate faster transactions. Smart contracts not only digitizes contract data but also digitizes the states/ processes that are involved in transferring the data.

This integration can be achieved as follows:
  • REST APIs

  • Azure event triggers

  • Azure’s logic apps to service bus

  • Workbench modifications in consensus rule

Let us examine a medical transport scenario where smart contracts are to be integrated.

Consider organ transplants, which require the organ to quite literally be transacted transparently in a secure environment from the donor to the patient. Here, the data and the process around this transaction are highly sensitive. There are several state flows to be considered:
  • Organ is safely transported in the right environment.

  • Organ is tampered with at the source.

  • Organ transport had a mishap and temperature was not maintained.

  • Organ was infected during delivery at destination.

The state flow of the organ is highly crucial for the suitable outcome of the transplant. If the donor, the doctor extracting the organ, the transport conditions (via IoT), and the delivery check on the recipient side are all on a blockchain bound with a smart contract clause for a healthy organ for a successful transplant, and if any node supplies data that has tampered with the state of the organ and its environment variables, then the recipient can transparently avoid a faulty transaction. These auto-triggers and alerts can be on the chain through the Azure event trigger at the very moment the any of the conditions (defined in the smart contract) for a healthy organ fails the contract.

For example, if the cooling system during transfer were to fail, the event trigger would invoke the Azure logic app to update the state to indicate an unsuccessful transfer. This provides a safe, transparent, clause-driven ecosystem with blockchains and the smart contract.

Complete Picture

The key to a successful working ecosystem is design (Figure 6-6). Having the right set of components aligned ensures each of the components stands up to the expectations of its functionality and at the same time maintains the conjunction of processes that were already in practice. While bringing decentralization and automation through blockchain and smart contracts to organizations that have long been run in a particular way, such changes are difficult and often break into offline processes, leading to discrepancies and opaque layers of clarity.
../images/474923_1_En_6_Chapter/474923_1_En_6_Fig6_HTML.jpg
Figure 6-6

Azure components for seamless integration

Design considerations and awareness of what can be seamlessly integrated are highly crucial. This chapter has aimed to cover those thoughts and considerations in terms of the availability in the Microsoft Azure ecosystem of the components around the Azure blockchain, as shown in the Figure 6-5.

These independent Azure Components are well tested and compliant for the services described above and are widely used across enterprises. Thereby Blockchains must not be seen as a stand alone system during its adoption. It is recommended to plan integration of existing systems with Blockchains to run operations seamlessly.

Thus with this, identify the touchpoints and Azure services that suit the purposes of your blockchain and the processes around it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.170.183