• Role setup gone wrong

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #13330  by esuntu
 
Hello,

Before reading documentation about the AdminRole and UserRole, I deleted the AdminRole and created my own "Administrator" at the adminitration panel. After that I've got 403 error at login (for okmAdmin user). Then I changed the default role names at "/server/default/deploy/OpenKM.war/WEB-INF.web.xml" as follows:
Code: Select all
...
<security-constraint>
    <web-resource-collection>
      <web-resource-name>OpenKM Protected Area</web-resource-name>
      
      <!-- GWT -->
      <url-pattern>/frontend/*</url-pattern>
      
      <!-- JSPs -->
      <url-pattern>/admin/*</url-pattern>
      <url-pattern>/mobile/*</url-pattern>
      <url-pattern>/mobile-nt/*</url-pattern>
      
      <!-- Servlets -->
	  <url-pattern>/RepositoryStartup</url-pattern>
	  <url-pattern>/TextToSpeech</url-pattern>
	  <url-pattern>/Test</url-pattern>
	  <url-pattern>/frontend/*</url-pattern>
	  <url-pattern>/extension/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
	  <role-name>Administrator</role-name>
	  <role-name>UserRole</role-name>
   	</auth-constraint>
   	<user-data-constraint>
      <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
  </security-constraint>

  <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>OpenKM</realm-name> 
    <form-login-config>
      <form-login-page>/login.jsp</form-login-page>
      <form-error-page>/login.jsp?error=1</form-error-page>
    </form-login-config>
  </login-config>

  <security-role>
    <description>Admin user access</description>
    <role-name>Administrator</role-name>
  </security-role>

  <security-role>
    <description>General user access</description>
    <role-name>UserRole</role-name>
  </security-role>



Now I can login, but after login I get error "OKM-012015(GetRootFolder): path doesnt exist" and nothing else is loading.
As how much i understand - somewhere something is wrong with the role name "Administrator" and "AdminRole".

How can I fix this situation (for e.g. change the roles back to AdminRole or)? No files or directories are made, so I would be fine even with data reset (users and files). I dont really want to reinstall everything.
 #13354  by jllort
 
You should change in database ( configuration parameter ) the parameter default.admin.role in table OKM_CONFIG
 #13362  by esuntu
 
Thanks, but how can i do that?

Iam runnng the latest OpenKm 5.1.8 bundle with jBoss running the default database on a CentOs machine without GUI.

The Browsing embedded database is not working (as my server has no gui). Can i change the parameter in some other way (via command line, a database client)?
 #13363  by esuntu
 
Ok, I have now achieved to connect remotely to hsqldb with the RazorSQL client (I editted the /server/default/deploy/hsqldb-ds.xml file to server mode).
The connection via 1701 port is ok, but i got an error:
Code: Select all
ERROR: An error occurred while trying to make a connection to
the database: 

JDBC URL: jdbc:hsqldb:hsql://62.63.152.7:1701/OKM_APP

S1000
General error java.lang.RuntimeException:
database alias does not exist
If I connect to "jdbc:hsqldb:hsql://62.63.152.7:1701/", the connection is made, but there are no information about databases or something else.

Am I doing something wrong?
 #13367  by jllort
 
Browsing embeded database only will run in openkm server not in network one

The most simply way for doing it is:
stop jboss
open JBOSS_HOME/server/default/data/hypersonic/OKM_APP.script there're are all inserts, simply modify
start jboss

I don't know why do you need this kind of change ? why you can not survive with default UserRole and AdminRole names ?
 #13370  by esuntu
 
Thanks, that worked!

I can live with them. Its just I changed them from the web panel and after that I couldn't get on it again (so no possibility to change them back).
 #13448  by pavila
 
Is better to configure a "real" database like MySQL or PostgreSQL.
 #19516  by rmm
 
how to view the embedded database in the new release (v.6)?
 #19532  by jllort
 
Simply configure hsql ( file ) via jdbc using some application like for example datastudio ( take a look at server.xml to see the jdbc connection url this will give to you some idea how configure with application ). Important if openkm is started you can not connect to hsql database only one connection is allowed.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.