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

How can I help? #6

Closed
philipbeadle opened this issue Apr 10, 2017 · 17 comments
Closed

How can I help? #6

philipbeadle opened this issue Apr 10, 2017 · 17 comments

Comments

@philipbeadle
Copy link

Hi Dimitri,
I've just discovered Solid and followed the trail here. I've been looking into Ethereum, Akasha, ceptr, IPFS.io and a bunch of other distributed technologies and found Solid. After figuring out that the databox.me WebID uses the certificate method that now doesn't work due to changes in the browsers I found OIDC and I'd really like to help out.

Cheers
Phil

@dmitrizagidulin
Copy link
Contributor

@philipbeadle thanks for reaching out!
One thing that would be helpful is - try out the OIDC stack (write a small Solid application with it), and let us know if there are any questions or problems.

@dmitrizagidulin
Copy link
Contributor

@philipbeadle Also, there's a sample OIDC Auth app at https://github.com/solid/solid-auth-oidc/blob/master/demo/index.html

You can either run it directly at github.io at https://solid.github.io/solid-auth-oidc/demo/

or npm install http-server, check out a copy of the solid-auth-oidc repo, and http-server demo/.

@philipbeadle
Copy link
Author

philipbeadle commented Apr 24, 2017

Ok, got some of this working. Ive got the solid server running on localhost:8443 and the sample app on 8080.
When I enter my localhost address I get this

solid-client.min.js:80 Getting provider from default popup UI
(index):90 onLoginSuccess() callback! webId:  undefined
solid-client.min.js:80 Auth client received event:  MessageEvent {isTrusted: true, data: Object, origin: "http://127.0.0.1:8080", lastEventId: "", source: Window…}
solid-client.min.js:80 Provider selected:  https://localhost:8443
solid-client.min.js:80 Registering public client...
solid-client.min.js:80 GET https://localhost:8443/.well-known/openid-configuration 401 (Unauthorized)
value @ solid-client.min.js:80
(anonymous) @ solid-client.min.js:80
solid-client.min.js:80 Error in rp.discover() while fetching provider config
(anonymous) @ solid-client.min.js:80
solid-client.min.js:80 Error in RelyingParty.register(): SyntaxError: Unexpected token A in JSON at position 0
(anonymous) @ solid-client.min.js:80
solid-client.min.js:80 Uncaught (in promise) TypeError: Cannot read property 'serialize' of undefined
    at e.value (solid-client.min.js:80)
    at solid-client.min.js:80
value @ solid-client.min.js:80
(anonymous) @ solid-client.min.js:80

The local app logs in with my solidtest.space webid

I'm using the dz_oidc branch too. Any clues as to what's going wrong here?

@dmitrizagidulin
Copy link
Contributor

@philipbeadle thanks! Looking into it. (ping me on Gitter when you have a chance, I have some questions)

@dmitrizagidulin
Copy link
Contributor

@philipbeadle I suspect the issue might be - do you have "auth": "oidc" enabled in your configuration? A 401 Unauthorized as a response to GET https://localhost:8443/.well-known/openid-configuration suggests the server is running in webid-tls mode.

@dmitrizagidulin
Copy link
Contributor

I opened an issue for this, nodeSolidServer/solid-auth-oidc#5

@philipbeadle
Copy link
Author

@dmitrizagidulin Ive got this as my config

{ "root": "/Users/philipbeadle/Projects/SoLiD", "port": "8443", "serverUri": "https://localhost:8443", "webid": true, "mount": "/", "sslKey": "/Users/philipbeadle/Projects/SoLiD/certificate/localhost.pem", "sslCert": "/Users/philipbeadle/Projects/SoLiD/certificate/localhost.pem", "idp": false, "proxy": "/proxy", "auth": "oidc" }
I added the "auth": "oidc" and restarted the server and now when I go to https://localhost:8443/ I get
Access to https://localhost:8443/ requires authorization (401), even if i now remove that line.

I'm in Melbourne Aus UTC+10 lets organise a gitter chat soon.

@dmitrizagidulin
Copy link
Contributor

