Skip to content
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

Feature download encryption #71

Merged
merged 19 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7e27790
wip: handle downloadURL, no encryption, hardcoded file
paulo-ocean Oct 23, 2023
7e02f8b
eslint, ignore compiled .js files
paulo-ocean Oct 24, 2023
6d90b9a
update postman collection on directCommand
paulo-ocean Oct 24, 2023
5e880bc
update collection.json, expose node public key on peer details
paulo-ocean Oct 24, 2023
22ae896
fix public key on config, was stripping 4 bytes
paulo-ocean Oct 24, 2023
7e91992
wip: encryption flow, recover the aes key and iv on the node (encrypt…
paulo-ocean Oct 25, 2023
47bb255
add helper script for test encryption + download flow
paulo-ocean Oct 25, 2023
717c469
done encryption + streaming + decryption flow
paulo-ocean Oct 26, 2023
5662a85
file flow complete with encryption/decryption
paulo-ocean Oct 27, 2023
f539a59
just update readme part of client example
paulo-ocean Oct 27, 2023
ec6ce83
just add error log when failed to parse url
paulo-ocean Oct 30, 2023
03f4fed
remove node private key references from example
paulo-ocean Oct 30, 2023
b124d90
WIP: try compatibility with node v20
paulo-ocean Oct 30, 2023
5d84b3f
nove 20 import with file extensions, now it works
paulo-ocean Oct 30, 2023
bc9580e
update for nove v20 support
paulo-ocean Oct 30, 2023
b2260cc
refactor downloadHandler + separate file for commands/API validation …
paulo-ocean Oct 31, 2023
ddebb2b
add encryption header
paulo-ocean Oct 31, 2023
acda330
remove custom method to get private key, use getConfig()
paulo-ocean Oct 31, 2023
6e42104
Merge branch 'develop' into feature-download-encryption
paulo-ocean Nov 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.js
dist/
.eslintrc
4 changes: 1 addition & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"jsx": false
},
"project": [
"./tsconfig.json",
"./test/unit/tsconfig.json",
"./test/integration/tsconfig.json"
"./tsconfig.json"
]
},
"extends": ["oceanprotocol", "plugin:prettier/recommended"],
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.20.2
v20.9.0
29 changes: 24 additions & 5 deletions docs/Ocean Node.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,28 @@
"name": "8000 - getPeer",
"request": {
"method": "GET",
"header": []
},
"response": []
"header": [],
"url": {
"raw": "http://127.0.0.1:8000/getP2pPeer?peerId=16Uiu2HAmQU8YmsACkFjkaFqEECLN3Csu6JgoU3hw9EsPmk7i9TFL",
"protocol": "http",
"host": [
"127",
"0",
"0",
"1"
],
"port": "8000",
"path": [
"getP2pPeer"
],
"query": [
{
"key": "peerId",
"value": "16Uiu2HAmQU8YmsACkFjkaFqEECLN3Csu6JgoU3hw9EsPmk7i9TFL"
}
]
}
}
},
{
"name": "8000 - advertiseDid",
Expand Down Expand Up @@ -106,7 +125,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"command\":\"download\",\n \"node\": \"16Uiu2HAkxiemC25d2iZWTkVRQmZr9L9h3RNGnhiUWXEonmsPEC8y\"\n}"
"raw": "{\n \"command\":\"downloadURL\",\n \"node\": \"16Uiu2HAkxiemC25d2iZWTkVRQmZr9L9h3RNGnhiUWXEonmsPEC8y\",\n \"url\": \"http://example.com\",\n \"aes_encrypted_key\": \"0x1234567890abcdef\"\n}"
},
"url": {
"raw": "http://127.0.0.1:8000/directCommand",
Expand Down Expand Up @@ -138,7 +157,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"command\":\"download\",\n \"node\": \"16Uiu2HAkvfXgYiFhsHRJvcdtmMs3aopgoRphb5xnXMh3dxCRuuX\"\n}"
"raw": "{\n \"command\":\"downloadURL\",\n \"node\": \"16Uiu2HAkvfXgYiFhsHRJvcdtmMs3aopgoRphb5xnXMh3dxCRuuX\",\n \"url\": \"http://example.com\",\n \"aes_encrypted_key\": \"0x1234567890abcdef\"\n}"
},
"url": {
"raw": "http://127.0.0.1:8001/directCommand",
Expand Down
Loading
Loading