<docbook><section><title>ODSWebIDIdpProxy</title><title> Using Virtuoso&#39;s WebID Identity Provider (IdP) Proxy Service with an X.509 certificate bearing an LDAP scheme WebID</title> Using Virtuoso&#39;s <ulink url="WebID">WebID</ulink> Identity Provider (<ulink url="IdP">IdP</ulink>) Proxy Service with an X.509 certificate bearing an LDAP scheme <ulink url="WebID">WebID</ulink>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">What?</bridgehead>
 A callback supporting service that enables third parties verify <ulink url="WebIDs">WebIDs</ulink> via RESTful interaction patterns.<bridgehead class="http://www.w3.org/1999/xhtml:h2">Why?</bridgehead>
 Most Web Developers and Users prefer to do plumbing as opposed to wholesale development in the course of web exploitation.
 Thus, federated services to which responsibilities can be delegated are always beneficial.<bridgehead class="http://www.w3.org/1999/xhtml:h2">How?</bridgehead>
<para>This verification service offers a user-friendly alternative to manually querying SPARQL endpoints; i.e., checking whether a <ulink url="WebID">WebID</ulink> and Public Key are related within a profile graph.</para>
<para>The service currently supports <ulink url="WebIDs">WebIDs</ulink> based on the ldap:, http:, mailto:, acct: URI schemes.
 Other URI schemes will be added over time.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> Example Using the Service Endpoint</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Prerequisites</bridgehead>
<para>If you want to use your own Virtuoso instance for this exercise, please ensure the following steps are performed:</para>
<para> </para>
<orderedlist spacing="compact"><listitem>Start Virtuoso server instance (locally, remote, EC2 AMI, etc.
 ); </listitem>
<listitem>Configure an <ulink url="ODSSetupSSL">HTTPS Listener</ulink> for handling HTTPS requests from HTTP user agents (clients); </listitem>
<listitem>Install the <ulink url="https://virtuoso.openlinksw.com/download/">ODS Framework VAD package</ulink>; </listitem>
<listitem>Install the <ulink url="https://virtuoso.openlinksw.com/download/">HTML based Certificate Generator VAD package</ulink>; </listitem>
<listitem>Create an <ulink url="ODSGenerateX509Certificate">X.509 Certificate</ulink> with <ulink url="WebID">WebID</ulink> watermark.
 Otherwise, simply use the live certificate generation service at: <ulink url="http://id.myopenlink.net/certgen/.">http://id.myopenlink.net/certgen/.</ulink></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h4"> Steps</bridgehead>
<orderedlist spacing="compact"><listitem>Access the service endpoint: https://&lt;Virtuoso host or IP address&gt;[:&lt;ssl-port&gt;]/ods/webid_check.vsp, e.g., <ulink url="https://id.myopenlink.net:443/ods/webid_check.vsp">https://id.myopenlink.net:443/ods/webid_check.vsp</ulink> </listitem>
<listitem>The browser should prompt for identification.
 Select the certificate generated above, and click &quot;OK&quot;.
<figure><graphic fileref="ODSWebIDIdpProxy/ldap2.png" /></figure> </listitem>
<listitem>The <ulink url="WebID">WebID</ulink> Identity Provider UI should be presented: <figure><graphic fileref="ODSWebIDIdpProxy/ldap3.png" /></figure> </listitem>
<listitem>Enter a Requesting service endpoint, for example: <programlisting>https://id.myopenlink.net/ods/
</programlisting><figure><graphic fileref="ODSWebIDIdpProxy/ldap4.png" /></figure> </listitem>
<listitem>Click &quot;Go&quot;.
</listitem>
<listitem>When prompted for verification, again the certificate generated above and click &quot;OK&quot;: <figure><graphic fileref="ODSWebIDIdpProxy/ldap2.png" /></figure> </listitem>
<listitem>You should now be redirected to a log in page which has recognized the certificate&#39;s <ulink url="WebID">WebID</ulink>, and a &quot;<ulink url="WebID">WebID</ulink> Login&quot; should be offered: <figure><graphic fileref="ODSWebIDIdpProxy/ldap5.png" /></figure> </listitem>
<listitem>Click the &quot;<ulink url="WebID">WebID</ulink> Login&quot; button.
</listitem>
<listitem>You should now be successfully logged in: <figure><graphic fileref="ODSWebIDIdpProxy/ldap6.png" /></figure></listitem>
</orderedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> Examples Using cURL</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Prerequisites</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h5"> Using Your Own Virtuoso Instance</bridgehead>
<para>If you want to use your own Virtuoso instance for this exercise, please ensure the following steps are performed:</para>
<orderedlist spacing="compact"><listitem>Start Virtuoso server instance (locally, remote, EC2 AMI, etc.
 ); </listitem>
