janta v0.1

go back to janta overview

  • initial servlet infrastructure
  • permission infrastructure
  • primitive user model (static data only)
  • integration with JOMDoc
  • documentation (outlining OMBase integration)
  • testing
  • war support
  • straight forward way to build from console

Permission & Authentication

The Janta system has users, which can have memberships to different groups. These are the steps taken by the Janta system when checking if a user has permission to read/write some resource

  • Check if thereis record for that particular user and document combination in the UserPermission table (permissions users <-> documents)
  • For every group the user is in, check if there is a record in the GroupPermission table (perrmissions groups <-> documents)
  • Fall back on the default permissions set for the document (every document has defaultRead and defaultWrite permissions)

The authentication is performed by supplying a  HTTP Basic Auth header with every request that requires authentication, as described below.

API specification for janta v0.1.

All URI's are relative to janta's root, for example  http://raspberry.eecs.jacobs-university.de:8081/janta/ . If Authentication is set to "yes" that means that you need to provide a Basic Authentication Header in the HTTP request. A 403 status means that the username and password combination is not valid. The returned data is valid if the HTTP Status of the response is 200, unless otherwise stated in the method specification.

Documents API

  • URI: /services/documents/list.xml
    • Method: GET
    • Format:XML
    • Parameters: None
    • Authentication: No
    • HTTP Status: 200 if everything is fine
    • Description: Returns an XML document with the titles, URI and id of the documents present in the system
    • Example
  • URI: /services/documents
    • Method: GET
    • Format: XML
    • Parameters:
      • path: the URI to the document, as returned from /services/documents/list.xml
    • Authentication: YES
    • Description: Returns an XHTML rendering of the requested document. A status of 404 is returned if the document does not exist and 403 if the user has not permissions to access the document.
    • Example: Try  http://raspberry.eecs.jacobs-university.de:8081/janta/services/documents/?path=/binomial.omdoc to the XHTML output of the document "binomial.omdoc"

Users API

  • URI: /services/users/is_valid
  • URI: /services/users/list.xml
    • Method: GET
    • Format: XML
    • Parameters: None
    • Authentication: No
    • Description: Returns an XML document with the id, username, first name and last name of all the users in the system
    • Example
  • URI: /services/users/{username}
    • Method: GET
    • Format: XML
    • Parameters: None
    • Authentication: No
    • Description: Returns an XML document containing the id, first name and last name of {username}. A status of 404 is returned if the user does not exist.
    • Example
  • URI: /services/users/{username}
    • Method: POST
    • Format: XML
    • Parameters:
      • firstName - the new first name Optional
      • lastName - the new last name Optional
      • password - the new password Optional
    • Authentication: Yes
    • Description: Returns an XML document containing the id, first name and last name of {username}. A status of 404 is returned if the user does not exist.
    • Example

Release

Download  janta-v0.1

See ticket:536 for instructions

Create documentation and war file with

  • the javadoc with ant javadoc
  • the war with ant war
  • ant build only copies the classes into the build directory