The present disclosure relates to a database system and a method of processing transactions using a database system shared with multiple users.
Business processes, for example multi-party business processes, can be hard to implement within databases (e.g., SQL and NoSQL), especially when the multi-party process involves private business processes of database users. Database systems historically are ill-suited to maintaining privacy in a multi-party process. While state machines can be used to implement business models within database systems, state machines and database system access control fail to: (i) naturally capture the authorizations needed to permit evolution of multi-party business processes under specific constraints, (ii) model privacy constraints, (iii) ensure database system access control authorizations can evidence the accountability of database system users to delegate parts of a multi-party business process to other database system users, and (iv) ensure database system users can coordinate their authorizations to execute specific business processes when requested (e.g., by other database system users).
Distributed ledger technology (hereinafter, “DLT”) and blockchain have attempted to facilitate multi-party business processes by implementing a distributed ledger that records multi-party business processes in the form of smart contracts (program code recorded on a ledger). Yet, existing DLT and blockchain solutions can suffer from several downsides, including for example that blockchains typically require: (i) a consensus mechanism/algorithm for distributed nodes to arrive at consensus on the correct “state” of the blockchain (and thus smart contracts recorded to the blockchain), and (ii) a replication mechanism to propagate state changes to all nodes in a distributed system. Both (i) and (ii) ensure that nodes in the distributed system are in sync as to the state of the ledger, including their shared business processes. Yet, (i) and (ii) in addition to other operations generally performed in blockchain or DLT implementations result in high overhead to the distributed system, as well as make the distributed system difficult to scale. For instance, if a blockchain or DLT is running a consensus mechanism/algorithm, it can be difficult to vertically scale throughput (transactions/sec) of the network. Similarly, utilizing a replication mechanism can introduce latency into the system.
The present disclosure solves a number of existing issues by providing a shared database system and privacy-preserving programming semantic between different parties to facilitate multi-party execution of programs with privacy and at scale.
A first aspect of the disclosure includes a database system comprising a database system memory and at least a first database server. The database system memory stores a database of data records and shared program instructions between first and second database users, wherein the shared program instructions define a privacy model comprising privacy restrictions for the first and second database users, respectively, and specify an authorization model comprising a first set of authorizations that permit the first database user to manipulate a first subset of the data records consistent with the first user's privacy restrictions and a second set of authorizations that permit the second user to manipulate a second subset of the data records consistent with the second user's privacy restrictions. The database server includes a processor configured to execute the shared program instructions, wherein the shared program instructions, when executed by the processor:
In some examples, the database system further comprises program instructions stored with the memory that, when executed, validate that the transaction includes a cryptographic authorization from the first or second user consistent with the authorization model.
In some examples, the cryptographic authorization comprises the transaction being cryptographically signed by the first or second database user.
In some examples, the database system further comprises an evidence log and program instructions stored in the memory that, when executed by the processor, record an execution history of the shared program instructions, record a request to submit the transaction, and/or record any cryptographic authorizations submitted along with the transaction.
In a further example, the database system further comprises an execution engine including program instructions that, when executed by the processor, validate that the privacy restrictions for the first or second database user and the first or second set of authorizations conform to respective global rules for the database system, and record evidence of validation of the privacy restrictions and authorizations in the evidence log.
In some examples, the database system further comprises a transaction and concurrency engine having program instructions that, when executed by the processor, use a concurrency control protocol to process concurrent transactions submitted to the database system.
In some examples the shared program instructions are, at least in part, stored procedures stored in the memory, and the system further comprises a procedural handler configured to determine, from the transaction submitted by the first or second database user, one or more stored procedures suitable to process the transaction and process, at least in part, the transaction by executing the one or more stored procedures.
In some examples, the database system further comprises an execution engine configured to execute the shared program instructions and enforce the privacy and authorization models.
In a further example, the execution engine is configured to limit access to the data records in a manner consistent with the privacy model.
In an alternative example, the execution engine is configured to execute the shared program instructions and, if specified by the shared program instructions, alter the privacy and authorization models consistent with the shared program instructions.
In some examples, the transaction is submitted by the second database user and the shared program instructions, when executed by the processor, change at least the first database user's access to the first subset of the data records.
In another example, the transaction is submitted by the second database user and the shared program instructions, when executed by the processor, change at least the first database user's first set of authorizations that permit the first database user to manipulate the first subset of the data records.
In some examples, the shared program instructions, when executed by the processor, alter the privacy and authorization models only if certain data is present or not present in the evidence log or the transaction.
In some examples, the shared program instructions, when executed by the processor, perform step (3) and commit the transaction only if certain data is present or not present in the evidence log or the transaction itself.
In some examples, the shared program instructions, when executed by the processor, commit both the transaction and evidence of its privacy and authorization validity simultaneously.
A method of processing a plurality of transactions using a database system comprising a database system memory configured to store a database of data records, and at least a first database server including a processor, the method comprising:
In some examples, the method further comprises the step of validating that the transaction includes cryptographic authorization from the first or second database user in accordance with the privacy model and/or authorization model.
In some examples of the method, the transaction includes a request to manipulate, consistent with the first set of authorizations, the first subset of data records in response to a condition, wherein step (B) comprises verifying occurrence of the condition and manipulating the first subset of data records consistent with the privacy and authorization models.
In some examples of the method, the condition includes determining whether a status of another transaction or a subset of the data records meets certain criteria.
In some examples of the method, the privacy model and/or authorization model specify one or more anticipated actions or results, as part of the submitted transaction.
In some examples of the method, the database system further comprises an evidence log, the method further comprising:
In one example, the method further comprises validating that the privacy restrictions for the first or second database users in the privacy model and the first or second set of authorizations in the authorization model conform to respective global rules for the database system and recording evidence of validation of the privacy restrictions and authorizations in the evidence log.
In one example, the method further comprises executing a concurrency control protocol to process concurrent transactions submitted to the database system.
In some examples, the database system memory stores program instructions, at least in part, as stored procedures, wherein the method further comprises a procedural handler of the database server performing the steps of determining, from the transaction submitted by the first or second database user, one or more stored procedures suitable to process the transaction and processing, at least in part, the transaction by executing the one or more stored procedures.
Examples of the present disclosure are described with reference to the figures below:
The present disclosure relates to a database system including a privacy and authorization-preserving programming semantic that facilitates multi-party processes between different users or entities. In an example, the database can utilize a relational (e.g., SQL), non-relational (e.g., NoSQL), graph, or another type of database model. In some examples the database can provide a centralized view of data that is accessible by multiple users (i.e., where the data is not replicated across nodes associated with each user of the database). In other words, in some examples the database can be a centralized database that does not use a distributed consensus protocol or a replication mechanism, and therefore is not a DLT. Thus, as described below, the database can provide multi-party execution of programs with privacy and proper authorization, without suffering from some of the existing deficiencies of DLT. Access to data on the database can be provided by way of a database management system that allows users and applications to interact with the database and data contained therein.
The common programming semantic of the database, referred to herein as DAML, allows database system users to express multi-party business logic and uses a specific runtime that ensures all database transactions are properly authorized by the correct party or parties, and that proper privacy constraints are enforced for data relating to transactions. DAML is described in detail in WO 2017/187394 (“DAML 2”) and WO 2019/082142 (“DAML 3”), the disclosures of which are hereby incorporated by reference herein in their entireties. The database system can store programs (e.g., expressed in DAML) that multiple parties can interact with and, when executed, can manipulate or read data records, evolve database schema, record evidence of execution of the stored programs, and other tasks with privacy and proper authorization. The result is a novel database system that, among multiple parties, is itself natively private, auditable, and preserves authorizations according to the common programming semantic (e.g., DAML).
Database system 1 can include a database server 9 having a processor 11 and storage or memory 3. In an example, memory 3 can store program instructions 51 relating to programs expressed in the programming semantic (e.g., DAML), a database of data records 7, and/or an evidence log 57 recording details around the execution of program instructions 51 (e.g., upon transactions being submitted to database server 9). In an alternate example, program instructions 51 can be stored in storage or memory 3′ that does not form part of database server 9 (e.g., storage or memory located apart from database server 9). Program instructions 51 (e.g., DAML) can be executed by a database user 21, 31, 41 by submitting transactions 53 (
Database system 1 can have a persistence module that persists programming instructions 51, for example programs expressed in DAML. In an example, the persistence module can be memory 3 that is part of database server 9, or alternatively memory 3′ located apart from database server 9. The persistence module can be used to persist programming instructions 51 so that, as described in more detail below, multiple database users 21, 31, 41 can submit transactions 53 to database system 1, for instance database server 9, and execute particular programs 51 that the specific user 21, 31, 41 is entitled to execute. Whether a database user 21, 31, 41 can execute a particular program 51, or part thereof, stored in the persistence module, and how or whether the executing database user 21, 31, 41 gets access to information and/or results from the execution of that program 51, can be determined by, inter alia: (i) how parties choose to express the program in DAML, and (ii) how DAML's authorization and privacy constraints are enforced by way of an execution engine 2 (described more fully below) used to execute the DAML program.
Database system 1 can have a transaction and concurrency engine 6 that can process transactions 53 submitted to database system 1. Transactions 53 can be the primary mechanism by which database users 21, 31, 41 access and/or manipulate data records 7 stored in the persistence module (e.g., memory 3). Transaction and concurrency engine 6 can function to receive submitted transactions 53 concurrently from multiple database users 21, 31, 41, process such transactions 53 and, if conforming to privacy 13 and authorization models 19 (
Transaction and concurrency engine 6, in an example, only processes transactions 53 submitted by any of database users 21, 31, 41 that are permitted according to the shared programming semantic (DAML) that exists between users 21, 31, 41. Stated differently, in an embodiment of the DAML context, a transaction 53 requesting execution of a DAML program(s) 51 must be permitted according to the authorization and privacy constraints of the DAML program(s) 51 that specific database users authorize and commit to database system 1 (e.g., store in the persistence module for later execution by such database users).
In some embodiments, the authorization and privacy constraints of the DAML program(s) 51 and data can depend both on the dynamic context of execution of the DAML program(s) 51 and the dynamic context of data creation of the accessed data (such as data records 7) of the database system 1. This means that the authorization constraints of a user can change as a DAML program 51 is executed by the system 1 and changes state. In this way, the system 1 enables separate, programmatically-defined access control to be combined into anticipatable, scalable and safe systems of access control.
The mechanism for database users to specify the types of DAML programs that can be executed, and which parts, is described below in a more detailed discussion of DAML as it applies to database system 1. In an example, a transaction 53, if valid and committed to database system 1 after processing by transaction and concurrency engine 6, can execute DAML program instructions 51 that:
As described in more detail below in connection with an exemplary method of using database system 1, the different functions of a transaction 53 can act to provide a multi-party database system 1 that allows execution of DAML programs 51, multi-party migration of database schema, and other database operations to allow any number of database users to use a single database system 1. As a result, any number of database users can access a multi-party database system 1 and utilize a joint ledger of their respective data, with privacy and proper authorization, and without some drawbacks of DLT systems like lower scalability or increased latency.
Database system 1, for instance its transaction and concurrency engine 6, can also utilize a concurrency protocol to permit concurrent transactions 53 while maintaining important transactional properties (e.g., atomicity, consistency, isolation, and durability). Atomicity—that either execution of all of a transaction occurs or no execution occurs—can be achieved along with transactional isolation by using any of the following concurrency mechanisms, alone or in combination, in database system 1:
In addition, it is to be appreciated that other concurrency control types may also be utilized alone, or in conjunction with the above, including:
As described above, transaction and concurrency engine 6 can therefore concurrently process transactions 53 submitted by different database users 21, 31, 41 so that such users can compose DAML programs 51 that define the multi-party database actions and rights provided to each user 21, 31, 41.
Database system 1 can further include an execution engine 2 for executing program instructions 51 (e.g., DAML programs). Execution engine 2 can include a runtime system with a runtime environment for the execution of DAML program instructions 51.
In an example, the runtime system of execution engine 2 can receive a submitted operation from user 21, 31, 41 to modify a shared database state through the authorized execution of program instructions 51 that creates, reads, updates, and/or deletes stored data. The operation can be part of a sequence of operations, such as transaction 53. In the DAML context of database system 1, authorization to modify and access data associated to shared multi-user programming semantics can depend on previously submitted operations or transactions 53. In further examples, authorization can also depend on the specific identity of the submitting users 21, 31, 41. These authorizations may also depend on specific users being given authorization through a DAML execution, such as access rights. In an example, the DAML execution engine 2 can perform the following steps:
In an example, step 3 above can rely on a log of previous operations or transactions. In another example, step 3 can rely on additional data being stored directly with the data received by the submission of the operation by the user.
As described above, prior to committing the expected operation result to database system 1, execution engine 2 can validate the correctness of the expected operation result. This can include checking privacy constraints, authorization constraints and data-change consistency constraints. As also described above, authorization and privacy constraints can depend on dynamic factors such as the dynamic context of execution of the DAML program 51. In this way, prior to commitment of the expected operation result (and thus transaction 53), database system 1 can enable the submitted operation/transaction to delete part or all of any newly created data. In an example, such deleted data that can be referred to as transient data since the data is in a transient state (e.g., it exists for the duration of a transaction 53 and then is deleted within that same transaction 53). Stated differently, database system 1 can provide for authorization and privacy constraints to depend on transient data and on the dynamic creation and deletion of transient data.
In an example, execution engine 2 can coordinate with transaction and concurrency engine 6 of system 1 and provide one or more transactional properties to the finalized results (i.e., the committed expected operation or transaction results). For example, as described above transactional properties may include atomicity, consistency, isolation, and durability.
In the DAML context, transactionality of system 1 is achieved natively with memory mapped files and the use of an ‘fsync’ like operating system command Transactionality can also be achieved with a database engine working locally with the DAML execution engine 2, an enterprise server or container services (e.g., Java application servers, Kubernetes' ReplicaSet and StatefulSet), and a remote database service. Similarly, reliable delivery and receipt reception can be achieved with a reliable message delivery between users 21, 31, 41 and the DAML execution engine 2.
In a further example, execution engine 2 can comprise instructions that, when executed as part of a transaction by a database user 21, 31, 41, validates that the authorized execution deriving from the finalized and committed transaction 53 satisfies privacy restrictions and authorization conditions. The privacy restrictions and authorization conditions can be captured in privacy model 13 and authorization model 19, respectively. An exemplary authorization condition can ensure that no database user's authorization is evidenced without the requested authorization of the database user 21, 31, 41. The requested authorization of the database user may be a cryptographic authorization.
In further examples, distributed execution of program instructions 51 over multiple DAML execution engine nodes 2 can be provided. For example, one or more distributed consensus protocols to transition steps 2 to 3, and steps 4 to 5 above can be used. Exemplary use of a distributed consensus protocol can be coordinated with the transaction and concurrency engine 6 of system 1.
Strong privacy of a business process can be achieved when steps 1 to 5 above are partitioned by DAML privacy and data sharing concerns within an exemplary DAML execution engine 2. In effect, steps 1 to 5 happen separately by users, or groups of users, that share the same privacy view of all or part of the DAML operations. In this way privacy can be achieved through:
In a further example, likewise to distributed execution of program instructions 51, an exemplary use of a privacy consensus protocol to transition steps 2 to 3, and steps 4 to 5 above can ensure that the DAML privacy and data sharing concerns is correct. A privacy consensus protocol can also ensure that the same result is seen in whole or in part by all affected and authorized users of the operations or transactions 53. In an example, use of a privacy consensus protocol can be coordinated with the transaction and concurrency engine 6 of system 1.
In the context of the present system 1, execution of a DAML operation or transaction (via program instructions 51) can happen:
In addition, DAML programs can only progress and affect data within specific and well-defined rules (that is, the DAML semantics as described in further detail below). For this reason, validation can be a central part of the execution of a DAML operation within a DAML program. In addition, execution of a DAML program can have the DAML program being shared and communicated to the users and execution nodes, prior to the users submitting specific operations to execute shared segments of the shared program. This allows the DAML execution engine 2 to analyse and precompute program execution and data flow properties as an integral part of the execution process. This can also achieve the following purposes:
As described above, the programming semantic used in database system 1, in an example, can be a programming language created by the Applicant, referred to as DAML. A number of details surrounding DAML can be found in the DAML 2 and DAML 3 applications filed by the Applicant and incorporated by reference herein above. In an embodiment, execution engine 2 can be the mechanism by which DAML programs 51 are executed by database users 21, 31, 41 when submitting transactions 53 to database system 1. What follows below is a description of certain features of DAML relevant to database system 1, and how execution engine 2 (e.g., its runtime system and environment) executes DAML programs 51 to ensure database system 1 includes multi-party privacy, auditability, and proper authorizations. To illustrate the preceding, an example DAML program is provided in
DAML programs can be expressed as a template or series of templates 59, 59′, 59″ (
DAML semantics, along with the enforcement of those semantics by execution engine 2, can define a privacy model 13 and an authorization model 19 (
Stated differently, database users 21, 31, 41 can compose DAML templates 59, 59′, 59″, 81 in a myriad of ways using the DAML language and the semantics of DAML, as enforced by execution engine 2, can ensure that a privacy model 13 that includes privacy restrictions 14 associated with any subset of database users 21, 31, 41 (
In addition, database users 21, 31, 41 can compose DAML templates 59, 59′, 59″, 81 so that instantiations of a template 59, 59′, 59″, 81 conform to an authorization model 19 that includes authorizations 20 to run parts of the instantiated DAML program(s) by certain of database users 21, 31, 41. In an example, a subset of database users can, in DAML, define a first database user 21's authorizations 25′, 35′, 45′, a second database user 31's authorizations 25″, 35″, 45″, and any N database user's authorizations 25′″, 35′″, 45′″ to execute defined parts of the instantiated DAML template 59, 59′, 59″, 81. Authorizations 25′, 25″, 25′″, 35′, 35″, 35′″, 45′, 45″, 45′″ can permit the database users to execute certain parts of the DAML program and thereby access and/or manipulate 54′, 54″, 54″, 55′, 55″, 55′″, 56′, 56″, 56′″, respectively, first 27, second 37, and N 47 subsets of data records stored in database system 1 (
Any of privacy restrictions 23′, 23″, 23′″, 33′, 33″, 33′″, 43′, 43″, 43′″, can specify the respective database user's access (e.g., read, write, or no access) to data records 7 stored with database system 1 for all states of a particular DAML program(s). In addition, the privacy restrictions of a particular database user to data records 7 stored within the database system 1 can change as a DAML program is executed by system 1 and changes state. Changes to privacy restrictions can be anticipatable as such changes follow the rules defined within their corresponding DAML templates. For instance, a first database user 21 can have privacy restrictions 23′, 33′, 43′, according to the DAML semantics of the associated DAML template(s), that restrict user 21's access (e.g., read, write, or no access) to a first subset of data records 27 stored in database system 1, a second database user 31 can have privacy restrictions 23″, 33″, 43″, according to the semantics of the same DAML template(s), that restrict user 31's access (e.g., read, write, or no access) to a second subset of data records 37 stored in database system 1, and any N database user can have privacy restrictions 23′″, 33′″, 43′″ that restrict N users' access (e.g., read, write, or no access) to N subset of data records 47 stored in database system 1. Further, as detailed more fully elsewhere in the description, as transactions 53 are submitted by first 21, second 31, or N database users to database system 1 (e.g., database server 9), any of privacy restrictions 23′, 23″, 23′″, 33′, 33″, 33′″, 43′, 43″, 43′″ can be altered as the associated DAML program state and/or the state of data records 27, 37, 47 changes.
In addition, any of authorizations 25′, 25″, 25′″, 35′, 35″, 35′″, 45′, 45″, 45′″ can specify, inter alia: (i) a database user's ability to execute certain parts of an instantiated DAML program, (ii) the database user's ability to delegate execution of such part of the DAML program to another database user(s), (iii) the ability for other database users to execute parts of DAML programs that would impact the database user, and/or (iv) the ability of the database user to access and/or manipulate specific subsets of data records in database system 1. In addition, as with privacy restrictions, authorizations of a particular database user to do any of (i) to (iv) can change as a DAML program is executed by system 1 and changes state. For instance, a first database user 21 can have authorizations 25′, 35′, 45″, according to the DAML semantics of the associated DAML template(s), that define user 21's authorizations to do any of (i) to (iv), a second database user 31 can have authorizations 25″, 35″, 45″, according to the DAML semantics of the same DAML template(s), that define user 31's authorizations to do any of (i) to (iv), and any N database user can have authorizations 25′″, 35′″, 45′″ to do any of (i) to (iv). Further, as detailed more fully elsewhere in the description, as transactions 53 are submitted by first 21, second 31, or N database users, any of authorizations 25′, 25″, 25′″, 35′, 35″, 35′″, 45′, 45″, 45′″ can be altered as the associated DAML program state and/or the state of data records 27, 37, 47 changes. In some examples, this can include a transaction 53 submitted by one database user that changes another database user's access to the other database user's subset of data records and/or authorizations to manipulate the subset of data records.
Privacy restrictions 23′, 23″, 23′″ and authorization sets 25′, 25″, 25′″ might be evidenced in database system 1 as authorized privacy restrictions and authorization by database user 21 toward itself and toward users 31 and 41. Privacy restrictions 33′, 33″, 33′″ and authorization sets 35′, 35″, 35′″ might be evidenced in database system 1 as authorized privacy restrictions and authorization by database user 31 toward itself and toward users 21 and 41. Privacy restrictions 43′, 43″, 43′″ and authorization sets 45′, 45″, 45″ might be evidenced in database system 1 as authorized privacy restrictions and authorization by database user 41 toward itself and toward users 21 and 31.
A concrete example illustrating the above aspects of the disclosure is useful. Referring to
Conversely, the “signatory” keyword mentioned above can, in an example, signify that a Party(ies) (here, issuer 197) has read access to instantiations of template 81, but also that the Party(ies) must cryptographically authorize instantiations of template 81 (and database system 1 must be able to evidence instantiation of template 81 to a by Party) for the instantiation to be valid within database system 1. For instance, clearly as shown at the top of
Thus, the semantics of DAML—in this case the “signatory” and “observer” keywords—can dictate certain privacy restrictions and authorization constraints for different database users, which can be enforced during execution of the specific DAML program by execution engine 2. For instance, it could be the case that database user 21 is associated, by a unique cryptographic identity recorded to database system 1, with bank Party 78 of instantiation 75 of template 81 shown in
Further authorization constraints can be built into the semantics of DAML and enforced within database system by execution engine 2. Examples of such authorization constraints are discussed below in connection with the Cash template 81 of
Using Cash template 81 as an example of authorization constraints, it can be seen that template 81 includes multiple choices 83, 85 that can be executed by owner 84. In an example, the semantics of DAML—in this case the use of the keywords “controller owner can”—dictate authorization constraints that can be enforced by execution engine 2 upon instantiation of template 81. The “controller can” syntax, when interpreted and executed by execution engine 2, can indicate that only the designated Party(ies) (here, owner 84) is authorized to execute the relevant code declaration or logic (e.g., the body of choice 83 in
Thus, the semantics of DAML can be used by any database users 21, 31, 41 to compose DAML programs and ensure that appropriate privacy restrictions and authorization constraints are enforced between users 21, 31, 41. As detailed below, execution engine 2 can play an important role in ensuring that privacy restrictions and authorization constraints are enforced in database system 1 when a DAML program is executed within database system 1.
Database system 1 can use a database evidence log 57 to record an execution history of shared code segments (e.g., the execution of instantiated DAML templates), submitted transactions 53, cryptographic authorizations associated with transactions 53, and other information useful as evidence or for auditing database system 1. In some examples, this can include evidence of validation of privacy restrictions and/or authorizations. In other words, evidence that execution of an instantiated DAML template conforms to any associated privacy model and/or authorization model.
Evidence log 57 (also referred to herein as an “audit log”) can include auditable information for database users 21, 31, 41 to validate the state of database system 1 according to the different (and permitted) views of each database user. It is to be appreciated that in further examples, this may also allow a database server 9 and other parties to validate the state of database system 1 in accordance with privacy restrictions and authorizations.
An example of an evidence log 57 is illustrated in
Database system 1 can ensure that all database transactions have proper evidence. Recorded evidence can be associated to each transaction as part of each transaction. In other words, transaction and concurrency engine 6, execution engine 2, and evidence log 57 can process together and commit each portion of evidence to evidence log 57 together with committing the evidenced transaction and evidenced database operations. Database system 1 can ensure that no transaction or database operation is committed without evidence, and no portion of evidence log 57 is recorded without the database recording the corresponding evidenced transaction and operations.
The database transaction and concurrency engine 6, execution engine 2, and evidence log 57 can be used to determine which transactions 53 submitted to database system 1 are valid and can be committed with evidence in. If committed, a transaction 53 can both result in the execution of a DAML program(s) 51, or part thereof, on behalf of one or more database users 21, 31, 41 and result in a portion of evidence log 57 evidencing the validity of transaction 53. Evidence within evidence log 57 can be viewed by one or more database users subject to the evidenced transactions privacy and authorization constraints, thereby allowing multi-party definition and evidenced execution of programs 51 using database system 1. Evidenced transactions 53 can, in some cases, have the effect of manipulating data records 7, evolving database schema, or performing other database actions, thereby allowing multi-party evidenced data records 7 used across multi-party programs 51.
Database system 1 query operations can produce evidence results. A database user can request a database transaction 53 that commits results that depend on the presence or the absence of specific evidence log 57 data. Database authorization can authorize execution of specific program segments conditional to the presence or absence of specific evidence result within the program's query operations to the evidence log 57 data. Database authorization can authorize execution of specific program segments conditional to the creation of specific evidence result within the program's operations. An exemplary evidence log 57 implementing DAML semantics can record authorized and evidenced transaction results, authorizations, and data, allowing one or more database users 21, 31, 41 to authorize transactions that authorize program execution conditional to the presence or absence of previous or current transaction results.
Database system 1 can ensure that an execution authorization for a specific program segment can be conditional to the presence, within the transaction that is expecting to execute the specific program segment, of specific operations on data, or authorization, or specific execution operations. Database users frequently rely on such transaction-wide conditions to manage data within groups of database users, where database users can be free to operate on data within a specific group of database users, but must include specific authorizing database users for transactions that include out-of-group database users.
Database system 1 may include constraints to ensure the privacy of evidence log 57 according to each database user's specific “view”. In other words, each database user can only view the portion of audit log 57 applicable to its own access authorizations to data records 7. As such, any database user, in an example, is not privy to audit log 57 information relevant to other database users unless permitted according to DAML semantics, as detailed above. This practically means that database users can verify the state of database system 1 only as it pertains to their permitted view.
Database system 1 may include use of dedicated secure hardware features (e.g., a trusted-execution environment or secure enclave, such as Intel SGX) to attest that evidence within, and returned by a query from, the evidence log 57 are the results of execution and storage with the use of an authenticated version of database system 1, and an authenticated version of the evidence log 57. In other words, through the use of dedicated secure hardware features, an authenticated version of a correct database system 1 implementing the shared database program semantics (e.g., DAML semantics), including an authenticated correct evidence log program, can attest to each user correct private and authorized execution of database transactions entered into the evidence log by the user, and queried from the evidence log 57 by the user.
Referring to
DAML templates 59′, 59″, 59′″ can define privacy 13 and authorization 19 models amongst database users 21, 31, 41. Indeed, as described in detail above, the semantics of DAML can allow database users 21, 31, 41 to compose DAML programs and define privacy 13 and authorization 19 models or constraints for their particular use case (e.g., here, the exchange of digital assets over a computer network). In an example, one of templates 59′, 59″, 59′″ could be Cash template 81 of
To access and/or manipulate data records 7 in database system 1, any of database users 21, 31, 41 can submit transactions 53 to database system 1. A transaction 53 can be a request sent by a computer or node 20, 30, 40 of any of users 21, 31, 41 over a communication network (e.g., the Internet) to database system 1 (e.g., database server 9) to access or manipulate any data record 7.
As shown in exemplary process 100 of
Transaction, concurrency, and execution engines 6 and 2 can also process 120 transaction 53 to determine whether transaction 53 conforms to privacy 13 and authorization 19 models. If transaction 53 conforms to privacy 13 and authorization 19 models, transaction 53 can be committed and, as shown in
As mentioned above, if transaction 53 conforms to privacy 13 and authorization 19 models, transaction 53 can be committed. In an example, execution engine 2 can provide a mechanism to commit a transaction 53 to database system 1. For instance, the runtime system of execution engine 2 can act to execute an instantiated DAML template 59′, 59″, 59′″ and ensure that such execution conforms to privacy 13 and authorization 19 models of the particular instantiation. In an example, in response to a transaction 53, program instructions 51 corresponding to the instantiated DAML template 59′, 59″, 59′″ can be retrieved from the persistence module (e.g., memory 3) and executed using the runtime system of execution engine 2 by processor 11. If the particular transaction 53 requesting execution of the instantiated DAML template 59′, 59″, 59′″ contains parameters or other data necessary for the execution of the instantiated DAML template 59′, 59″, 59′″, such parameters or data can be provided to execution engine 2 during execution of the instantiated DAML template 59′, 59″, 59′″.
Further, execution engine 2 can ensure that privacy 13 and authorization 19 models are enforced during execution of such instantiated DAML template 59′, 59″, 59′″ (e.g., with the necessary parameters or data). For instance, when transaction 53 is submitted, data in the form of a cryptographic signature or a representation thereof by the computer node 20, 30, 40 that submitted the transaction request can be included along with transaction 53. And, upon execution of the instantiated DAML template 59′, 59″, 59′″, the runtime system of execution engine 2 can determine whether the computer node 20, 30, 40 that submitted transaction 53 is authorized to execute the instantiated DAML template 59′, 59″, 59′″. For instance, execution engine 2 can perform any of the authorization processes described in DAML 2 or 3, including so-called “obligable computation” authorization checks described in DAML 3 in ¶s [219] to [231]. If any of the related authorization sets 25′, 25″ 25′″, 35′, 35″, 35′″, 45′, 45″, 45′″ are violated by transaction 53, such that transaction 53 does not conform to authorization model 19, then execution engine 2 can fail execution of the instantiated DAML template 59′, 59″, 59′″ and exit the relevant process (e.g., with a message communicated to the computer node 20, 30, 40 submitting the transaction request). For instance, if an incorrect cryptographic signature is presented along with transaction 53, execution engine 2 can fail the execution of the instantiated DAML template 59′, 59″, 59′″ at runtime and not commit transaction 53 to database system 1. In another example, if a node 20, 30, 40 associated with transaction 53 has not provided appropriate authorization, execution engine 2 can fail the execution of the instantiated DAML template and not commit transaction 53 to database system 1.
Likewise, execution engine 2 can ensure that privacy model 13 is enforced during execution of an instantiated DAML template 59′, 59″, 59′″ (e.g., with the necessary parameters or data). For instance, any of privacy restrictions 23′, 23″, 23′″, 33′, 33″, 33′″, 43′, 43″, 43′″ can be altered with respect to related subsets of data records 27, 37, 47 and/or new privacy restrictions 14 can be created with respect to a different subset(s) of data records 7 during submission of a transaction 53 in which an instantiated DAML template 59′, 59″, 59′″ is executed using execution engine 2. Further, the alteration and/or creation of privacy restrictions applicable to different subsets of data records 7 can be dictated by how different database users 21, 31, 41 syntactically compose their DAML programs and how execution engine 2 (e.g., its runtime system) enforces that DAML syntax. For instance, template 81 of
As also shown in
As demonstrated through the above example, database system 1 and its execution engine 2 enforces privacy restrictions 14 and authorization constraints 20 amongst different database users, which can both be changed as different database users submit transactions 53 to database server 9. In addition, data corresponding to transactions 53 submitted to database system 1 can be captured in an evidence log 57 that also conforms to privacy restrictions 14 shared between different database users. The result is a multi-party database system 1 that is privacy and authorization preserving, and is auditable by all database users.
In an example, DAML can be used as a procedural language for interaction with database system 301 and DAML templates and/or their instantiations can be stored in the database server of database system 301 as stored procedures 304. In an example, DAML stored procedures 304 can be stored in a data dictionary of database system 301. Further, a procedural handler or procedural language handler 302 can be included with database system 301. Procedural language handler 302 can comprise program instructions that parse, complete syntax analysis, and execution of a DAML stored procedure 304. Thus, procedural language handler 302 can comprise program instructions stored with the database server of database system 301, which act to interpret DAML contracts composed between different database users and take action in database system 301 (e.g., access and/or manipulate data records, for instance tables 308).
Similar to as described above with database system 1, data records stored in database system 301 can be accessed and/or manipulated by submitting transactions to the database server of database system 301, which have the effect of executing DAML stored procedures 304. As illustrated in
In an alternative embodiment, a programming language other than DAML can be used as the stored procedures language.
[1]
[2] The processor 1802 performs the instructions stored on memory 1803 and/or data storage device 1820. Processor 1802 receives an input by a user such as database users 21, 31, 41. Processor 1802 determines an instruction based on the input by a database user. The instruction may be a function to execute. The processor 1802 may execute instructions stored in the program code 1804 to indicate any output or result to the user 21, 31, 41.
It will be appreciated by persons skilled in the art that numerous variations and/or modifications may be made to the above-described embodiments, without departing from the broad general scope of the present disclosure. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive.
As an example and without limitation, although cryptographic authorization (e.g., cryptographic signature) is discussed in the disclosure, it is to be appreciated that other authorization mechanisms can be used with database system 1, including the submission of transactions 53 by database users. For instance, database users can authenticate themselves through non-cryptographic means (e.g., through the use of login credentials and/or a password) and then authorize transactions 53 using such non-cryptographic means.
In addition, although above in the disclosure a database server 9 is disclosed, it is to be appreciated that multiple database servers can be used in database system 1. Such multiple database servers can be combined with a controller to commit joint transactions between the multiple database servers.
Number | Date | Country | |
---|---|---|---|
62856808 | Jun 2019 | US |