user_guide:howto:polydb_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
user_guide:howto:polydb_api [2019/09/11 14:21] – [polyDB Structure] paffenholzuser_guide:howto:polydb_api [2019/09/11 15:33] (current) – [Permissions and Roles] paffenholz
Line 32: Line 32:
     * ''schema'': The actual json schema. Both json schemas and MongoDB use ''$'' as a special character. We need to replace this in the schema for stroring as this would lead to conflicts otherwise. In ''polyDB'' we use ''__'' (two underscores) for this.      * ''schema'': The actual json schema. Both json schemas and MongoDB use ''$'' as a special character. We need to replace this in the schema for stroring as this would lead to conflicts otherwise. In ''polyDB'' we use ''__'' (two underscores) for this. 
 The MongoDB ''_id'' of the info document is ''info.<polydb version>'' and of the schema document ''schema.<polydb version>'', where ''<polydb version.'' is the polydb version number for which the two documents apply. The MongoDB ''_id'' of the info document is ''info.<polydb version>'' and of the schema document ''schema.<polydb version>'', where ''<polydb version.'' is the polydb version number for which the two documents apply.
-{{ :user_guide:howto:info.2.1.json |Example of a meta information document}}+ 
 +{{ :user_guide:info.2.1.json |Here}} is an example of a //meta information document//, {{ :user_guide:schema.2.1.json |here}} is the schema document as it is contained in ''polyDB'', and {{ :user_guide:original_schema.2.1.json |here}} is the original json schema.  
 + 
 +==== Documentation entries in the Database ==== 
 + 
 +The documentation of a ''polyDB'' collection is stored in the MongoDB collection ''_collectionInfo.section.sub.collectionname''. Some information on sections and subsections is in ''_sectionInfo.section'', ''_sectionInfo.Section.Subsection_one'', etc. An example for a documentation document of a collection is {{ :user_guide:tropical.cubics.2.1.json |here}}, a documentation document for a section is {{ :user_guide:howto:tropical.2.1.json |here}}. This should sufficiently explain the structure of the documents.  
 + 
 +==== Permissions and Roles ==== 
 + 
 +MongoDB has a role based permission model. We use this for ''polyDB'' to organize read and write access to the collections. 
 + 
 +For each collection there are two roles, one with just read access, and one with write access. For a collection //collection// in the subsection //subsection_one// of section //section// the two roles are 
 +  * ''section.subsection_one.collection'' for read access 
 +  * ''section.subsection_one.collection.admin'' for write access 
 + 
 +(there may be more (or no) subsections in the list).  
 + 
 +For public read access to the data there is one role ''polymakeUser'' that inherits the read access roles of all public collections. This role is assigned to all users. In addition, a user can get assigned read access roles of non-public collections and write access roles to collections she or he wants to modify (add, delete or replace documents, edit the schema and meta data, edit the documentation).  
 + 
 +For general public access there is a user ''polymake'' that only has the ''polymakeUser'' role and password ''database''. With this user you can log into the MongoDB instance runngung the ''polyDB'' and read all public data.  
 + 
 +Creating roles and users, and assigning roles to users requires MonoDB the ''user admin role'' built into MongoDB, and thus is limited to administrators of ''polyDB''. Contact us if you  
 +  * want to start a public or private collection 
 +  * want to give other people access to your private collection 
 +  * want to make your private collection public.  
  
 ==== More Specifications for Data coming from ''polymake'' in the ''polyDB'' ==== ==== More Specifications for Data coming from ''polymake'' in the ''polyDB'' ====
  • user_guide/howto/polydb_api.1568211696.txt.gz
  • Last modified: 2019/09/11 14:21
  • by paffenholz