10.3 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: An 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 10-2 User Roles for RDF Graph Query

Description of Figure 10-2 follows
Description of "Figure 10-2 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.

10.3.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.

WebLogic Server 15.1.1.0.0 uses WebLogic Remote Console for administration tasks (https://oracle.github.io/weblogic-remote-console/).

Start WebLogic Remote Console and connect to your WebLogic Server instance using your administrative credentials. Open the Security Data Tree and click on Realms as shown in the following figure:

Figure 10-3 WebLogic Server Administration Console

Description of Figure 10-3 follows
Description of "Figure 10-3 WebLogic Server Administration Console"

10.3.1.1 Creating User Groups in WebLogic Server

To create new user groups in WebLogic Server:

  1. Expand Realms -> myrealm -> Authentication Providers -> Default Authenticator in the Security Data Tree.
  2. Select Groups.
  3. Click New to create new RDF user groups in Weblogic as shown:

    Figure 10-4 Creating new user groups in WebLogic Server

    Description of Figure 10-4 follows
    Description of "Figure 10-4 Creating new user groups in WebLogic Server"

The following example creates two user groups:

  • RDFreadUser: For guest users with read-only access to the application.
  • RDFreadwriteUser: For users with read and write access to RDF objects.

Figure 10-5 Created User Groups in WebLogic Server

Description of Figure 10-5 follows
Description of "Figure 10-5 Created User Groups in WebLogic Server"

10.3.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. Expand RealmsmyrealmAuthentication Providers in the Security Data Tree, then select Default Authenticator.
  2. Click Users.

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

    Figure 10-6 Create new users in WebLogic Server

    Description of Figure 10-6 follows
    Description of "Figure 10-6 Create new users in WebLogic Server"

    The following example creates two new users :

    • rdfappuser: A user assigned to a group with read and write privileges.

    • rdfguestuser: A guest user assigned to a group with read-only privileges.

    Figure 10-7 RDF Application and Guest Users

    Description of Figure 10-7 follows
    Description of "Figure 10-7 RDF Application and Guest Users"
  4. Select a user name and click Groups to assign the user to a specific group.
  5. Assign rdfappuser to RDFreadwriteUser group and click Save.

    Figure 10-8 RDF Application User

    Description of Figure 10-8 follows
    Description of "Figure 10-8 RDF Application User"
  6. Assign rdfguestuser to RDFreadUser group and click Save,

10.3.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="<admin_password>" roles="manager-script,admin,rdf-admin-user" username="admin"/>

    <user password="<rdfappuser_password>>" roles="rdf-readwrite-user" username="rdfappuser"/>

    <user password="<rdfguestuser_password>" roles="rdf-read-user" username="rdfguestuser"/>

</tomcat-users>