Securing your SPARQL Endpoint via OAuth
SPARQL endpoints are easy for random visitors to accidentally overload.
Virtuoso allows you to secure your SPARQL endpoint against such abuses in various ways, including OAuth.
Sample scenario
The following sample scenario demonstrates the OAuth keys and Protected SPARQL Endpoint features of the Virtuoso Auth UI:
- Download and install the
conductor_dav.vad
and ods_framework_dav.vad (commercial)
or ods_framework_dav.vad (open source)
packages.
- 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 Accounts:
- Click "Create New Account":
- In the presented form enter respectively:
- Account name, for ex:
demo1
; enter password and then confirm it;
- User type:
SQL/ODBC and WebDAV?
- Account role:
SPARQL_UPDATE
- Click "Save".
- The created user should be shown in the list of registered users:
- Go to
http://<cname>:<port>/oauth/
, where <cname>:<port>
are replaced by your local server values.
- Click the "OAuth Keys" link:
- Log in as user
demo1
:
- 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:
90baa79108b1d972525bacc76c0279c02d6421e8
- Click the "Back to main menu" link.
- Click the "Protected SPARQL Endpoint" link.
- The OpenLink? Virtuoso SPARQL Query form will be shown:
- Enter a simple query, for ex:
SELECT *
WHERE
{
?s ?p ?o
}
LIMIT 10
- For "OAuth token", enter the Consumer Key value which was generated above, i.e.,
90baa79108b1d972525bacc76c0279c02d6421e8
- Click the "Run Query" button.
- In the OAuth Authorization Service form, enter the password for user demo1 and click the "Login" button.
- Next you should authorize the request:
- On successful authentication and authorization, the query results should be shown:
Related
CategoryVirtuoso CategoryHowTo CategorySPARQL CategoryOAuth? CategoryFOAFSSL? CategoryDocumentation CategoryTutorial