Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Is it possible now to use authenticate http token request? #234

Open
baimurzin opened this issue Mar 24, 2017 · 9 comments
Open

Is it possible now to use authenticate http token request? #234

baimurzin opened this issue Mar 24, 2017 · 9 comments

Comments

@baimurzin
Copy link

I have found some issues where were discussions about http tokens? But it was about half year ago.
Is it possible now can someone point me to that have to do to implement this.
And is it possible to set any permissions to tokens, for example, one token can read all files, and another one can read only limited quantity?
Thanks advance

@lidel
Copy link
Member

lidel commented Mar 24, 2017

Hi, I think access control via tokens is not implemented yet:

@baimurzin
Copy link
Author

@lidel Hi! It means that I cannot create any token to make http request and do something?

@lidel
Copy link
Member

lidel commented Mar 24, 2017

There are no tokens in current implementation.

You have full (writable) API at port :5001 and a read-only subset of it at :8080:

That is what you have to work with right now.
If you need to use writable API, it is up to you to secure it by other means.

One way to do it, is to add a reverse HTTP proxy as a gatekeeper.

I think you should be able to find ready-to-use projects that do just that.
Examples below authenticate via OAuth:

@baimurzin
Copy link
Author

Correct me if I'm wrong understood. No it it's impossible to include tokens implementation, but we can do the same things using oauth or doorman?

@lidel
Copy link
Member

lidel commented Mar 24, 2017

Tokens are possible, but not implemented yet. You need to use third-party solution for now.

@baimurzin
Copy link
Author

@lidel thanks a lot! If you don't mind could, can I get one other question? Are there any example how to integrate ipfs with with libraries? May be you know

@lidel
Copy link
Member

lidel commented Mar 25, 2017

If your question was about things like doorman or other auth2 proxies, no, I did not see any examples, sorry.

If you ask about embedding IPFS library inside of your application to work around security concerns related to HTTP API, then yes. It may be more difficult, but you can do it with both JS and Go versions:

@baimurzin
Copy link
Author

@lidel Thanks!
How do you think is it a good idea to use ipfs as a solution in my task.
What I want:
For example, I have IoT device and I need to share resources between others.
How I think I will do:
I think I will try to install this IPFS on device and then release grants/tokens to users with diverse permissions
How do you think am I on the right track?

@lidel
Copy link
Member

lidel commented Mar 25, 2017

Tokens are only for securing access to HTTP API. Read-only data itself is not encrypted in IPFS.
Please keep in mind that it is up to you to keep it secure (by encrypting it or using closed, private peer network).

Hard to say if IPFS is the right match for your product without going deep into specifics (and I am afraid i don't have bandwidth for that 🙃 ), but I'll point you to some relevant reading material that may help you in making decision:

Sadly this repository is not a place for this kind of discussion – I suggest closing this issue and asking questions at https://github.com/ipfs/faq/ or http://ipfs.trydiscourse.com/c/help.

You may get better answers there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants