Format for REST API
by Nick Scavelli
Sorry, thought I sent this email yesterday...
I created a poll here https://community.jboss.org/polls/1100 for some
fun and to discuss about which format to support for the REST API of
GateIn. I would recommend people vote and comment, especially if you
vote for both :). We can obviously discuss here in more detail. I plan
to follow up with some more details on some of my findings thus far
after I work out a couple more prototypes.
- Nick
12 years, 8 months
Re: [gatein-dev] Need supports to analyze PicketLink IDM exception in eXo Intranet
by Trong Tran
have you ever tried to reproduce the problem locally in your computer ?
On 19 April 2012 13:58, Viet Tien Nguyen <vietnt(a)exoplatform.com> wrote:
> Hello GateIn guys,
>
> We are analyzing the unstability in eXo Intranet relate to the login
> problem https://jira.exoplatform.org/browse/PLFENG-365 (sometime many
> users report that they can not login to eXo Intranet although they input
> right username/password).
> We checked log files and see there are many exceptions like:
>
>
> ====================================================================================================================================
> Apr 2, 2012 10:12:26 AM
> org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberCache get
> INFO: size=1024/1024, #accesses=1023, #hits=1023, #misses=0,
> cacheRatio=100%
> Apr 2, 2012 10:12:52 AM org.gatein.common.logging.Logger log
> INFO: Cannot authenticate user: patrice_lamarque;
> org.picketlink.idm.common.exception.IdentityException:
> IdentityObjectType[USER] not present in the store.
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2812)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObject(HibernateIdentityStoreImpl.java:2827)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.safeGet(HibernateIdentityStoreImpl.java:2752)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.validateCredential(HibernateIdentityStoreImpl.java:2564)
> at
> org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.validateCredential(WrapperIdentityStoreRepository.java:367)
> at
> org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.validatePassword(AttributesManagerImpl.java:542)
> at
> org.exoplatform.services.organization.idm.UserDAOImpl.authenticate(UserDAOImpl.java:407)
> at
> org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl.validateUser(OrganizationAuthenticatorImpl.java:150)
> at
> org.exoplatform.services.security.jaas.SharedStateLoginModule.login(SharedStateLoginModule.java:70)
> at sun.reflect.GeneratedMethodAccessor725.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
> at
> javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
> at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
> at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
> at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:409)
> at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:334)
> at
> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:260)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:454)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
> at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
> at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: org.hibernate.HibernateException: createCriteria is not valid
> without active transaction
> at
> org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:338)
> at $Proxy89.createCriteria(Unknown Source)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2786)
> ... 33 more
> Apr 2, 2012 10:12:52 AM org.gatein.common.logging.Logger log
> INFO: Cannot authenticate user: patrice_lamarque;
> org.picketlink.idm.common.exception.IdentityException:
> IdentityObjectType[USER] not present in the store.
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2812)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObject(HibernateIdentityStoreImpl.java:2827)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.safeGet(HibernateIdentityStoreImpl.java:2752)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.validateCredential(HibernateIdentityStoreImpl.java:2564)
> at
> org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.validateCredential(WrapperIdentityStoreRepository.java:367)
> at
> org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.validatePassword(AttributesManagerImpl.java:542)
> at
> org.exoplatform.services.organization.idm.UserDAOImpl.authenticate(UserDAOImpl.java:407)
> at
> org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl.validateUser(OrganizationAuthenticatorImpl.java:150)
> at
> org.exoplatform.services.security.jaas.DefaultLoginModule.login(DefaultLoginModule.java:119)
> at sun.reflect.GeneratedMethodAccessor726.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
> at
> javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
> at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
> at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
> at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:409)
> at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:334)
> at
> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:260)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:454)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
> at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
> at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: org.hibernate.HibernateException: createCriteria is not valid
> without active transaction
> at
> org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:338)
> at $Proxy89.createCriteria(Unknown Source)
> at
> org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2786)
> ... 33 more
> Apr 2, 2012 10:12:52 AM org.exoplatform.web.login.ErrorLoginServlet
> unregisterTokenCookie
> WARNING: Cannot delete the token 'rememberme-1385916741'
> java.lang.NullPointerException
> Apr 2, 2012 10:13:06 AM
> org.exoplatform.platform.gadget.services.LoginHistory.LoginHistoryListener
> onEvent
> INFO: User patrice_lamarque logged in.
>
> =====================================================================================================================================
>
> I know "org.hibernate.HibernateException: createCriteria is not valid
> without active transaction" often happen when we call OrganizationService
> without start RequestLifeCycle before.
> I checked OrganizationAuthenticatorImpl.validateUser() and see
> RequestLifeCycle has been started and ended correctly but exceptions still
> happen. We are stuck on these exceptions. Each time there are reports on
> login problem, we often found these exceptions in log file. I attached a
> eXo Intranet log on Apr 2, 2012.
> Are there any other possibilities result to these exceptions ?
>
>
> Thank you very much for your supports !
>
> --
> Viet Nguyen
> eXo Platform SEA
>
--
Tran The Trong
eXo Platform SEA
12 years, 8 months
REST API Specification
by Nick Scavelli
The initial draft of the REST API specification is available now
https://community.jboss.org/wiki/GateInRESTAPISpecification. I tried to
design it as RESTful as possible for now, and we can decide if some
complexity that comes with REST is appropriate for the GateIn REST API.
For example Twitter's REST API is fairly easy to understand, however
some would not call it quite so "RESTful".
Also this specification conflicts with the stuff I've built for GateIn
Management, especially the organization of the resources (pages,
navigation, etc). However we should be in sync with how the Public Java
API is going to expose these resources. For example if I can do
api.getPages() as apposed to api.getSite().getPages() then Pages should
be a "first class resource".
All feedback is welcome.
- Nick
12 years, 8 months
GateIn's Information Architecture Blueprint
by Gabriel Cardoso
Hi team,
While exploring the entire Portal last week I built it's Information Architecture Blueprint [1].
By looking at it is possible to realize the size of the Portal and also some Pages/Navigation trees that are repeated in different places.
Here are the Legend:
- Female icon: Mary, the user
- Green Male icon: John, the manager
- Blue Male icon: Root, the administrator
- (P): Page
- (M): Modal page (also know as pop-up)
- (A): Action
- (T): Tab or similar (e.g. left menu)
- (G): Group of elements
- (W): Wizard step
Right now I'm more focused on the Admin Part. So attached is a second IA Blueprint [2] containing only the Admin's exclusive actions. I realized that his only exclusive section is under Group > Administration. Most of the other managing pages can also be edited by the Manager.
Thomas and Bolek, when you talk about a better organization for the Admin are you talking about only the Administration part or also the Manager's pages?
This is a first version of this IA. Please let me know if something is wrong or misrepresented.
Thank you,
Gabriel
12 years, 8 months
Re: [gatein-dev] [GateIn Portal Development] - Gatein Mobile Detection And Redirection: Administration UI
by Matt Wringe
cc'ing back in the gatein-dev list, you should usually use
'reply-all' (or reply-to-list) so that the list gets added. It's usually
best to discuss things on the list so that the whole group can comment.
On Thu, 2012-04-12 at 15:41 -0300, Gabriel Cardoso wrote:
> Hi Matt.
> Would that work? Just adding the words OR and AND before the specs?
> Thanks
No, not exactly (but its my fault its confusing and I should have
specified two separate lists from the original mockups). Can you change
the mock up to add two separate lists for contains and must not contain?
Really what is comes down to is:
Contains:
foo
or bar
or ...
Must Not Contain:
abc
or xyz
or ...
So if we have a match for anything in the contains list, and we don't
have a match for anything in the 'does-not-contains' list, then the
condition for user agent strings is true. Its the same thing as a white
list and a black list.
For example, using the above configuration
User-Agent: fasdfl asdf asdf asdf foo asdf asdf a dsf
-> is true because it contains foo _and_ does not contain abc and xyz
User-Agent: fasdfl asdf asdf asdf foo abc asdf asdf a dsf
-> is false, even though it contains foo, because it contains abc it
fails
User-Agent: fasdfl asdf asdf asdf asdf asdf a dsf
-> is false, there is no match on a contains
User-Agent: fasdfl asdf abc asdf asdf asdf asdf a dsf
-> is false, it contains abc which is in the does-not-contain list (and
it also doesn't contain anything in the contains list)
If you want to do something like direct for every User-Agent except if
it contains abc, then you would add '*' to contains (regex to match
everything) and add 'abc' to does-not-contain.
The does-not-contain list can be empty.
For the situation when you create a new condition, the contains list and
the doesn-not-contain list should probably both be empty (since the
contains list is empty, the default will be to never redirect until the
admin configures something here).
For device properties, if the list is empty then it means we are not
checking any device properties, and the device property check will
return true. When creating a new condition, this list should be empty.
It would be nice if for an empty list we have an entry in the table
saying something like 'No Device Properties specified. Device Properties
are not being checked'.
If we have one or more device properties specified, then _all_ of these
properties must be met (ie its now using AND).
So it all works something like this (note: this is for higher level
logic, the implementation doesn't exactly follow these steps).
1) we check if the User-Agent string has a match in the list of
'contains'. If true continue, if not don't do the redirect
2) we check if the User-Agent string has a match in the list of 'does
not contain'. If we have a match, then don't do the redirect. Otherwise
continue
3) we check if there is a match for all the device properties. If we
have a match, now we can do the redirect, otherwise don't do the
redirect.
Hopefully this makes it more clear.
>
>
> On Apr 12, 2012, at 3:09 PM, Matt Wringe wrote:
>
> >
> > JBoss Community
> > Gatein Mobile Detection And Redirection: Administration UI
> > new comment by Matt Wringe View all comments on this document
> > After a offline discussion, the following changes were determined:
> >
> >
> > - no more concept of device type
> >
> > - prepopulate a new portal with a couple of default redirects which contain default conditions for some specific devices (phone, tablet, etc..)
> >
> >
> > screen 1:
> >
> > - remove the icon and change 'Device' to something like 'Redirect' which will display the redirect name.
> >
> > - add a 'copy' option to clone a new redirect based on a exiting redirect. Copy and Delete will appear under a separate menu where the current 'delete' icon is currently located
> >
> >
> > screen 2:
> >
> > - removed
> >
> > - when creating a new redirect, screen 3 will be displayed.
> >
> >
> > screen 3:
> >
> > - no icon beside the redirect name.
> >
> > - when creating a new redirect: generic redirect name ('redirect-1' or something similar) but its an editable value, so it change be changed. The redirect site will have to be set to the first site name in the drop down [does this make sense? or should it be empty/null by default?]. Redirect will be enabled by default when creating a new redirect [right? since they obviously want to use the redirect, otherwise why would they create one?] [Note this part as not discussed, just adding my thoughts here]
> >
> > - make the 'redirect to' more prominent (larger font size, etc. Its too small and out of the way right now when its an important option)
> >
> >
> > screen 4:
> >
> > TODO: make clearer in screen 4 the behaviour when multiple conditions are specified.
> >
> > Current behaviour for user-agent string: Condition is true if the user agent contains any of the strings specified in 'contains' and no string specified in 'does not contain'
> >
> > [multiple user-agent conditions act as OR]
> >
> > Current behabiour for device properties: If ALL the device conditions are met
> >
> > [multiple device properties act as AND]
> >
> >
> > The idea behind this is that you would probably want to list multiple different contains for a user agent string (ie for a list of browser types, so OR) but you would probably want to use AND for device properties (ie if width is less than X and device pixel density is above y). But this gets a bit confusing. I would rather not have to support more complex rules if possible.
> >
>
12 years, 8 months
Re: [gatein-dev] Mobile Manual Redirection Selection
by Matt Wringe
cc'ing gatein-dev on this email as other may have some options on this.
On Tue, 2012-04-10 at 18:40 -0300, Gabriel Cardoso wrote:
> Hi Mark!
Its Matt :)
> I took a look in your article. You told that "We should be displaying and advertising that the site has alternative sites for different devices, so it might not make sense to hide this in the footer area".
> I agree that putting the link in the header is an effective advertising, but stepping back, how interesting is for the users who are not using a mobile to know that now the site supports mobile?
Something I do all the time on my tablet is switch between the 'mobile'
site and the desktop version of the site (mostly it's from mobile to
desktop since on most sites, their mobile version is meant for phones,
not tablets, and it a horrible experience). This comes down to user
preference.
The main usecase for this functionality is if I am on a phone and I go
to the site. For some reason my phone doesn't get detected as a mobile
device. Now I am on the desktop version of the site, on a phone, and its
a bad experience.
Since my phone didn't get detected as being a mobile device the first
time, I can't just dynamically display a link on the desktop site if I
think they are a mobile, since doing the detection again isn't going to
change anything.
So displaying the link now is for catching this error condition.
If I have a link at the top of the page (ideally near the top left),
then I can easily see on my phone that there is a site designed for my
device and I can hit the link to go there (discoverability)
If its in the footer, than I would have to scroll all the way through
the page and have to search for the link (and I would have to do this
blindly and assume there is such a link somewhere on the page, which may
or may not be true for most sites).
It also comes down to if I am on the mobile site and I click the link to
visit the main desktop site. I see that the desktop site doesn't work
properly at all on my tablet (maybe its heavily flash based). So now how
do I get back to the mobile site? Clicking the link changes the users
preference, so the next time they visit the site, they are going to be
redirected to the desktop based on this preference.
If anyone can come up with another way of handling these situations,
then maybe we don't need the redirect links in the header.
> I believe that users should notice that a mobile version is available when they access using a mobile. Beyond that, maybe it's useless information guided by business goals.
> If we think in this way, an interesting strategy is to show a link "Access the full site" or "Desktop version" in the footer when the user is in the mobile site. It's not necessary to show other links when he is in the desktop version.
>
> But that's only my point of view. If showing the add to everybody is a business requirement, I think your solution is perfect. If not, maybe we could do in a different way.
>
> What do you think?
>
> Thanks,
> Gabriel
12 years, 8 months
i18n and GUIs
by Matt Wringe
Is there any document for how the newer non resource based i18n support
is suppose to work?
Any good example of where we are using it in the gui? The extended
language mode for the page editor is a bit awkward to use.
Thanks,
Matt Wringe
12 years, 9 months