JC Tchitchiama wrote:
Vadim,
One other thing that may be considered is an xml-security layer at the document level. A documents can be signed (to prevent fraudulent changes) or indeed encrypted to allow only folks with the right public key to access (read/edit) the document.
I think xml-security is outside of the scope of Xindice: you can implement xml-security on top of Xindice, in your application.
Another option might be a driver which wraps another driver and provides xml-security encryption / decryption transparantly.
You mentioned username/password at the collection level.
Because that's part of XML:DB spec:
/**
* Retrieves a <code>Collection</code> instance based on the URI provided
* in the <code>uri</code> parameter. The format of the URI is defined in the
* documentation for DatabaseManager.getCollection().<p/>
*
* Authentication is handled via username and password however it is not
* required that the database support authentication. Databases that do not
* support authentication MUST ignore the
* <code>username</code> and <code>password</code> if those provided are not
* null.
*
* @param uri the URI to use to locate the collection.
* @param password The password to use for authentication to the database or
* null if the database does not support authentication.
* @return A <code>Collection</code> instance for the requested collection or
* null if the collection could not be found.
* @return The <code>Collection</code> instance
* @exception XMLDBException with expected error codes.<br />
* <code>ErrorCodes.VENDOR_ERROR</code> for any vendor
* specific errors that occur.<br />
* <code>ErrroCodes.INVALID_URI</code> If the URI is not in a valid format. <br />
* <code>ErrroCodes.PERMISSION_DENIED</code> If the <code>username</code>
* and <code>password</code> were not accepted by the database.
*/
Collection getCollection(String uri, String username, String password)
throws XMLDBException;
I think we should have a first authentication at the database instance level and a refined one at the collection level. We could also have use roles defined so that one a user is logged in depending on one's role one is allowed to perform some actions.
I agree on roles stuff.
Vadim
