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

Draft: HTTP Pinning Service API DEP #19

Merged
merged 12 commits into from
Apr 18, 2018

Conversation

pfrazee
Copy link
Contributor

@pfrazee pfrazee commented Apr 1, 2018

GET /item/:key Get information about a Dat in the account's list of pins.
Key may be the pubkey or name of the dat.
POST /item/:key Update information about a Dat in the account's list of pins.
Key may be the pubkey or name of the dat.

Choose a reason for hiding this comment

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

do we need to discuss the payloads of the above or just make it up as we go along?

@pfrazee
Copy link
Contributor Author

pfrazee commented Apr 1, 2018 via email

@pfrazee
Copy link
Contributor Author

pfrazee commented Apr 11, 2018

Working implementation is available at https://github.com/beakerbrowser/homebase

@pfrazee
Copy link
Contributor Author

pfrazee commented Apr 17, 2018

I put together a client module as well, no dependencies, runs automated tests against homebase: https://github.com/beakerbrowser/dat-pinning-service-client

@RangerMauve
Copy link
Contributor

Is there a requirement for these services to have CORS headers so that they could be interacted with from within a webpage?

@pfrazee
Copy link
Contributor Author

pfrazee commented Apr 17, 2018

Would we want CORS to be enabled?

@RangerMauve
Copy link
Contributor

If CORS isn't set to * you won't be able to do POSTs in JS AFAIK.

Not sure if there were more caveats for the dat:// origin.

@pfrazee
Copy link
Contributor Author

pfrazee commented Apr 17, 2018

Yeah I'm not sure we want to enable web pages to do that yet. Users would have to give their username/password to the site to do the login flow. For Beaker, I suspect we'd want to create some kind of utility for managing that access.

@RangerMauve
Copy link
Contributor

I originally wrote a big rant, but the summary is that I think that nudging people to provide CORS headers for all PSAs will enable more interesting applications. Even if you don't want to explicitly require it now, this can be changed in the future and could be enabled by hosts that want to allow it.

My original rant I get the use case for beaker, but I could envision people making apps for doing similar things that could work with these services regardless of browser. If Beaker provides a great way to integrate with these services, people are less likely to go apps that implement the same thing.

I could however see myself making a private app so I can manage my dats from either Beaker, Bunsen (before they integrate it), or the upcoming browser extensions. Locking these services to make them only usable to the browser runtime itself will make it harder to innovate.

I agree that a pinning service that takes credentials might want to be more guarded against letting web apps use it, but I could see pinning services without credentials, or completely different (e.g. discovery) services that would be more useful if apps could do whatever they wanted with them.

Explicitly specifying that only browsers will be using the DEPs will set a precedent that will stifle innovation and could lead to PSAs being used by beaker and not by third parties.

@pfrazee
Copy link
Contributor Author

pfrazee commented Apr 17, 2018

That's a fair point.

@pfrazee pfrazee changed the title WIP: HTTP Pinning Service API DEP Draft: HTTP Pinning Service API DEP Apr 18, 2018
@bnewbold
Copy link
Contributor

bnewbold commented Apr 18, 2018

This looks good to me for Draft status.

We do usually want a "Privacy" section for standard/protocol DEPs, even if it's just a "no privacy concerns" or "this is for public/published works only" context note.

@pfrazee pfrazee merged commit 539c2ab into dat-ecosystem-archive:master Apr 18, 2018
@pfrazee pfrazee deleted the pinning-service-api-dep branch April 18, 2018 18:11
@millette
Copy link

Did you mean to link to archive.org instead of direct a link? It appears twice.

@pfrazee
Copy link
Contributor Author

pfrazee commented Apr 19, 2018

@millette yes, that was intentional to make sure the linked target doesnt change

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.

5 participants