5

I have successfully installed Openrdf Repository (sesame 2.3.2) and Openrdf workbench however I do not know how to set up a user and a password to protect Openrdf workbench. I suppose that there is --somewhere -- a configuration file.

Can somebody give me a hint how to create a user and set up a password for openrdf workbench?

1 Answer 1

6

I believe you need to password protect at the servlet container level. Are you using Tomcat? Here's what I used to set up basic authentication with Tomcat 6:

web.xml

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Sesame Workbench</web-resource-name>
    <url-pattern>/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
    <role-name>sesame-user</role-name>
  </auth-constraint>
</security-constraint>          

<login-config>
  <auth-method>BASIC</auth-method>
  <realm-name>Sesame Workbench</realm-name>
</login-config>

<security-role>
  <description>The role required for Sesame workbench</description>
  <role-name>sesame-user</role-name>
</security-role>

tomcat-users.xml

<role rolename="sesame-user"/>
<user username="workbench" password="workbench" roles="sesame-user"/>
2
  • I do not know why but it does not work. I mean I can open workbench without giving username and password.
    – Skarab
    Sep 10, 2010 at 9:57
  • 1
    My fault, I assumed something would work without testing it. It seems you can't use the main web.xml to protect individual webapp URLs (but you can use /* to protect everything served by Tomcat). So if you want to protect only the workbench, you would add the above snippet to web.xml for that webapp (e.g. webapps/openrdf-workbench/WEB-INF/web.xml).
    – wynz
    Sep 15, 2010 at 2:55

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.