diff --git a/samples/README.md b/samples/README.md index 3e97aa2a..53cdcb71 100644 --- a/samples/README.md +++ b/samples/README.md @@ -1,5 +1,112 @@ -`Note`: -- add "include ':samples'" in settings.gradle file. -- In all the files, replace VAULT_ID, VAULT_URL with the actual vault details in skyflow.Configuration() and TOKEN_URL in TokenProvider implementation -- Replace CARD_NUMBER_TOKEN,GATEWAY_CVV_GEN_URL,GATEWAY_TOKEN in GenerateCvv.kt file -- Replace EXPIRATION_DATE_TOKEN,GATEWAY_URL_PULL_FUNDS_URL,TOKEN_LOCAL_URL in PullFunds.kt file. \ No newline at end of file +# Skyflow-Android Sdk Sample Templates +Use this folder to test the functionalities of JS-SDK just by adding `VAULT-ID` `VAULT-URL` and `SERVICE-ACCOUNT` details at the required place. + + +### Prerequisites +- [Node.js](https://nodejs.org/en/) version 10 or above +- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) version 6.x.x +- [express.js](http://expressjs.com/en/starter/hello-world.html) +- Android Gradle plugin 4.2.0 and above +- Android 5.0 (API level 21) and above + +## Configure +- Before you can run the sample app, create a vault. +- `TOKEN_URL` for generating bearer token. +- Add `include ':samples'` in [settings.gradle](../settings.gradle) file. +### Create The Vault +1. In a browser, navigate to Skyflow Studio and log in. +2. Create a vault by clicking **Create Vault** > **Upload Vault Schema**. +3. Choose [data/vaultSchema.json](data/vaultSchema.json). +4. Once the vault is created, click the gear icon and select **Edit Vault** Details. + +### Create A Service Account +1. In the side navigation click, **IAM** > **Service Accounts** > **New Service Account**. +2. For Name, enter **Test-Js-Android-Sample**. For Roles, choose the required roles for specific action. +3. Click **Create**. Your browser downloads a **credentials.json** file. Keep this file secure, as you'll need it in the next steps. + +### Create TOKEN_END_POINT_URL +- Create a new directory named `bearer-token-generator`. + + mkdir bearer-token-generator +- Navigate to `bearer-token-generator` directory. + + cd bearer-token-generator +- Initialize npm + + npm init +- Install `skyflow-node` + + npm i skyflow-node +- Create `index.js` file +- Open `index.js` file +- populate `index.js` file with below code snippet +```javascript +const express = require('express') +const app = express() +var cors = require('cors') +const port = 3000 +const { + generateBearerToken, + isExpired +} = require('skyflow-node'); + +app.use(cors()) + +let filepath = 'cred.json'; +let bearerToken = ""; + +function getSkyflowBearerToken() { + return new Promise(async (resolve, reject) => { + try { + if (!isExpired(bearerToken)) resolve(bearerToken) + else { + let response = await generateBearerToken(filepath); + bearerToken = response.accessToken; + resolve(bearerToken); + } + } catch (e) { + reject(e); + } + }); +} + +app.get('/', async (req, res) => { + let bearerToken = await getSkyflowBearerToken(); + res.json({"accessToken" : bearerToken}); +}) + +app.listen(port, () => { + console.log(`Server is listening on port ${port}`) +}) + +``` +- Start the server + + node index.js + server will start at `localhost:3000` + + +## Sample Templates +- [`Collect data`](src/main/java/com/Skyflow/CollectActivity.kt) + - This sample illustrates how to use secure Skyflow elements to collect sensitive user information and reveal it to the user via tokens. + - Configure + - Update `VAULT_ID` with the above created vault. + - Update `VAULT_URL` with the above created vault. + - Update `TOKEN_URL` with `http://localhost:3000/` +- [`Custom Validation`](src/main/java/com/Skyflow/CustomValidationActivity.kt) + - This sample illustrates how to use custom validation with skylow collect elements. + - Configure + - Update `VAULT_ID` with the above created vault. + - Update `VAULT_URL` with the above created vault. + +- [`Reveal`](src/main/java/com/Skyflow/RevealActivity.kt) + - This sample illustrates how functionality of reveal feature works. + - Configure + - Update all `VAULT_ID` with the above created vault. + - Update all `VAULT_URL` with the above created vault. + - Update `` and `` with skyflow id. Skyflow id is a unique string attached with each row of data in Skyflow vault. You can get it from vault for existing row. + - Update `` and `` with data tokens. Data tokens are the tokenized form of data. It can be accessed while insertion collection of data in console. Make sure that the tokens used here, exists in vault. + + +## Run Templates +- build and run in android \ No newline at end of file diff --git a/samples/data/vaultSchema.json b/samples/data/vaultSchema.json new file mode 100644 index 00000000..5def2273 --- /dev/null +++ b/samples/data/vaultSchema.json @@ -0,0 +1,1259 @@ +{ + "schemas": [ + { + "ID": "f31d9ad3775f4caebc68e7f1a9b00143", + "name": "credit_cards", + "parentSchemaProperties": null, + "fields": [ + { + "name": "skyflow_id", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "PLAIN_TEXT" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "ALL_OP" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "LOW" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.SkyflowID" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Skyflow defined Primary Key" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Skyflow ID" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "cardholder_name", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "REDACT" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Name of the person on the credit card" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "card_number", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "MASK" + ] + }, + { + "name": "skyflow.options.find_pattern", + "values": [ + "[0-9 -]*([0-9 -]{4}$)" + ] + }, + { + "name": "skyflow.options.replace_pattern", + "values": [ + "XXXXXXXXXXXX${1}" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|^[\\s]*?([0-9]{2,6}[ -]?){3,5}[\\s]*$" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "HIGH_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_FPT" + ] + }, + { + "name": "skyflow.options.format_preserving_regex", + "values": [ + "^[0-9]{4}-[0-9]{4}-([0-9]{4})-([0-9]{4})$" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI", + "NPI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "HIGH" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.CardNumber" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Card number of credit/debit card" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Card number" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "expiry_month", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "PLAIN_TEXT" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "MODERATE_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PCI", + "PHI" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "MEDIUM" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.CardExpiration" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Card expiry month" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Card expiry month" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "expiry_year", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "PLAIN_TEXT" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "MODERATE_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PCI", + "PHI" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "MEDIUM" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.CardExpiration" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Card expiry year" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Card expiry year" + ] + } + ], + "properties": null, + "index": 0 + } + ], + "childrenSchemas": [], + "schemaTags": [ + { + "name": "skyflow.options.display_name", + "values": [ + "Credit Cards" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Credit Card Object stores basic attributes related to a credit card" + ] + } + ], + "properties": null + }, + { + "ID": "o3b8f97c172d49d596df234799c4f399", + "name": "persons", + "parentSchemaProperties": null, + "fields": [ + { + "name": "skyflow_id", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "PLAIN_TEXT" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "ALL_OP" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "LOW" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.SkyflowID" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Skyflow defined Primary Key" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Skyflow ID" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "name", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "REDACT" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|^[A-za-z ,.'-;]+$" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "MODERATE_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.configuration_tags", + "values": [ + "NULLABLE" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.Name" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Name of a person" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Name" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "email_address", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "REDACT" + ] + }, + { + "name": "skyflow.options.find_pattern", + "values": [ + "^(.).*?(.)?@(.+)" + ] + }, + { + "name": "skyflow.options.replace_pattern", + "values": [ + "$1******$2@$3" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,})$" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "HIGH_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_FPT" + ] + }, + { + "name": "skyflow.options.format_preserving_regex", + "values": [ + "^([a-z]{20})@([a-z]{10})\\.com$" + ] + }, + { + "name": "skyflow.options.configuration_tags", + "values": [ + "NULLABLE" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "MEDIUM" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.PrimaryEmail" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Email Address of a person" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Email address" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "ssn", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "MASK" + ] + }, + { + "name": "skyflow.options.find_pattern", + "values": [ + "^[0-9]{3}([- ])?[0-9]{2}([- ])?([0-9]{4})$" + ] + }, + { + "name": "skyflow.options.replace_pattern", + "values": [ + "XXX${1}XX${2}${3}" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|^([0-9]{3}-?[0-9]{2}-?[0-9]{4})$" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "HIGH_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_FPT" + ] + }, + { + "name": "skyflow.options.format_preserving_regex", + "values": [ + "^[0-9]{3}-[0-9]{2}-([0-9]{4})$" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI", + "NPI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "HIGH" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.SSN" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Social Security Number of a person" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Social Security Number" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "date_of_birth", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "MASK" + ] + }, + { + "name": "skyflow.options.find_pattern", + "values": [ + "^$|([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])))" + ] + }, + { + "name": "skyflow.options.replace_pattern", + "values": [ + "XXXX-${5}${6}" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])))" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "MODERATE_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "MEDIUM" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.DOB" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Date of Birth of a person" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Date of Birth" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "state", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "PLAIN_TEXT" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "LOW_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.configuration_tags", + "values": [ + "NULLABLE" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.PIIState" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "State in which a person resides" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "State" + ] + } + ], + "properties": null, + "index": 0 + } + ], + "childrenSchemas": [], + "schemaTags": [ + { + "name": "skyflow.options.display_name", + "values": [ + "Credit Cards" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Credit Card Object stores basic attributes related to a credit card" + ] + } + ], + "properties": null + }, + { + "ID": "l03160ab1a364618961c2ca0d8e3e881", + "name": "cards", + "parentSchemaProperties": null, + "fields": [ + { + "name": "skyflow_id", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "PLAIN_TEXT" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "ALL_OP" + ] + }, + { + "name": "skyflow.options.sensitivity", + "values": [ + "LOW" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.SkyflowID" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Skyflow defined Primary Key" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Skyflow ID" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "card_number", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "MASK" + ] + }, + { + "name": "skyflow.options.find_pattern", + "values": [ + "[0-9 -]*([0-9 -]{4}$)" + ] + }, + { + "name": "skyflow.options.replace_pattern", + "values": [ + "XXXXXXXXXXXX${1}" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|^[\\s]*?([0-9]{2,6}[ -]?){3,5}[\\s]*$" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "HIGH_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_FPT" + ] + }, + { + "name": "skyflow.options.format_preserving_regex", + "values": [ + "^[0-9]{4}-[0-9]{4}-([0-9]{4})-([0-9]{4})$" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI", + "NPI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.data_type", + "values": [ + "skyflow.CardNumber" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "Credit or debit card number" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "card_number" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "cardholder_name", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "MASK" + ] + }, + { + "name": "skyflow.options.find_pattern", + "values": [ + "(.).*(.{2})" + ] + }, + { + "name": "skyflow.options.replace_pattern", + "values": [ + "${1}***${2}" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|^[A-za-z ,.'-;]+$" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "MODERATE_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.configuration_tags", + "values": [ + "NULLABLE" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "An individual's first, middle, or last name" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "cardholder_name" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "ssn", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "MASK" + ] + }, + { + "name": "skyflow.options.find_pattern", + "values": [ + "^[0-9]{3}([- ])?[0-9]{2}([- ])?([0-9]{4})$" + ] + }, + { + "name": "skyflow.options.replace_pattern", + "values": [ + "XXX${1}XX${2}${3}" + ] + }, + { + "name": "skyflow.validation.regular_exp", + "values": [ + "^$|^([0-9]{3}-?[0-9]{2}-?[0-9]{4})$" + ] + }, + { + "name": "skyflow.options.identifiability", + "values": [ + "HIGH_IDENTIFIABILITY" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_FPT" + ] + }, + { + "name": "skyflow.options.format_preserving_regex", + "values": [ + "^[0-9]{3}-[0-9]{2}-([0-9]{4})$" + ] + }, + { + "name": "skyflow.options.personal_information_type", + "values": [ + "PII", + "PHI", + "NPI" + ] + }, + { + "name": "skyflow.options.privacy_law", + "values": [ + "GDPR", + "CCPA", + "HIPAA" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "A United States Social Security number (SSN) is a 9-digit number of format xxx-xx-xxxx issued to US citizens, permanent residents, and temporary residents." + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "ssn" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "expiration_date", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "REDACT" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "String" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "expiration_date" + ] + } + ], + "properties": null, + "index": 0 + }, + { + "name": "expiration_dates", + "datatype": "DT_STRING", + "isArray": false, + "tags": [ + { + "name": "skyflow.options.default_dlp_policy", + "values": [ + "REDACT" + ] + }, + { + "name": "skyflow.options.operation", + "values": [ + "EXACT_MATCH" + ] + }, + { + "name": "skyflow.options.default_token_policy", + "values": [ + "DETERMINISTIC_UUID" + ] + }, + { + "name": "skyflow.options.description", + "values": [ + "String" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "expiration_dates" + ] + } + ], + "properties": null, + "index": 0 + } + ], + "childrenSchemas": [], + "schemaTags": [], + "properties": null + } + ], + "tags": [ + { + "name": "skyflow.options.experimental", + "values": [ + "true" + ] + }, + { + "name": "skyflow.options.template_description", + "values": [ + "The Quickstart Vault comes up with preconfigured data, roles and policies. The schema of this vault cannot be modified. This template can be used to create sample vaults to understand specific features." + ] + }, + { + "name": "skyflow.options.vault_main_object", + "values": [ + "Quickstart" + ] + }, + { + "name": "skyflow.options.query_interface", + "values": [ + "REST", + "SQL" + ] + }, + { + "name": "skyflow.options.env_name", + "values": [ + "ALL_ENV" + ] + }, + { + "name": "skyflow.options.display_name", + "values": [ + "Quickstart" + ] + } + ] + } \ No newline at end of file diff --git a/samples/src/main/java/com/Skyflow/CollectActivity.kt b/samples/src/main/java/com/Skyflow/CollectActivity.kt index ecd72ab7..75f3b608 100644 --- a/samples/src/main/java/com/Skyflow/CollectActivity.kt +++ b/samples/src/main/java/com/Skyflow/CollectActivity.kt @@ -199,8 +199,8 @@ class CollectActivity : AppCompatActivity() { private fun pureInsert(){ val tokenProvider = DemoTokenProvider() val skyflowConfiguration = Configuration( - BuildConfig.VAULT_ID, - BuildConfig.VAULT_URL, + "VAULT_ID", + "VAULT_URL", tokenProvider, Options(LogLevel.ERROR) ) diff --git a/samples/src/main/java/com/Skyflow/RevealActivity.kt b/samples/src/main/java/com/Skyflow/RevealActivity.kt index a109aacc..c2e54fb5 100644 --- a/samples/src/main/java/com/Skyflow/RevealActivity.kt +++ b/samples/src/main/java/com/Skyflow/RevealActivity.kt @@ -114,12 +114,12 @@ class RevealActivity : AppCompatActivity() { val skyflowClient = init(skyflowConfiguration) val recordsArray = JSONArray() val record = JSONObject() - record.put("table","persons") + record.put("table","cards") record.put("redaction",RedactionType.PLAIN_TEXT) val skyflowIds = ArrayList() - skyflowIds.add("003ec10191faf50") - skyflowIds.add("054c9b6668882") + skyflowIds.add("") + skyflowIds.add("") record.put("ids",skyflowIds) recordsArray.put(record) val records = JSONObject() @@ -134,7 +134,6 @@ class RevealActivity : AppCompatActivity() { Log.d("getbyskyflow_ids",exception.toString()) } - }) } @@ -148,9 +147,9 @@ class RevealActivity : AppCompatActivity() { val revealRecords = JSONObject() val revealRecordsArray = JSONArray() val recordObj = JSONObject() - recordObj.put("token", "32207876") + recordObj.put("token", "") val recordObj1 = JSONObject() - recordObj1.put("token", "a1d928ff9d01d1c") + recordObj1.put("token", "") revealRecordsArray.put(recordObj) revealRecordsArray.put(recordObj1) revealRecords.put("records", revealRecordsArray)