<listitem>Configure an <ulink url="ODSSetupSSL">HTTPS Listener</ulink> for handling HTTPS requests from HTTP user agents (clients); </listitem>
<listitem>Install the <ulink url="https://virtuoso.openlinksw.com/download/">ODS Framework VAD package</ulink>; </listitem>
<listitem>Install the <ulink url="https://virtuoso.openlinksw.com/download/">HTML based Certificate Generator VAD package</ulink>; </listitem>
<listitem>Create an <ulink url="ODSGenerateX509Certificate">X.509 Certificate</ulink> with <ulink url="WebID">WebID</ulink> watermark.
 Otherwise, simply use the live certificate generation service at: <ulink url="http://id.myopenlink.net/certgen/.">http://id.myopenlink.net/certgen/.</ulink> </listitem>
<listitem>Using the service at: <ulink url="http://id.myopenlink.net/certgen/,">http://id.myopenlink.net/certgen/,</ulink> export the generated X.509 Certificate and its associated private key to a local PKCS#12 (.p12 of .pfx) file system e.g., the file: &quot;demo.p12&quot; and password: &quot;test&quot;; or simply export to a PEM file.
</listitem>
<listitem>Alternatively, you can achieve the same using <ulink url="OpenSSL">OpenSSL</ulink> utilities by executing the following from the command line: <programlisting>openssl pkcs12 -in demo.p12 -out demo.pem -nodes
</programlisting></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h5"> Using A Live Instance</bridgehead>
<para>If don&#39;t already have an X.509 certificate with a <ulink url="WebID">WebID</ulink> watermark, simply use the live certificate generation service at: <ulink url="http://id.myopenlink.net/certgen/">http://id.myopenlink.net/certgen/</ulink> . You can also use this service to export your certificate in PEM and other formats.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4">Example 1: Call the Service with Certificate</bridgehead>
<orderedlist spacing="compact"><listitem>Execute the following command: <programlisting>$ curl -i -k --cert demo.pem  https://id.myopenlink.net/ods/webid_check.vsp?callback=http://id.myopenlink.net/myapp/
Enter PEM pass phrase:
HTTP/1.1 302 Found
Server: Virtuoso/06.03.3131 (Linux) x86_64-generic-linux-glibc25-64  VDB
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Date: Thu, 05 Jan 2012 16:08:13 GMT
Accept-Ranges: bytes
Location: http://id.myopenlink.net/myapp/?webid=http%3A%2F%2Fid.myopenlink.net%2Fdataspace%2Fperson%2Fdemo%23this&amp;ts=2012-01-05T11%3A08%3A13.000004-05
%3A00&amp;signature=a17coYTjgrPnz%2FmEi9OVRwiTEa8%3D
Content-Length: 0
</programlisting></listitem>
<listitem>In case of successful <ulink url="WebID">WebID</ulink> verification, the <ulink url="WebID">WebID</ulink> should be returned, as above: <programlisting>webid=http%3A%2F%2Fid.myopenlink.net%2Fdataspace%2Fperson%2Fdemo%23this 
</programlisting></listitem>
<listitem>Additionally a timestamp in ISO 8601 format should be returned, as above: <programlisting>ts=2012-01-05T11%3A08%3A13.000004-05
</programlisting> </listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h4">Example 2: Call the Service without Certificate</bridgehead>
<orderedlist spacing="compact"><listitem>Execute the following command: <programlisting>$ curl -i -k   https://id.myopenlink.net/ods/webid_check.vsp?callback=http://id.myopenlink.net/myapp/
HTTP/1.1 302 Found
Server: Virtuoso/06.03.3131 (Linux) x86_64-generic-linux-glibc25-64  VDB
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Date: Thu, 05 Jan 2012 15:02:16 GMT
Accept-Ranges: bytes
Location: http://id.myopenlink.net/myapp/?error=noCert&amp;ts=2012-01-05T10%3A02%3A16-05%3A00&amp;signature=TLNskapgUg75%2FzJSRe154RloH%2FE%3D
Content-Length: 0
</programlisting></listitem>
<listitem>The service returns &quot;error=..&quot; as it is in our example showing there is no certificate: <programlisting>error=noCert  
</programlisting></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="ODSWebIDIdP">Using Virtuoso&#39;s Delegated WebID Verification Service</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSPARQLEndpointProtection">Safeguarding your Virtuoso-hosted SPARQL Endpoint</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtTipsAndTricksGuideSPARQLEndpointProtection">SPARQL Endpoint Protection Methods Collection</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/">Virtuoso documentation</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsupportedprotocolendpoint">SPARQL Service Endpoint</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsupportedprotocolendpointuri">Service Endpoint Security</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html#sparqwebservicetbl">Managing a SPARQL Web Service Endpoint</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html">SPARQL</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSPARQLDET">SPARQL Endpoint DET Configuration Guide</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSPARQLSecurityWebID">WebID Protocol &amp; SPARQL Endpoint ACLs Tutorial</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtOAuthSPARQL">SPARQL OAuth Tutorial</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtTipsAndTricksGuideSPARQLEndpoints">Securing SPARQL endpoints</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="OdsSPARQLAuth">SPARUL over SPARQL using the http://cname:port/sparql-auth endpoint</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtAuthServerUI">Virtuoso Authentication Server UI</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSPARQLSSL">Manage a SPARQL-WebID based Endpoint</ulink> </listitem>
<listitem><ulink url="VirtODSSecurityWebID">WebID Protocol Support in OpenLink Data Spaces</ulink>.
</listitem>
<listitem>Manage ODS Datadspaces Objects <ulink url="WebID">WebID</ulink> Access Control Lists (ACLs): <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="ODSBriefcaseWebID">ODS Briefcase WebID based ACL Guide</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="ODSBriefcaseWebIDPerson">Person Entity WebID based ACL Guide</ulink> </listitem>
<listitem><ulink url="ODSBriefcaseWebIDGroup">Group Entity WebID based ACL Guide</ulink> </listitem>
<listitem><ulink url="ODSBriefcaseWebIDPublic">Public WebID based ACL Guide</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="ODSFeedManagerWebIDACL">ODS Feed Manager WebID based ACL Guide</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="ODSFeedManagerWebIDACLPerson">Person Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSFeedManagerWebIDACLGroup">Group Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSFeedManagerWebIDACLPublic">Public Specific ACL for anyone with a WebID</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="ODSCalendarWebIDACL">ODS Calendar WebID based ACL Guide</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="ODSCalendarWebIDACLPerson">Person Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSCalendarWebIDACLGroup">Group Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSCalendarWebIDACLPublic">Public Specific ACL for anyone with a WebID</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="ODSBookmarksWebIDACL">ODS Bookmark Manager WebID based ACL Guide</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="ODSBookmarksWebIDACLPerson">Person Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSBookmarksWebIDACLGroup">Group Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSBookmarksWebIDACLPublic">Public Specific ACL for anyone with a WebID</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="ODSAddressBookWebIDACL">ODS Addressbook  WebID based ACL Guide</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="ODSAddressBookWebIDACLPerson">Person Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSAddressBookWebIDACLGroup">Group Entity Specific ACL</ulink> </listitem>
<listitem><ulink url="ODSAddressBookWebIDACLPublic">Public Specific ACL for anyone with a WebID</ulink> </listitem>
</itemizedlist></listitem>
</itemizedlist></listitem>
<listitem><ulink url="ODSPkiSetup">Guide for Set up a X.509 certificate issuer and HTTPS listener and generate ODS user certificates</ulink> </listitem>
<listitem><ulink url="ODSSetupSSL">Configure Virtuoso+ODS instance as an X.509 Certificate Authority and HTTPS listener</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSetupSSL">Configure Virtuoso instance as an X.509 Certificate Authority and HTTPS listener</ulink> </listitem>
<listitem><ulink url="VirtODSPubSubHub">Setting up PubSubHub in ODS</ulink> </listitem>
<listitem><ulink url="VirtPubSubHub">PubSubHubBub Demo Client Example</ulink> </listitem>
<listitem><ulink url="VirtFeedPubSubHub">Feed subscription via PubSubHub protocol Example</ulink> </listitem>
<listitem><ulink url="VirtPubSubHubACL">Setting Up PubSubHub to use WebID Protocol or IP based control lists</ulink> </listitem>
<listitem><ulink url="OdsKeyImport">CA Keys Import using Conductor</ulink> </listitem>
<listitem><ulink url="ODSGenerateX509Certificate">Generate an X.509 Certificate hosted WebID Guide</ulink> </listitem>
<listitem><ulink url="ODSGenerateWebIDX509CertOSKeystore">Generate an X.509 Certificate (with a WebID watermark) to be managed by host operating system keystore</ulink> </listitem>
<listitem><ulink url="ODSGenerateWebIDX509CertBrsKeystore">Generate an X.509 Certificate (with a WebID watermark) to be managed by a browser-based keystore</ulink> </listitem>
<listitem><ulink url="ODSBriefcaseWebIDShareFile">ODS Briefcase WebID Protocol Share File Guide</ulink> </listitem>
<listitem><ulink url="http://esw.w3.org/topic/foaf+ssl">WebID Protocol Specification</ulink> </listitem>
<listitem><ulink url="https://foaf.me/simpleLogin.php">Test WebID Protocol Certificate page</ulink> </listitem>
<listitem><ulink url="http://test.foafssl.org/cert/">WebID Protocol Certificate Generation page</ulink></listitem>
</itemizedlist></section></docbook>