Dynamically protecting read-only fields using interceptors and encryption
To dynamically protect read-only fields using interceptors and encryption, application data is received from an application executing on a client computer system connected to a server computer system connected to a computer-readable database. The application data includes multiple read-only values assigned to corresponding multiple read-only data items and stored on the computer-readable database, which stores generated encrypted read-only data collectively representing an encryption of the multiple read-only values by an encryption mechanism. The received multiple read-only values are encrypted using the same encryption mechanism resulting in received encrypted read-only data. The received encrypted read-only data is compared with the generated encrypted read-only data. Based on the comparing, it is determined that the received encrypted read-only data differs from the generated encrypted read-only data. In response, an error notification is transmitted communicating a mismatch between the stored multiple read-only data values and the received multiple read-only data values.
1 . A computer-implemented method comprising:
receiving, from an application executing on a client computer system connected to a server computer system connected to a computer-readable database, a database write request that includes each of 1) a writable field value for a writeable data item stored on the computer-readable database; 2) a plurality of received read-only field values for a plurality of read-only data items stored on the computer-readable database; and 3) sent encrypted read-only data, wherein the sent encrypted read-only data was previously generated by an encryption mechanism and previously sent to the application;
encrypting the plurality of received read-only field values using the encryption mechanism resulting in received encrypted read-only field data;
comparing the received encrypted read-only field data with the sent encrypted read-only data;
determining, based on the comparing, whether the received encrypted read-only field data differs from the sent encrypted read-only data;
in response to determining that the received encrypted read-only field data matches the sent encrypted read-only data, processing the database write request; and
in response to determining that the received encrypted read-only field data differs from the sent encrypted read-only field data:
automatically rejecting the database write request; and
transmitting an error notification to the application.
2 . The method of claim 1 , further comprising, before receiving the database write request, generating the sent encrypted read-only data by:
identifying, from the computer-readable database, the plurality of read-only data items;
identifying a plurality of stored read-only data values for the plurality of read-only data items; and
encrypting the plurality of stored read-only data values using the encryption mechanism.
3 . The method of claim 2 , further comprising:
receiving, from the application, a read request; and
in response to receiving the read request, transmitting the plurality of stored read-only data values and the sent encrypted read-only data to the client computer system.
4 . The method of claim 2 , wherein encrypting the plurality of stored read-only data values using the encryption mechanism comprises:
attaching, to the plurality of stored read-only data values, a universally unique identifier (UUID);
determining, for the plurality of stored read-only data values and the UUID, a hash value;
generating a secured object including the plurality of stored read-only data values, the UUID and the hash value; and
encoding the secured object to generate an obfuscated data object.
5 . The method of claim 1 , wherein processing the database write request comprises writing the writable field value to the writeable data item stored on the computer-readable database.
6 . The method of claim 5 , wherein processing the database write request comprises, before writing the writable field value to the writeable data item stored on the computer-readable database, determining that the writable field value received with the database write request satisfies at least one parameter of the writeable data item.
7 . The method of claim 6 , further comprising, in response to determining that the writable field value received with the database write request fails to satisfy the at least one parameter of the writeable data item, transmitting an error notification communicating a failure of the writable field value to satisfy the at least one parameter of the writeable data item.
8 . A non-transitory computer-readable storage medium storing computer instructions which when executed by one or more processors is configured to perform operations comprising:
receiving, from an application executing on a client computer system connected to a server computer system connected to a computer-readable database, a database write request that includes each of 1) a writable field value for a writeable data item stored on the computer-readable database; 2) a plurality of received read-only field values for a plurality of read-only data items stored on the computer-readable database; and 3) sent encrypted read-only data, wherein the sent encrypted read-only data was previously generated by an encryption mechanism and previously sent to the application;
encrypting the plurality of received read-only field values using the encryption mechanism resulting in received encrypted read-only field data;
comparing the received encrypted read-only field data with the sent encrypted read-only data;
determining, based on the comparing, whether the received encrypted read-only field data differs from the sent encrypted read-only data;
in response to determining that the received encrypted read-only field data matches the sent encrypted read-only data, processing the database write request; and
in response to determining that the received encrypted read-only field data differs from the sent encrypted read-only field data:
automatically rejecting the database write request; and
transmitting an error notification to the application.
9 . The medium of claim 8 , the operations further comprising, before receiving the database write request, generating the sent encrypted read-only data by:
identifying, from the computer-readable database, the plurality of read-only data items;
identifying a plurality of stored read-only data values for the plurality of read-only data items; and
encrypting the plurality of stored read-only data values using the encryption mechanism.
10 . The medium of claim 9 , the operations further comprising:
receiving, from the application, a read request; and
in response to receiving the read request, transmitting the plurality of stored read-only data values and the sent encrypted read-only data to the client computer system.
11 . The medium of claim 9 , wherein encrypting the plurality of stored read-only data values using the encryption mechanism comprises:
attaching, to the plurality of stored read-only data values, a universally unique identifier (UUID);
determining, for the plurality of stored read-only data values and the UUID, a hash value;
generating a secured object including the plurality of stored read-only data values, the UUID and the hash value; and
encoding the secured object to generate an obfuscated data object.
12 . The medium of claim 8 , wherein processing the database write request comprises writing the writable field value to the writeable data item stored on the computer-readable database.
13 . The medium of claim 12 , wherein processing the database write request comprises, before writing the writable field value to the writeable data item stored on the computer-readable database, determining that the writable field value received with the database write request satisfies at least one parameter of the writeable data item.
14 . The medium of claim 13 , the operations further comprising, in response to determining that the writable field value received with the database write request fails to satisfy the at least one parameter of the writeable data item, transmitting an error notification communicating a failure of the writable field value to satisfy the at least one parameter of the writeable data item.
15 . A computer system comprising:
one or more processors; and
a computer-readable storage medium storing instructions which when executed by the one or more processors is configured to perform operations comprising:
receiving, from an application executing on a client computer system connected to a server computer system connected to a computer-readable database, a database write request that includes each of 1) a writable field value for a writeable data item stored on the computer-readable database; 2) a plurality of received read-only field values for a plurality of read-only data items stored on the computer-readable database; and 3) first sent encrypted read-only data, wherein the sent encrypted read-only data was previously generated by an encryption mechanism and previously sent to the application;
encrypting the plurality of received read-only field values using the encryption mechanism resulting in received encrypted read-only field data values;
comparing the received encrypted read-only field data values with the first sent encrypted read-only data;
determining, based on the comparing, whether the received encrypted read-only field data values differs from the first sent encrypted read-only data;
in response to determining that the received encrypted read-only field data values matches the first sent encrypted read-only data, processing the database write request; and
in response to determining that the received encrypted read-only field data values differs from the first sent encrypted read-only field data:
automatically rejecting the database write request; and
transmitting an error notification to the application.
16 . The computer system of claim 15 , the operations further comprising, before receiving the database write request, generating the sent encrypted read-only data by:
identifying, from the computer-readable database, the plurality of read-only data items;
identifying a plurality of stored read-only data values for the plurality of read-only data items; and
encrypting the plurality of stored read-only data values using the encryption mechanism.