MakeDrive auth should be pluggable, configurable, optional #451
Comments
|
Thanks for filing this. I could explain the reasons for all of the things you're describing above, but the reality it all boils down to whether MakeDrive wants to be a general purpose tool or just something we're using as part of Webmaker. I'd like to be able to support people like yourself using it in their own projects, and the fastest way for us to get there is to have our auth system be pluggable/configurable. The way that Webmaker does its auth is almost certainly not the way other people will want to do it. I'm going to do two things:
Thanks for filing. |
|
Filed #452 |
|
@humphd Thanks for striving to make this a general tool! FWIW, I was trying to leverage MakeDrive in Atom. (I know that you already did an analogous integration with Brackets.) Rather than SSH into my Linux box and use emacs/vi, I'd like to be able to use MakeDrive to edit my code from that remote machine locally in Atom. I would even settle for doing it over an insecure connection as a first step, just so it would be easier to start making progress on the necessary integration points in Atom. |
|
Your use case fits with our goals in general, so I'd like to try and make it possible. Give us some time to figure out the right solution here, but I'm pretty sure we can do it. |
|
@bolinfest we've got a patch we hope to land this week that makes our auth configurable and swappable. While we finish and review, I'd be interested to figure out what the auth case would need to be for your Atom experiments. At the very least, MakeDrive needs to be able to get a username (i.e., some unique string) to separate one user's filesystem from another. Interested in your thoughts. |
|
@alicoding has landed #451, so this is basically fixed; but I'll leave open to hear from @bolinfest to make sure we've covered what we need. |
|
Hi David, thanks so much for following up on this! I'm on PTO through the Offhand, I feel like there were two use cases. 1 was "hey I'm checking out So both good OOTB and pluggability are key.
|
|
OK, thanks for this reply. We've covered both cases now: 1) we do a zeroconfig provider OOTB so you automatically get a 'root' user with auth automatically handled; 2) you can swap in any auth provider you want to match your own needs (our Webmaker Auth is a great example of this, but so is the Github OAuth provider). As such I'm going to close this ticket. However, please do bug us with other problems you hit, ideas you have, or issues that come up as you hack MakeDrive into Atom. We'd really like to see you succeed. |
|
Thanks @humphd! |
|
@humphd Sorry it took so long, but I finally got a chance to try this out tonight. For sure, the setup process was considerably better than before! The Installation and Use section in the docs is really great until the end. That's where you bury the lede. I load Then the docs go into all sorts of detail about authentication. WAIT! I HAVE NO IDEA IF THIS IS WORKING OR NOT YET! Buried at the bottom of the docs is information about a demo. A demo! Do you know what's more interesting than a swappable authentication mechanism? A demo, that's what! Both What's really nice is that I didn't have to edit anything in The only problem is that it took me quite awhile to figure out how to run the demo. I think this is where my mental model of Makedrive is particularly broken, so that's likely a major part of the problem. I expected (and still expect, given the original blog post) to be able to start a Makedrive server on a remote machine and point it to a local directory on that remote machine that I can browse via the demo. This is important to me because it is on the critical path of what I would like to do with Atom. Instead, I get a new, virtual folder. Because of the mismatch in my mental model, again I thought Makedrive was broken because I didn't see any of my files. I tried to open a file. Instead of getting a detailed error message, the cursor turns into a circle with a slash through it when I hover over the Eventually, I try creating a file instead. That works! Well, sort of. The demo page doesn't Only once I have reached this point do I start to take interest in the other parts of your documentation. I still haven't figured out if it's possible for Makedrive to start serving the files on my remote machine, though. As a basic step, I would like to serve the files in my |
|
I dug into this a little more. I see that FSProvider has a constructor that takes some However, when I look at filesystem.js in MakeDrive, there does not appear to be any way to read a value from my |
|
I tried hardcoding Unfortunately, this still fails to load my directory, seemingly because of how it is supposed to be used with Again, my expectations of MakeDrive feel like they're really off here. |
I was able to get the MakeDrive server up and running, but I expected to be able to load http://localhost:9090/demo/?makedrive=ws://localhost:9090 and browse some files. Instead, I get an error in the console about a 401 unauthorized. I don't see any way to enter credentials, and there's nothing about how auth works in the README.
I also find it odd that there's no configuration around which directory on my machine I should be able to browse/write to. I expected to define this in the
.envfile.I understand that security is important, but having everything locked down makes the out of the box experience pretty frustrating. (I was hoping I could just curl http://localhost:9090/p/ and see something, but that also resulted in a 401.)
The text was updated successfully, but these errors were encountered: