I will make two proposals for changing the RightService API:
The first does not actually change any code, but it is a preparation
for future changes. I want to be sure that the methods checkAccess
and hasAccessLevel aren't used interchangeably; it should be well
defined when to use one or the other.
The second proposal is a complete rework of the API, which might be a
bit further into the future.
1. Change the semantics of hasAccessLevel slightly.
Currently the method hasAccessLevel is defined as:
/**
* Verifies if the user identified by {@code username} has the
* access level identified by {@code right} on the document with
* the name {@code docname}.
I would like to make a change the describing text into:
/**
* Decides whether the access level given by {@code right} should
* be granted during rendering of the document identified by
* {@code docname} by request of the user identified by {@code
* username}.
In other words, the rights queried for is tied to the thread
executing a request on behalf of the user. In contrast, the
checkAccess method queries for the configured rights of a
particular user.
This suggests that the underlying implementation may choose to base
its decision on more things than the given user and document, and
thus opens up for more possibilities to change the security policy.
For instance,
hasAccessLevel("programming", context.getUser(), docname, context)
could be made equivalent to
hasProgrammingRights(context.getWiki().getDocument(docname), context)
In the current implementation, XWikiRightServiceImpl, the methods
checkAccess and hasAccessLevel can be used interchangeably once the
user have been authenticated. But it seems that the current usage
pattern more or less matches the above change in semantics already.
2. Deprecate all methods in the current API and introduce the following
new ones:
boolean checkAccess(String action, EntityReference entity);
boolean userHasRight(DocumentReference userIdentity, Right right,
EntityReference entity);
boolean hasAccessLevel(Right right);
Iterable<Right> getEnabledRights(EntityType entityType);
The differences are:
1. The context parameter is dropped. The right service can have
an Execution instance injected instead.
2. No exceptions are thrown. Instead, on error, log and deny access.
3. Identify users by the DocumentReference of their profile page.
4. Introduction of the enum 'Right'.
5. The rights are controlled against entities identified by
EntityReferences that may be of type WIKI, SPACE or DOCUMENT.
6. Add a new method, userHasRight, for querying for the specific
rights of a given user on a given entity, where the entity may
be wiki, space or document. This method replaces the method
hasAdminRights. I guess this method will be primarily used by
the user interface.
7. hasAccessLevel have the same change in semantics as mentioned
above, and could thus replace the hasProgrammingRights
methods. In other words, hasAccessLevel provides the answer
to the question "should access for an operation that requires
the specified right be granted given the current context?"
Within the lifecycle of a request, first a call should be made
to checkAccess to authenticate the user and to grant access to
the specific action. Subsequent security checkpoinst should
normally use hasAccessLevel.
8. The listAllLevels-method is moved to the Right enum class.
The right service could instead provide a method that lists
what rights are enabled at a particular level in the document
hierarchy, i.e., the getEnabledRights method, which I guess is
relevant for the rights manager.
So, what do you think?
Best regards,
Andreas Jonsson
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query:
$services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
Thanks
-Vincent
Hi,
On Mon, Jun 21, 2010 at 10:04, Adriana Escamilla Alvarado <
adriana.escamilla.alvarado(a)gmail.com> wrote:
> Hello guys, I want to tell u first that all of XWiki is awesome °¬° (and
> the developers too =D )
>
> But, I need to know when you (you mean XWiki org) are going to liberate
> the XEnterprise 2.4M2, I need... really I need the Templates Pages =(
> this is the URL if u doest'n know what I mean
> http://code.xwiki.org/xwiki/bin/view/Applications/AdministrationApplication
> in the sub-section "Easy Templates Creation and Administration (Starting
> with XWiki Enterprise 2.4M2)" ...
>
> Maybe I'm wrong and this is a User-Application maybe not, but I want to
> know if this "templates" are going to be in the Milestone 2, if not,
> then tell me if that "Templates" are a User-Application (and if u can
> tell me how to make it please =( )
>
Templates are already available for testing. You can get a snapshot of the
release here:
http://maven.xwiki.org/snapshots/com/xpn/xwiki/products/xwiki-enterprise-we…
Guillaume
Also, I have a little problem with the Import of Documents in
> OpenOfficeServer, I tried to set up a OOffice in a Linux Server, but i
> cant to make it a service D=!!! I was looking for a tip of "How to make
> OpenOffice a Service in Linux" and what i found doesnt work =(. My
> server details are:
>
> - SO: OpenSuse 10, Server
> - XWiki: Enterprise 2.3
> - OpenOffice: 3.2
>
> If someone can help me please with this 2 Issues I'll be really happy.
> Thank you for your time!!!!
>
> Adriana Escamilla Alvarado
> Ing. TecnologÃas Computacionales
> Particular: (614) 260-0732
> Móvil: (614) 219-7213
> Contact Me Facebook
> <http://www.facebook.com/#%21/adriana.escamilla.alvarado>Twitter
> <http://twitter.com/Ing_Patito>
>
> --- @ WiseStamp Signature
> <
> http://my.wisestamp.com/link?u=6qp9k36s775m7jfq&site=www.wisestamp.com/emai…
> >.
> Get it now
> <
> http://my.wisestamp.com/link?u=6qp9k36s775m7jfq&site=www.wisestamp.com/emai…
> >
>
> _______________________________________________
> users mailing list
> users(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
Hi,
I believe we need to implement skin inheritence for file system skins.
We do have skin inheritence for skins stored in Wiki pages but we don't
have it for FS skins.
So we cannot have
albatross <-> colibri <-> myskin <-> wiki page skin
To implement this we could just use a file called "parent" which would
contain the name of the parent skin.
WDYT ?
Ludovic
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
might be interesting to us.
Thanks
-Vincent
Begin forwarded message:
> From: "Uwe Schindler" <uschindler(a)apache.org>
> Date: June 18, 2010 3:50:48 PM GMT+02:00
> To: <announce(a)apache.org>
> Subject: [ANNOUNCE] Release of Lucene Java 3.0.2 and 2.9.3
>
> Hello Lucene users,
>
> On behalf of the Lucene development community I would like to announce the
> release of Lucene Java versions 3.0.2 and 2.9.3:
>
> Both releases fix bugs in the previous versions:
>
> - 2.9.3 is a bugfix release for the Lucene Java 2.x series, based on Java
> 1.4.
> - 3.0.2 has the same bug fix level but is for the Lucene Java 3.x series,
> based on Java 5.
>
> New users of Lucene are advised to use version 3.0.2 for new developments,
> because it has a clean, type-safe API.
>
> Important improvements in these releases include:
> - Fixed memory leaks in IndexWriter when large documents are indexed. It
> also uses now shared memory pools for term vectors and stored fields.
> IndexWriter now releases Fieldables and Readers on close.
> - NativeFSLockFactory fixes and improvements. Release write lock if
> exception occurs in IndexWriter ctors.
> - FieldCacheImpl.getStringIndex() no longer throws an exception when term
> count exceeds doc count.
> - Improve concurrency of IndexReader, especially in the context of near
> real-time readers.
> - Near real-time readers, opened while addIndexes* is running, no longer
> miss some segments.
> - Performance improvements in ParallelMultiSearcher (3.0.2 only).
> - IndexSearcher no longer throws NegativeArraySizeException if you pass
> Integer.MAX_VALUE as nDocs to search methods.
>
> Both releases are fully compatible with the corresponding previous versions.
> We strongly recommend upgrading to 2.9.3 if you are using 2.9.x; and to
> 3.0.2 if you are using 3.0.x.
>
> See core changes at
> http://lucene.apache.org/java/3_0_2/changes/Changes.html
> http://lucene.apache.org/java/2_9_3/changes/Changes.html
>
> and contrib changes at
> http://lucene.apache.org/java/3_0_2/changes/Contrib-Changes.html
> http://lucene.apache.org/java/2_9_3/changes/Contrib-Changes.html
>
> Binary and source distributions are available at
> http://www.apache.org/dyn/closer.cgi/lucene/java/
>
> Lucene artifacts are also available in the Maven2 repository at
> http://repo1.maven.org/maven2/org/apache/lucene/
>
> -----
> Uwe Schindler
> uschindler(a)apache.org
> Apache Lucene PMC Member / Committer
> Bremen, Germany
> http://lucene.apache.org/
>
>
>
Hi,
I would like to add support for secret token verification to prevent
CSRF attacks (see http://jira.xwiki.org/jira/browse/XWIKI-4873).
The main idea is to add a random token as a parameter to each request
that requires edit/comment/admin rights and check that this token is
present on the server side. Since there are many ways one can modify
documents, it would require many changes all over the place, in particular:
* add a public method to XWikiContext:
String getSecretToken()
that generates a random token and caches it in the session
* add a public method to XWikiRightService*:
boolean isRequestLegitimate(String action, XWikiContext context)
to check if the given action is allowed to be executed
* add the following API methods to Context:
String getSecretToken()
boolean checkSecretToken()
for including the secret token into forms/AJAX requests and checking
that the current request is legitimate
* add a new configuration parameter core.useSecretTokenValidation for
disabling this functionality, and the corresponding method
useSecretTokenValidation() to CoreConfiguration and
DefaultCoreConfiguration
* use the secret token (hidden input for forms or parameter of GET
requests) in all templates (*.vm files in web/standard and skins,
velocity macros in applications/**/resources/*.xml)
* check the secret token in Save/Delete/Upload/etc.-Actions and throw
an exception to deny the access if the check fails
* check the secret token in all templates that directly modify data
(e.g. web/standard/src/main/webapp/templates/admin.vm)
* fix all selenium tests that directly modify pages using the
open(...) method
* make sure nothing else is broken
WDYT?
Thanks,
Alex
Hi devs,
I propose to add a new application called "core-functionality" that
would contain a collection of XWiki.* pages used by the core and some
components.
The use cases I can think of are:
- Some functionality of the old core that used a template from
web/standard/src/main/webapp/templates is replaced by a new component
- A new component that is supposed to be used everywhere needs to
display 1-2 custom pages (a confirmation message, warning etc.)
- There are several templates in web/standard/src/main/webapp/templates
that are currently used in a somewhat strange way, they are injected
into other pages using xpage=template parameter. This parameter
completely replaces the original page content by the content of the
template (e.g. copy, create or rename page work in this way).
These templates should also be slowly migrated to corresponding XWiki.*
pages.
I have created this application in sandbox:
https://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/core-functionality
It currently contains one page used by the CSRF token component I'm
currently working on
(https://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-csrftoken).
WDYT?
Alex
Hi,
I think it would be best to create a new app in platform/applications called dashboard that would contain dashboard pages currently found in enterprise/wiki.
I'm thinking of the following pages which are making up 2 dashboards (the main one and the alldocs one):
- recent changes
- dashboard
- spaces
- alldocs
Note that a good side effect of this is that this dashboard app will automatically appear as an item in the list of features of XE on:
http://enterprise.xwiki.org/xwiki/bin/view/Main/Features
This makes is nice for users to see what's in XE.
WDYT?
Thanks
-Vincent