-
Notifications
You must be signed in to change notification settings - Fork 9
Core 1829- Docs Migration: Added New Clustering Docs #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9ba2ab8
143bf62
3c119d9
2aec8f9
1f3b4f0
d2603a7
81f4d2a
79d2562
9cc4e3f
018a088
3375c62
8abcd22
7abd436
1415f76
d2dd1fe
3f7618e
501405b
9253966
5bce345
271118a
df22a18
81c7630
b92bfe9
350c4a2
b99cc98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,36 @@ | ||
| # Clustering | ||
|
|
||
| HarperDB clustering is the process of connecting multiple HarperDB databases together to create a database mesh network that enables users to define data replication patterns. | ||
|
|
||
| HarperDB’s clustering engine replicates data between instances of HarperDB using a highly performant, bi-directional pub/sub model on a per-table basis. Data replicates asynchronously with eventual consistency across the cluster following the defined pub/sub configuration. Individual transactions are sent in the order in which they were transacted, once received by the destination instance, they are processed in an ACID-compliant manor. Conflict resolution follows a last writer wins model based on recorded transaction time on the transaction and the timestamp on the record on the node. | ||
|
|
||
| --- | ||
| ### Common Use Case | ||
|
|
||
| A common use case is an edge application collecting and analyzing sensor data that creates an alert if a sensor value exceeds a given threshold: | ||
|
|
||
| * The edge application should not be making outbound http requests for security purposes. | ||
|
|
||
| * There may not be a reliable network connection. | ||
|
|
||
| * Not all sensor data will be sent to the cloud--either because of the unreliable network connection, or maybe it’s just a pain to store it. | ||
|
|
||
| * The edge node should be inaccessible from outside the firewall. | ||
|
|
||
| * The edge node will send alerts to the cloud with a snippet of sensor data containing the offending sensor readings. | ||
|
|
||
|
|
||
| HarperDB simplifies the architecture of such an application with its bi-directional, table-level replication: | ||
|
|
||
| * The edge instance subscribes to a “thresholds” table on the cloud instance, so the application only makes localhost calls to get the thresholds. | ||
|
|
||
| * The application continually pushes sensor data into a “sensor_data” table via the localhost API, comparing it to the threshold values as it does so. | ||
|
|
||
| * When a threshold violation occurs, the application adds a record to the “alerts” table. | ||
|
|
||
| * The application appends to that record array “sensor_data” entries for the 60 seconds (or minutes, or days) leading up to the threshold violation. | ||
|
|
||
| * The edge instance publishes the “alerts” table up to the cloud instance. | ||
|
|
||
|
|
||
| By letting HarperDB focus on the fault-tolerant logistics of transporting your data, you get to write less code. By moving data only when and where it’s needed, you lower storage and bandwidth costs. And by restricting your app to only making local calls to HarperDB, you reduce the overall exposure of your application to outside forces. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,2 @@ | ||
| # HarperDB Cloud | ||
|
|
||
| HarperDB Cloud is the easiest way to test drive HarperDB, it’s HarperDB-as-a-Service. Cloud handles deployment and management of your instances in just a few clicks. HarperDB Cloud is currently powered by AWS with additional cloud providers on our roadmap for the future. | ||
|
|
||
|
|
||
|
|
||
| HarperDB Cloud is managed within the [HarperDB Studio](https://harperdb.io/developers/documentation/harperdb-studio/). It’s free to sign up, and you even get a free instance- forever! | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Authentication | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How come all this security/studio stuff is in the clustering PR?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the security/studio pr was mistakenly merged to main, rather than the epic CORE-1824 |
||
| HarperDB uses Basic Auth and JSON Web Tokens (JWTs) to secure our HTTP requests. In the context of an HTTP transaction, **basic access authentication** is a method for an HTTP user agent to provide a user name and password when making a request. | ||
|
|
||
|
|
||
|
|
||
| ** ***You do not need to log in separately. Basic Auth is added to each HTTP request like create_schema, create_table, insert etc… via headers.*** ** | ||
|
|
||
|
|
||
|
|
||
| A header is added to each HTTP request. The header key is **“Authorization”** the header value is **“Basic <<your username and password buffer token>>”** | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| ## Authentication in HarperDB Studio | ||
|
|
||
| Below is a code sample from HarperDB Studio. On Line 14 you will see where we are adding the authorization header to each request. This needs to be added for each and every HTTP request for HarperDB. | ||
|
|
||
| ```javascript | ||
| function callHarperDB(call_object, operation, callback){ | ||
|
|
||
| const options = { | ||
| "method": "POST", | ||
| "hostname": call_object.endpoint_url, | ||
| "port": call_object.endpoint_port, | ||
| "path": "/", | ||
| "headers": { | ||
| "content-type": "application/json", | ||
| "authorization": "Basic " + btoa(call_object.username + ':' + call_object.password), | ||
| "cache-control": "no-cache" | ||
|
|
||
| } | ||
| }; | ||
|
|
||
| const http_req = http.request(options, function (hdb_res) { | ||
| let chunks = []; | ||
|
|
||
| hdb_res.on("data", function (chunk) { | ||
| chunks.push(chunk); | ||
| }); | ||
|
|
||
| hdb_res.on("end", function () { | ||
| const body = Buffer.concat(chunks); | ||
| if (isJson(body)) { | ||
| return callback(null, JSON.parse(body)); | ||
| } else { | ||
| return callback(body, null); | ||
|
|
||
| } | ||
|
|
||
| }); | ||
| }); | ||
|
|
||
| http_req.on("error", function (chunk) { | ||
| return callback("Failed to connect", null); | ||
| }); | ||
|
|
||
| http_req.write(JSON.stringify(operation)); | ||
| http_req.end(); | ||
|
|
||
| } | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Configuration | ||
|
|
||
| HarperDB was set up to require very minimal configuration to work out of the box. There are, however, some best practices we encourage for anyone building an app with HarperDB. | ||
|
|
||
|
|
||
|
|
||
| ## CORS | ||
|
|
||
| HarperDB allows for managing [cross-origin HTTP requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS). By default, HarperDB enables CORS for all domains if you need to disable CORS completely or set up an access list of domains you can do the following: | ||
|
|
||
| 1) Open the harperdb-config.yaml file this can be found in /<ROOTPATH>, the location you specified during install. | ||
|
|
||
| 2) In harperdb-config.yaml there should be 2 entries under `operationsApi.network`: cors and corsAccessList. | ||
| * `cors` | ||
|
|
||
| 1) To turn off, change to: `cors: false` | ||
|
|
||
| 2) To turn on, change to: `cors: true` | ||
|
|
||
| * `corsAccessList` | ||
|
|
||
| 1) The `corsAccessList` will only be recognized by the system when `cors` is `true` | ||
|
|
||
| 2) To create an access list you set `corsAccessList` to a comma-separated list of domains. | ||
|
|
||
| i.e. `corsAccessList` is `http://harperdb.io,http://products.harperdb.io` | ||
|
|
||
| 3) To clear out the access list and allow all domains: `corsAccessList` is `[null]` | ||
|
|
||
|
|
||
| ## SSL | ||
|
|
||
| HarperDB provides the option to use an HTTP or HTTPS interface. The default port for the server is 9925. | ||
|
|
||
|
|
||
|
|
||
| These default ports can be changed by updating the `operationsApi.network.port` value in `<ROOTPATH>/harperdb-config.yaml` | ||
|
|
||
|
|
||
|
|
||
| By default, HTTPS is turned off and HTTP is turned on. It is recommended that you never directly expose HarperDB's HTTP interface through a publicly available port. HTTP is intended for local or private network use. | ||
|
|
||
|
|
||
|
|
||
| You can toggle HTTPS and HTTP in the settings file. By setting `operationsApi.network.https` to true/false. When `https` is set to `false`, the server will use HTTP. | ||
|
|
||
|
|
||
|
|
||
| HarperDB automatically generates a certificate and a privateKey file which live at `<ROOTPATH>/keys/`. | ||
|
|
||
|
|
||
|
|
||
| You can replace these with your own certificate and key. | ||
|
|
||
|
|
||
|
|
||
| **If any of these settings are changed please make sure to run `harperdb restart` as they will not take effect until a restart.** |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,9 @@ | ||
| # Security | ||
|
|
||
| HarperDB uses role-based, attribute-level security to ensure that users can only gain access to the data they’re supposed to be able to access. Our granular permissions allow for unparalleled flexibility and control, and can actually lower the total cost of ownership compared to other database solutions, since you no longer have to replicate subsets of your data to isolate use cases. | ||
|
|
||
| * [JWT Authentication](https://harperdb.io/docs/security/jwt-authentication/) | ||
| * [Basic Authentication](https://harperdb.io/docs/security/authentication/) | ||
| * [Configuration](https://harperdb.io/docs/security/configuration/) | ||
| * [Users and Roles](https://harperdb.io/docs/security/users-roles/) | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # JWT Authentication | ||
| HarperDB uses token based authentication with JSON Web Tokens, JWTs. | ||
|
|
||
| This consists of two primary operations `create_authentication_tokens` and `refresh_operation_token`. These generate two types of tokens, as follows: | ||
|
|
||
| * The `operation_token` which is used to authenticate all HarperDB operations in the Bearer Token Authorization Header. The default expiry is one day. | ||
|
|
||
| * The `refresh_token` which is used to generate a new `operation_token` upon expiry. This token is used in the Bearer Token Authorization Header for the `refresh_operation_token` operation only. The default expiry is thirty days. | ||
|
|
||
| The `create_authentication_tokens` operation can be used at any time to refresh both tokens in the event that both have expired or been lost. | ||
|
|
||
| ## Create Authentication Tokens | ||
|
|
||
| Users must initially create tokens using their HarperDB credentials. The following POST body is sent to HarperDB. No headers are required for this POST operation. | ||
|
|
||
| ```json | ||
| { | ||
| "operation": "create_authentication_tokens", | ||
| "username": "username", | ||
| "password": "password" | ||
| } | ||
| ``` | ||
|
|
||
| A full cURL example can be seen here: | ||
|
|
||
| ```bash | ||
| curl --location --request POST 'http://localhost:9925' \ | ||
| --header 'Content-Type: application/json' \ | ||
| --data-raw '{ | ||
| "operation": "create_authentication_tokens", | ||
| "username": "username", | ||
| "password": "password" | ||
| }' | ||
| ``` | ||
|
|
||
| An example expected return object is: | ||
|
|
||
| ```json | ||
| { | ||
| "operation_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwiaWF0IjoxNjA0OTc4MjAwLCJleHAiOjE2MDUwNjQ2MDAsInN1YiI6Im9wZXJhdGlvbiJ9.MpQA-9CMjA-mn-7mHyUXSuSC_-kqMqJXp_NDiKLFtbtMRbodCuY3DzH401rvy_4vb0yCELf0B5EapLVY1545sv80nxSl6FoZFx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L2nCjAg996Ga3PtdvXJAZPDYCqqvaBkZZcsiqOgqLV0vGo3VVlfrcgJXQImMYRr_Inu0FCe47A93IAWuQTs-KplM1KdGJsHSnNBV6oe6QEkROJT5qZME-8xhvBYvOXqp9Znwg39bmiBCMxk26Ce66_vw06MNgoa3D5AlXPWemfdVKPZDnj_aLVjZSs0gAfFElcVn7l9yjWJOaT2Muk26U8bJl-2BEq_DSclqKHODuYM5kkPKIdE4NFrsqsDYuGxcA25rlNETFyl0q-UXj1aoz_joy5Hdnr4mFELmjnoo4jYQuakufP9xeGPsj1skaodKl0mmoGcCD6v1F60" | ||
| } | ||
| ``` | ||
|
|
||
| ## Using JWT Authentication Tokens | ||
|
|
||
| The `operation_token` value is used to authenticate all operations in place of our standard Basic auth. In order to pass the token you will need to create an Bearer Token Authorization Header like the following request: | ||
|
|
||
| ```bash | ||
| curl --location --request POST 'http://localhost:9925' \ | ||
| --header 'Content-Type: application/json' \ | ||
| --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwiaWF0IjoxNjA0OTc4MjAwLCJleHAiOjE2MDUwNjQ2MDAsInN1YiI6Im9wZXJhdGlvbiJ9.MpQA-9CMjA-mn-7mHyUXSuSC_-kqMqJXp_NDiKLFtbtMRbodCuY3DzH401rvy_4vb0yCELf0B5EapLVY1545sv80nxSl6FoZFxQaDWYXycoia6zHpiveR8hKlmA6_XTWHJbY2FM1HAFrdtt3yUTiF-ylkdNbPG7u7fRjTmHfsZ78gd2MNWIDkHoqWuFxIyqk8XydQpsjULf2Uacirt9FmHfkMZ-Jr_rRpcIEW0FZyLInbm6uxLfseFt87wA0TbZ0ofImjAuaW_3mYs-3H48CxP152UJ0jByPb0kHsk1QKP7YHWx1-Wce9NgNADfG5rfgMHANL85zvkv8sJmIGZIoSpMuU3CIqD2rgYnMY-L5dQN1fgfROrPMuAtlYCRK7r-IpjvMDQtRmCiNG45nGsM4DTzsa5GyDrkGssd5OBhl9gr9z9Bb5HQVYhSKIOiy72dK5dQNBklD4eGLMmo-u322zBITmE0lKaBcwYGJw2mmkYcrjDOmsDseU6Bf_zVUd9WF3FqwNkhg4D7nrfNSC_flalkxPHckU5EC_79cqoUIX2ogufBW5XgYbU4WfLloKcIpb51YTZlZfwBHlHPSyaq_guaXFaeCUXKq39_i1n0HRF_mRaxNru0cNDFT9Fm3eD7V8axFijSVAMDyQs_JR7SY483YDKUfN4l-vw-EVynImr4' \ | ||
| --data-raw '{ | ||
| "operation":"search_by_hash", | ||
| "schema":"dev", | ||
| "table":"dog", | ||
| "hash_values":[1], | ||
| "get_attributes": ["*"] | ||
| }' | ||
| ``` | ||
|
|
||
| ## Token Expiration | ||
|
|
||
| `operation_token` expires at a set interval. Once it expires it will no longer be accepted by HarperDB. This duration defaults to one day, and is configurable in [harperdb-config.yaml](https://harperdb.io/docs/reference/configuration-file/). To generate a new `operation_token`, the `refresh_operation_token` operation is used, passing the `refresh_token` in the Bearer Token Authorization Header. A full cURL example can be seen here: | ||
|
|
||
| ```bash | ||
| curl --location --request POST 'http://localhost:9925' \ | ||
| --header 'Content-Type: application/json' \ | ||
| --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwiaWF0IjoxNjA0OTc4MjAwLCJleHAiOjE2MDc1NzAyMDAsInN1YiI6InJlZnJlc2gifQ.acaCsk-CJWIMLGDZdGnsthyZsJfQ8ihXLyE8mTji8PgGkpbwhs7e1O0uitMgP_pGjHq2tey1BHSwoeCL49b18WyMIB10hK-q2BXGKQkykltjTrQbg7VsdFi0h57mGfO0IqAwYd55_hzHZNnyJMh4b0iPQFDwU7iTD7x9doHhZAvzElpkWbc_NKVw5_Mw3znjntSzbuPN105zlp4Niurin-_5BnukwvoJWLEJ-ZlF6hE4wKhaMB1pWTJjMvJQJE8khTTvlUN8tGxmzoaDYoe1aCGNxmDEQnx8Y5gKzVd89sylhqi54d2nQrJ2-ElfEDsMoXpR01Ps6fNDFtLTuPTp7ixj8LvgL2nCjAg996Ga3PtdvXJAZPDYCqqvaBkZZcsiqOgqLV0vGo3VVlfrcgJXQImMYRr_Inu0FCe47A93IAWuQTs-KplM1KdGJsHSnNBV6oe6QEkROJT5qZME-8xhvBYvOXqp9Znwg39bmiBCMxk26Ce66_vw06MNgoa3D5AlXPWemfdVKPZDnj_aLVjZSs0gAfFElcVn7l9yjWJOaT2Muk26U8bJl-2BEq_DSclqKHODuYM5kkPKIdE4NFrsqsDYuGxcA25rlNETFyl0q-UXj1aoz_joy5Hdnr4mFELmjnoo4jYQuakufP9xeGPsj1skaodKl0mmoGcCD6v1F60' \ | ||
| --data-raw '{ | ||
| "operation":"refresh_operation_token" | ||
| }' | ||
| ``` | ||
|
|
||
| This will return a new `operation_token`. An example expected return object is: | ||
|
|
||
| ```bash | ||
| { | ||
| "operation_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6eyJfX2NyZWF0ZWR0aW1lX18iOjE2MDQ5NzgxODkxNTEsIl9fdXBkYXRlZHRpbWVfXyI6MTYwNDk3ODE4OTE1MSwiYWN0aXZlIjp0cnVlLCJyb2xlIjp7Il9fY3JlYXRlZHRpbWVfXyI6MTYwNDk0NDE1MTM0NywiX191cGRhdGVkdGltZV9fIjoxNjA0OTQ0MTUxMzQ3LCJpZCI6IjdiNDNlNzM1LTkzYzctNDQzYi05NGY3LWQwMzY3Njg5NDc4YSIsInBlcm1pc3Npb24iOnsic3VwZXJfdXNlciI6dHJ1ZSwic3lzdGVtIjp7InRhYmxlcyI6eyJoZGJfdGFibGUiOnsicmVhZCI6dHJ1ZSwiaW5zZXJ0IjpmYWxzZSwidXBkYXRlIjpmYWxzZSwiZGVsZXRlIjpmYWxzZSwiYXR0cmlidXRlX3Blcm1pc3Npb25zIjpbXX0sImhkYl9hdHRyaWJ1dGUiOnsicmVhZCI6dHJ1ZSw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VydCI6ZmFsc2UsInVwZGF0ZSI6ZmFsc2UsImRlbGV0ZSI6ZmFsc2UsImF0dHJpYnV0ZV9wZXJtaXNzaW9ucyI6W119fX19LCJyb2xlIjoic3VwZXJfdXNlciJ9LCJ1c2VybmFtZSI6InVzZXJuYW1lIn0sImlhdCI6MTYwNDk3ODcxMywiZXhwIjoxNjA1MDY1MTEzLCJzdWIiOiJvcGVyYXRpb24ifQ.qB4FS7fzryCO5epQlFCQe4mQcUEhzXjfsXRFPgauXrGZwSeSr2o2a1tE1xjiI3qjK0r3f2bdi2xpFlDR1thdY-m0mOpHTICNOae4KdKzp7cyzRaOFurQnVYmkWjuV_Ww4PJgr6P3XDgXs5_B2d7ZVBR-BaAimYhVRIIShfpWk-4iN1XDk96TwloCkYx01BuN87o-VOvAnOG-K_EISA9RuEBpSkfUEuvHx8IU4VgfywdbhNMh6WXM0VP7ZzSpshgsS07MGjysGtZHNTVExEvFh14lyfjfqKjDoIJbo2msQwD2FvrTTb0iaQry1-Wwz9QJjVAUtid7tJuP8aBeNqvKyMIXRVnl5viFUr-Gs-Zl_WtyVvKlYWw0_rUn3ucmurK8tTy6iHyJ6XdUf4pYQebpEkIvi2rd__e_Z60V84MPvIYs6F_8CAy78aaYmUg5pihUEehIvGRj1RUZgdfaXElw90-m-M5hMOTI04LrzzVnBu7DcMYg4UC1W-WDrrj4zUq7y8_LczDA-yBC2-bkvWwLVtHLgV5yIEuIx2zAN74RQ4eCy1ffWDrVxYJBau4yiIyCc68dsatwHHH6bMK0uI9ib6Y9lsxCYjh-7MFcbP-4UBhgoDDXN9xoUToDLRqR9FTHqAHrGHp7BCdF5d6TQTVL5fmmg61MrLucOo-LZBXs1NY" | ||
| } | ||
| ``` | ||
|
|
||
| The `refresh_token` also expires at a set interval, but a longer interval. Once it expires it will no longer be accepted by HarperDB. This duration defaults to thirty days, and is configurable in [harperdb-config.yaml](https://harperdb.io/docs/reference/configuration-file/). To generate a new `operation_token` and a new `refresh_token` the `create_authentication_tokensoperation` is called. | ||
|
|
||
| ## Configuration | ||
|
|
||
| Token timeouts are configurable in [harperdb-config.yaml](https://harperdb.io/docs/reference/configuration-file/) with the following parameters: | ||
|
|
||
| * `operationsApi.authentication.operationTokenTimeout`: Defines the length of time until the operation_token expires (default 1d). | ||
|
|
||
| * `operationsApi.authentication.refreshTokenTimeout`: Defines the length of time until the refresh_token expires (default 30d). | ||
|
|
||
| A full list of valid values for both parameters can be found here: https://github.com/vercel/ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clustering introduction needs more than this. How much of the existing into do you think we could incorporate here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️