Multi user sharing same project

User afeef30056

22-05-2007 12:22:20

Hi all,


just a question... is it possible to set instantjchem starting with a shared project in a multi user environment?if yes, is it possible to set automatically the proper connection with an oracle DB for all user? this means that a new user doesn't have to open manually such shared project and set up the connection.





Thanks in advance


Pasquale

User afeef30056

22-05-2007 13:10:50

Problem solved!


But another is growing up


i have created a read only user using IJC database.


how can i get multiple connection from different IJC instances to the same project using the one ijc user created?


thanks Pasquale

ChemAxon fa971619eb

22-05-2007 13:59:27

I assume you found the instructions on how to connect to an existing schema?


http://www.chemaxon.com/instantjchem/ijc_2_0/docs/user/help/htmlFiles/connections/connect_to_schema.html





Note the part at the bottom where you can just provide the connection info in a file that is on a web server and just give the other users the URL of this file and their username and password.





For your second question, this is not possible. In IJC we are very careful to ensure that 2 users can't be modifying the same schema definition at the same time. It is essential we do this otherswise the data could easily get into an inconsitent state.





What you should do is set up a user account for each of your users.





Tim

User afeef30056

22-05-2007 14:38:53

Right! and what about ldap? IJC could query an ADS or OID to retrieve information about users, group and roles. Will you biuld this new feature?





Anyway, i cannot update password for my admin user, every time i do, it is still possible to login with the old one!!





Pasquale

ChemAxon fa971619eb

22-05-2007 15:33:56

Quote:
what about ldap? IJC could query an ADS or OID to retrieve information about users, group and roles. Will you biuld this new feature?
Yes. The IJC security uses the Acegi open source project for its security implementation.


http://acegisecurity.org/


This will allow us to configure in different security mechanisms, and LDAP is one obvious example. We are investigating this for a customer, so should have some progress to report at some stage.
Quote:
Anyway, i cannot update password for my admin user, every time i do, it is still possible to login with the old one!!
You are using the IJC DB based authentication? If so, have you removed the admin 'back door' from your configuration file. See here for details:


http://www.chemaxon.com/instantjchem/ijc_2_0/docs/user/help/htmlFiles/security/security_templates.html


This initial admin account is initially essential as you otherwise wouldn't have any accounts you can log in with, because at this stage you haven't created any users!


Once you have confirmed that you have a working account that gives you all roles then you should remove the admin account as described in step 5 of that help document.





Tim

User afeef30056

23-05-2007 07:17:37

Just another question please...


I created a project with three schemas inside, both connected to oracle db. The first one should be read only while the second have to be accessed from the same users but some of them should have editing roles and all the others just read only access, and the third accessed simply with anonymous account.


I settted users and password within ijg database on the first schema granting to all of them the ROLE_USERS, when i tried to do the same on the second schema i found the list of users created for the first schema. It seems that users' roles defined for the first schema are automatically inherited to the second schema.





How can i get different roles for different schemas to the same users within the same project? it just would be great for the moment to duplicate users' accounts on the second schema giving the new roles until you develop an ADS authorization and authentication procedure.





thanks,


Pasquale

ChemAxon fa971619eb

23-05-2007 08:29:30

All the IJC metamodel information and user infomation is stored in a set of tables in the database (all with the IJC_ prefix).


If you create 2 separate IJC schemas that are both located in the same database then the same set of IJC_* tables are used. The user information will be shared between them.





Note: it is generally not advisable to have 2 IJC schemas in the same database, and you should certainly not have the 2 IJC schemas modifying the same data tables, as inconsistencies would occur.





For your purposes you should probably used different oracle accounts for each schema so that the tables are kept separate - in separate oracle schemas (as opposed to IJC schemas). You would need to set up users in each IJC schema.





You may be able to be clever and grant access to a common IJC_SECURITY_USERS and IJC_SECURITY_AUTHORITIES tables so that both IJC schemas see the same user tables. This way the same users and rights would apply. But we have not tested this and it may have complications. Try it in a test environment first!





Tim

User afeef30056

23-05-2007 09:12:56

Quote:
Note: it is generally not advisable to have 2 IJC schemas in the same database, and you should certainly not have the 2 IJC schemas modifying the same data tables, as inconsistencies would occur.
i have 3 different IJC schemas on the same Oracle DB:





First IJC schema contains just read only table with a custom form view to access data





Second IJC schema on the same oracle database created by import of a different sdf file (therefore there is a different table with different data) which should have separate editing and read only roles using the same users of the first IJC schema or i could recreate them.





Third IJC schema on the same database which should represent a common area where users can create their own tables importing their own sdf files.





I know i could work around creating diiferent oracle schema for different IJC databases, but if it was possible to set on each IJC schema different users and roles or just different roles i could organize better my database on the oracle platform and for each of which i would be able to use IJC software to separate IJC schemas and puroposes respecting a common meaning between different IJC schema obtained by a unique oracle db.

ChemAxon fa971619eb

23-05-2007 09:39:23

I think you suggestions here are good. We will raise an issue to look at this.





But for now you have one major issue: it is possible to have a DB table (IJC Entity) present in 2 IJC schemas, and modifications make from one IJC schema will not be seen in the other IJC schemas. If the modification involved deletion of a field (or the whole entity) then bad things would happen because the other schema would think its still there.





