14.2 Managing User Roles for RDF Graph Query UI

Users will have access to the application resources based on their role level. In order to access the Query UI application, you need to enable a role for the user.

The following describes the different user roles and their privileges:

  • Administrator: An administrator has full access to the Query UI application and can update configuration files, manage RDF objects and can execute SPARQL queries and SPARQL updates.

  • RDF: A RDF user can read or write Oracle RDF objects and can execute SPARQL queries and SPARQL updates. But, cannot modify configuration files.

  • Guest: A guest user can only read Oracle RDF objects and can only execute SPARQL queries.

Figure 14-2 User Roles for RDF Graph Query

User Roles for RDF Graph Query

Application servers, such as WebLogic Server, Tomcat, and others, allow you to define and assign users to user groups. Administrators are set up at the time of the RDF Graph server installation, but the RDF and guest users must be created to access the application console.

14.2.1 Managing Groups and Users in WebLogic Server

The security realms in WebLogic Server ensures that the user information entered as a part of installation is added by default to the Administrators group. Any user assigned to this group will have full access to the RDF Graph Query UI application.

To open the WebLogic Server Administration Console, enter http://localhost:7101/console in your browser and logon using your administrative credentials. Click on Security Realms as shown in the following figure:

Figure 14-3 WebLogic Server Administration Console

WebLogic Server Administration Console

14.2.1.1 Creating User Groups in WebLogic Server

To create new user groups in WebLogic Server:

  1. Select the security realm from the listed Realms in Figure 14-3.

  2. Click Users and Groups and then Groups.

  3. Click New to create new RDF user groups in Weblogic as shown below:

    Figure 14-4 Creating new user groups in WebLogic Server

    Creating new user groups in WebLogic Server

The following example creates the following two user groups:

  • RDFreadUser: for guest users with just read access to application.

  • RDFreadwriteUser: for users with read and write access to RDF objects.

Figure 14-5 Created User Groups in WebLogic Server

Created User Groups in WebLogic Server

14.2.1.2 Creating RDF and Guest Users in WebLogic Server

In order to have RDF and guest users in the user groups you must first create the RDF and guest users and then assign them to their respective groups.

To create new RDF and guest users in WebLogic server:

Prerequisites: RDF and guest users groups must be available or they must be created. See Creating User Groups in WebLogic Server for creating user groups.

  1. Select the security realm from the listed Realms as seen in Figure 14-3

  2. Click Users and Groups tab and then Users.

  3. Click New to create the RDF and guest users.

    Figure 14-6 Create new users in WebLogic Server

    Create new users in WebLogic Server

    The following example creates two new users :

    • rdfuser: user to be assigned to group with read and write privileges.

    • nonrdfuser: guest user to be assigned to group with just read privileges.

    Figure 14-7 New RDF and Guest users

    Description of Figure 14-7 follows
    Description of "Figure 14-7 New RDF and Guest users"
  4. Select a user name and click Groups to assign the user to a specific group.

  5. Assign rdfuser to RDFreadwriteUser group.

    Figure 14-8 RDF User

    RDF User
  6. Assign nonrdfuser to RDFreadUser group.

    Figure 14-9 RDF Guest User

    RDF Guest User

14.2.2 Managing Users and Roles in Tomcat Server

For Apache Tomcat, edit the Tomcat users file conf/tomcat-users.xml to include the RDF user roles. For example:

<tomcat-users xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd">

    <role rolename="rdf-admin-user"/>

    <role rolename="rdf-read-user"/>

    <role rolename="rdf-readwrite-user"/>

    <user password="adminpassword" roles="manager-script,admin,rdf-admin-user" username="admin"/>

    <user password="rdfuserpassword" roles="rdf-readwrite-user" username="rdfuser"/>

    <user password="notrdfuserpassword" roles="rdf-read-user" username="notrdfuser"/>

</tomcat-users>