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

feat: download shared data without auth #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

IgorShadurin
Copy link
Collaborator

Close #68

@IgorShadurin IgorShadurin changed the title Download shared data from pod without auth Download shared data without auth Aug 12, 2022
@IgorShadurin IgorShadurin requested a review from nugaon August 13, 2022 09:38
LICENSE Outdated Show resolved Hide resolved
src/file/file.ts Outdated Show resolved Hide resolved
src/file/file.ts Outdated
async downloadFromSharedPod(podReference: string | EncryptedReference, fullPath: string): Promise<Data> {
assertEncryptedReference(podReference)

const info = await getSharedPodInfo(this.accountData.connection.bee, podReference)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be executed without authentication as it states but the first parameter of getSharedPodInfo comes from this.accountData. without authentication it should be null, shouldn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current implementation, it will never be null, because after the connection is created, it is stored in this instance.

src/file/file.ts Outdated
Comment on lines 216 to 222
const info = await this.getSharedInfo(fileReference)
const data = await downloadData(
this.accountData.connection.bee,
combine(info.meta.file_path, info.meta.file_name),
prepareEthAddress(info.source_address),
this.accountData.connection.options?.downloadOptions,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is really strange for me is that you only need the file path and the ethereum address of the feed owner from the info.
Even if the info lies under an encrypted reference, the data that can be downloaded by that is unenrypted.
I thought by resolving #19 these problems disappeared.

@IgorShadurin IgorShadurin changed the title Download shared data without auth feat: download shared data without auth Aug 18, 2022
@IgorShadurin IgorShadurin force-pushed the 68-download-shared-data-from-pod-without-auth branch from dd2f45b to 7a20b02 Compare March 20, 2023 09:30
@IgorShadurin IgorShadurin force-pushed the 68-download-shared-data-from-pod-without-auth branch from 7a20b02 to b813c0c Compare March 20, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloading shared data from pod without authentication
2 participants