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

WebID certificate

Henry Story edited this page Nov 23, 2013 · 2 revisions

In order to be able to access protected resources you need to use a WebID enabled X509 Certificate.

Using the localhost test certificate

With cURL

When using curl on your localhost server you need to use the test-localhost.pem certificate with the test password. You can do that by using the --cert eg/test-localhost.pem:test flag.

If you want to use your own certificate then just point curl using the --cert flag to your certificate with the corresponding password.

Installing default test Certificate in your browser

You can install the certificate in the eg directory into your browser or keychain.

With Chrome and Safari on OSX:

Open the eg directory with

$ open eg/

This will open a file explorer. You can the double click on one of the certificates which will import it into your Keychain.app.

You can the try your https://localhost:8443/2013/ server, which will ask you for a certificate when you need one.

With Firefox

  1. Open the Preferences Dialog box
  2. Click the Certificates tab
  3. Click the View Certificates tab
  4. Make sure the `Your Certificates tab is selected
  5. Click the import button at the bottom
  6. Select the test-localhost certificate

Creating a WebID Certificate

Creating a WebID certificate from your browser is much easier. (It can be easier than this, but that is still a todo)

After starting your server you can point your browser to http://localhost:9000/srv/certgen or to the service over https and create yourself a certificate. For testing purposes and in order to be able to work without the need for network connectivity use `http://localhost:8443/2013/cert#me'. The WebID Certificate will be signed by the agent with Distinguished Name "CN=WebID,O=∅" and added by your browser to its keychain.

( Todo: later we will add functionality to add create a local webid that also published the RDF ) To make the WebID valid you will need to publish the relavant rdf at that document location as explained in the WebID spec