Ok, that's closer. (the 401 Unauthorized response is expected when you access / when not logged in).
Have you gone through the node bin/solid.js init setup wizard? I'm not seeing the configPath and dbPath settings.

@philipbeadle
Copy link
Author

philipbeadle commented Apr 26, 2017

Yep, just ran it again to make sure. There was no question about dbpath or config path.
I ran solid init

If I run node bin/solid.js init I get an error
`Philips-MBP-2:node-solid-server philipbeadle$ node bin/solid.js init
module.js:471
throw err;
^

Error: Cannot find module 'commander'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/Users/philipbeadle/Projects/SoLiD/node-solid-server/bin/solid.js:3:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
`
This is on the origin/dz_oidc branch.

@dmitrizagidulin
Copy link
Contributor

@philipbeadle It looks like there's some confusion between a globally installed Solid server, and a locally installed one. Running solid init most likely hits the globally installed one (which is why you're not seeing the config db questions). If running the local init gives you that error, it looks like you may have forgot to run npm install locally.

@philipbeadle
Copy link
Author

Ok, fixed that with npm install however there is no change.

Philips-MBP-2:node-solid-server philipbeadle$ node bin/solid.js init
? Path to the folder you want to serve. Default is /Users/philipbeadle/Projects/SoLiD/node-solid-server
? SSL port to run on. Default is 8443
? Solid server uri (with protocol, hostname and port) https://localhost:8443
? Enable WebID authentication Yes
? Serve Solid on URL path /
? Path to the SSL private key in PEM format /Users/philipbeadle/Projects/SoLiD/certificate/localhost.pem
? Path to the SSL certificate key in PEM format /Users/philipbeadle/Projects/SoLiD/certificate/localhost.pem
? Enable multi-user mode (users can sign up for accounts) No
? Do you want to have a CORS proxy endpoint? Yes
? Serve proxy on path /proxy
? Do you want to set up an email service? No
config created on /Users/philipbeadle/Projects/SoLiD/node-solid-server/config.json

Still creates the same config.

{
"root": "/Users/philipbeadle/Projects/SoLiD/node-solid-server",
"port": "8443",
"serverUri": "https://localhost:8443",
"webid": true,
"mount": "/",
"sslKey": "/Users/philipbeadle/Projects/SoLiD/certificate/localhost.pem",
"sslCert": "/Users/philipbeadle/Projects/SoLiD/certificate/localhost.pem",
"idp": false,
"proxy": "/proxy"
}

@dmitrizagidulin
Copy link
Contributor

dmitrizagidulin commented Apr 27, 2017

So that still looks like an earlier version, judging by the config wizard. Can you do a git fetch origin / git checkout dz_oidc / git rebase origin/dz_oidc? (And then a npm install)

@philipbeadle
Copy link
Author

philipbeadle commented Apr 27, 2017

Ok got the node server working with OIDC, but now theres no demo folder in this repo to try it out. Is there another demo now?
But the hosted one works now :)

@dmitrizagidulin
Copy link
Contributor

The demo folder is in another repo, https://github.com/solid/solid-auth-oidc
(The names are very similar -- this one is a server-side auth manager, and that one is the client-side).

@philipbeadle
Copy link
Author

Ah thanx :) Still trying to get my head around all this. Although it may look like it, i'm not a noob :) My main claim to fame is http://www.dnnplatform.com which I built with a bunch of others. I'd really like to get solid.social up and running with the OIDC auth but cant figure out what the user object is supposed to look like that gets returned in the HEADERS in the current code. Are you familiar with that project at all?

@dmitrizagidulin
Copy link
Contributor

DNN looks pretty cool (and no, no worries, this branch definitely still needs more documentation/explanations)!

I'm not quite familiar with solid.social, I know it's Melvin's project and I've seen screenshots, but haven't looked at the code. If it's still using WebID-TLS auth, then I think you're referring to the User: header, yeah? That should just be a WebID URI string. Also, lets take the conversation to gitter, so as not to spam this thread.

@dmitrizagidulin
Copy link
Contributor

Closing - let me know if you have any other questions.

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

No branches or pull requests

2 participants