janta v0.1
- 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
- URL: http://raspberry.eecs.jacobs-university.de:8081/janta/services/documents/list.xml
- Result
<?xml version="1.0"?> <documents> <document> <id>6</id> <uri>/binomial.omdoc</uri> <title>Binomial</title> </document> <document> <id>7</id> <uri>/myEx.omdoc</uri> <title>Other document</title> </document> </documents>
- 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
- Method: GET
- Format: None
- Parameters: None
- Authentication: Yes
- Description: A fast check to see if the credentials are okay. Do not rely on the returned data, just on the response header.
- Example
- URL: http://raspberry.eecs.jacobs-university.de:8081/janta/services/users/is_valid
- With correct username and password provided in the header, you will get a status code of 200
- 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
- URL: http://raspberry.eecs.jacobs-university.de:8081/janta/services/users/list.xml
- Result:
<?xml version="1.0"?> <users> <user> <id>63</id> <username>dzogi</username> <firstname>Josip</firstname> <lastname>Dzolonga</lastname> </user> </users>
- 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
- URL: http://raspberry.eecs.jacobs-university.de:8081/janta/services/users/jdjolonga
- Result:
<?xml version="1.0"?> <user> <id>63</id> <username>jdjolonga</username> <firstname>Josip</firstname> <lastname>Djolonga</lastname> </user>
- 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
- URL: http://raspberry.eecs.jacobs-university.de:8081/janta/services/users/jdjolonga
- Given the POST arguments, the data will be changed
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
