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 request: Ability to deny a request to download #51

Open
C4Phoenix opened this issue Jan 31, 2025 · 1 comment
Open

Feature request: Ability to deny a request to download #51

C4Phoenix opened this issue Jan 31, 2025 · 1 comment

Comments

@C4Phoenix
Copy link

For a project I'm working on I'd like to have longer lived 'protected' blobs persistently available. I was hoping to make an allow list for 'read access' based on a peerID . This way, if the ticket gets leaked the protection is not compromised.

I've tried to look for a way to implement this within the current api but it seems like it's not possible at the moment. I certenly could have overlooked something.

Having a Callback function that determines if a peerID is allowed to access a certain ticket would make this protocol applicable to a lot more applications I think.

I kindly request your opinion.

@n0bot n0bot bot added this to iroh Jan 31, 2025
@rklaehn
Copy link
Collaborator

rklaehn commented Feb 4, 2025

So what you want is some sort of access control callback based on the hash of the data?

Maybe the best way to do this would be in the store trait. For store read operations, have some sort of context, and then the store can decide based on that context if it wants to proceed or not.

I am currently working on multiprovider downloads, so there will be some major changes to the code base soon, and I can't promise anything very quickly. But I will keep it in mind.

Until then I think the best way to proceed would be to write a custom protocol that uses the iroh-blobs ALPN and reuses most of the code from iroh-blobs, but puts in an auth step. I know that is quite complex, so we have to do better in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants