Virtuoso SPARQL OAuth Tutorial
The following sample scenario demonstrates the OAuth keys and Protected SPARQL Endpoint features of the Virtuoso Auth UI:
- Download and install the
conductor_dav.vadandpackages.policy_manager_dav.vad - From the Conductor UI create user
test1, enable SQL and DAV logins, and grant it theSPARQL_UPDATErole:- Go to
http://<cname>:<port>/conductor, where<cname>:<port>are replaced by your local server values. - Log in as user "
dba" or another user with DBA privileges - Go to System Admin -> User Account and click the "Create New Account" link
- In the form:
- Enter user name, password, and confirm password, e.g., "
test1", "test1pwd", "test1pwd". - Check "Allow DAV Logins"
- Check "Allow SQL/ODBC Logins"
- Add Role "
SPARQL_UPDATE" from the list of available Roles to the "Selected" box.
- Enter user name, password, and confirm password, e.g., "
- Click the "Save" button.
- The user
test1will be shown as created.
- Go to
- Go to
http://<cname>:<port>/policy_manager/, where<cname>:<port>are replaced by your local server values.
- Click the "OAuth Keys" link
- Log in as user
test1
- The OAuth application registration form will be shown.
- Select SPARQL from the "Application name" list, and click the "Generate Keys" button.
- A Consumer Key for SPARQL will be generated.
It will look something like this:
cf92411e17f59960a4189451bfb5bf6b92c856e3
- Click the "Back to main menu" link .
- Click the "Protected SPARQL Endpoint" link.
- The OpenLink Virtuoso SPARQL Query form will be shown.
- Enter the following for Default Graph URI:
http://myopenlink.net/dataspace/person/kidehen#this
- For "OAuth token", enter the Consumer Key value which was generated above, i.e.,
cf92411e17f59960a4189451bfb5bf6b92c856e3
- Click the "Run Query" button.
- In the OAuth Authorization Service form, enter the password for user test1 and click the "Login" button.
- In the new form, click the "Authorize" button.
- The query results will be shown:
References
- OpenLink's explanation of OAuth
- Virtuoso OAuth server
- Using OAuth with ODS
- ODS Ubiquity Commands
- Virtuoso OAuth Implementation
- ODS Controllers
- Testing Virtuoso OAuth with 3rd Party OAuth Clients
- OAuth Ubiquity Tutorial
- Virtuoso OAuth Test Tool for ODS Controllers
- ODS Ubiquity Tutorials
- OAuth Applications Authentication examples
- OAuth API
- Virtuoso Authentication Server UI.
- SPARQL OAuth Tutorial
- FOAF+SSL Support in OpenLink Data Spaces.
- FOAF+SSL ACLs Tutorial
- Guide for Set up a X.509 certificate issuer and HTTPS listener and generate ODS user certificates.
- CA Keys Import using Conductor