We might be able to prevent a database table being used in more than one schema, but we'll need to investigate this.








Tim

User afeef30056

23-05-2007 09:52:02

thank you Tim,





in the previous post you say:
Quote:
You are using the IJC DB based authentication? If so, have you removed the admin 'back door' from your configuration file. See here for details:


http://www.chemaxon.com/instantjchem/ijc_2_0/docs/user/help/htmlFiles/security/security_templates.html


This initial admin account is initially essential as you otherwise wouldn't have any accounts you can log in with, because at this stage you haven't created any users!


Once you have confirmed that you have a working account that gives you all roles then you should remove the admin account as described in step 5 of that help document.
sorry but in the step 5 of the guide you say to remove the following line:
Quote:
<ref local="fileAuthenticationProvider"/>
but in my "Username/password using IJC database" template file i have


<ref local="tmpAuthenticationProvider"/>


<ref local="daoAuthenticationProvider"/>





Which one should i remove in order to delete the default admin user?

User afeef30056

23-05-2007 09:55:49

Sorry i did not answer you about the following proper suggestion
Quote:
But for now you have one major issue: it is possible to have a DB table (IJC Entity) present in 2 IJC schemas, and modifications make from one IJC schema will not be seen in the other IJC schemas. If the modification involved deletion of a field (or the whole entity) then bad things would happen because the other schema would think its still there.
I have different tables on different IJC schema and so users should not have a shared table between 2 IJC schemas

ChemAxon fa971619eb

23-05-2007 09:59:23

Quote:
but in my "Username/password using IJC database" template file i have


<ref local="tmpAuthenticationProvider"/>


<ref local="daoAuthenticationProvider"/>





Which one should i remove in order to delete the default admin user?
Remove tmpAuthenticationProvider.


We will update the documentation. It is out of date.

User afeef30056

23-05-2007 13:51:49

Hi Tim,





How can i delete from the DB an IJC schema?





i am doing as you told me! i have created theree different oracle users for my three ijc schemas. Now i want to use the same IJC project changing the old connection for one of the iJC schema to its new oracle user and creating two new schemas each of which with its own connection to the proper oracle user.


A doubt is calling me....


when i right click on the connection schema and then click delete, the system delete only the connection settings but the schema remains in the DB; infact when i connect to an existing schema i still found it

ChemAxon fa971619eb

23-05-2007 14:02:26

Yes, that is correct. Currently the delete schema only deletes the reference to it from your local IJC. To delete it fully you will need to go into the DB and manually delete any remaining tables (primarily the IJC_* tables). This is not necessay for a local DB as the database files are local and deleted along with the settings.





We are currently working on options to also delete the tables from the DB when you delete the schema from IJC. This should be included in the final 2.0 release.





Tim

User afeef30056

23-05-2007 14:23:35

URGENT!!


i exported the ijc oracle schema to import it in anew oracle schema


inthe exported oracle schema i setted admin users and normal users. when i try to log in to the imported ijc schema using the ijc users created before the export operation i got this error message:


Failed to read numberOfOnes





In any case, how can i set a new admin account with admin and edit roles in case my previous admin account has been corrupted or is not available as in this case??

ChemAxon fa971619eb

23-05-2007 14:45:27

Do you mean you used Oracle export/import to do the import?





The error message sugests the imported schema was not read as the imformation about a JChem table could not be determined. Probably becase the JCHEMPROPERTIES table is not correct as in Oracle the table names in the JCHEMPROPERTIES have the schema name prefixed e.g. SCHEMA1.TABLE_NAME and if you used Oracle to export and import the data into a different oracle schema then these schema names will be incorrect (e.g. it needs SCHEMA2.TABLE_NAME).





Take a look at the contents of the JCHEMPROPERTIES tables in each oracle schema to be sure (e.g using SQLPLus).





Potentially you might be able to fix this manually using SQLPlus to correct the values, but this might be hard work. Unfortunately I don't think this sort of approach is going to work. You need to import your data directly in IJC.





Tim

User afeef30056

23-05-2007 14:56:36

Hi Tim,


i exported and imported the oracle schema of IJC more than one time an all workerd fine.


In this case the only difference is that i created users with roles before export.


I think there is a problem in users table! Is it possible to replace the original default admin user?? in this case i could reconnect with the original admin and do something on users settings

User afeef30056

23-05-2007 15:24:42

i am sorry you are right. In the jchemproperties there is


PROP_NAME


table.oldschemaname.tablename





but should be


table.newschemaname.tablename





what happens if i change the values in jchemproperties from oldschmaname to new schemaname?

ChemAxon fa971619eb

23-05-2007 18:06:36

If you need to manually reset the security configuration you can remove the appropriate row from the IJC_SECURITY_INFO table using a tool like SQLPlus. Usually there will be only one row in this table, but if you have multiple IJC schemas in the database you may have a row for each IJC schema. Delete the appropriate row and the security will be set back to its default settings.





Tim

ChemAxon fa971619eb

23-05-2007 18:08:23

Yes, I think if you carefully rename all the appropriate values in the JCHEMPROPERTIES table I think it should probably work.





Tim

User afeef30056

25-05-2007 07:23:51

OK Tim, it works!! thank you very much for your help