Hi folks,
I would like to have some feedback and new ideas about the best approach to improve mobile authentication/authorization from client to server side using REST resources.
Last week I was digging into DS source code to see how we could provide authentication to endpoints, DS seems to be a promising project but currently in development phase. So, some of the interesting parts like JaasAuthenticator and Idm integration are still under discussion or development, like credentials https://github.com/abstractj/incubator-deltaspike/blob/master/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/IdentityImpl.java#L246. Of course that's open source and we can contribute, I'm just worried about timeframe.
DS have some ideas to use apache shiro (https://issues.apache.org/jira/browse/DELTASPIKE-62), but if it become true a lot of work to do will come with CDI I guess (http://shiro.apache.org/integration.html). Looking into the sources, they don't have Shiro implemented yet.
SecurityInterceptor (https://github.com/abstractj/incubator-deltaspike/blob/master/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/SecurityInterceptor.java#L34) could be useful to abstract security layer, but we still be tied to DS using annotations.
I started to write 3 functional requirements to our project with Jay's review (with our basic needs - https://issues.jboss.org/browse/AEROGEAR-7) and last friday I wrote some thoughts https://github.com/abstractj/aerogear-security/tree/jaas do decouple authentication from MVC (it's just an idea and not a final solution)
I would like to hear suggestions/feedback about it, if somebody know a better way to move forward put your ideas on the table please.
ps:
- If you don't have access to this repository, just ask for permission with your github credentials.
- The example was focused only in the MVC/security interactions, cryptography must be implemeted/discussed.
- We're open to ideas :)
--
"Know the rules well, so you can break them effectively" - Dalai Lama XIV @SecurityBinding
public @interface ProjectAdmin
{
// empty
}
@SecurityParameterBinding
public @interface ProjectBinding
{
// empty
}
@PUT("/project/name...")
@ProjectAdmin
public void updateName(@ProjectBinding Project p, String name)
{
// save project name
}
@Secures
@ProjectAdmin
public boolean isProjectAdmin(@ProjectBinding Project p, Identity identity)
{
if(identity.hasRole("project" + p.getId() + "_admin")
{
...
}
}--
Stéphane Épardaud
I'm still very strongly in favour of doing this in Deltaspike. Is there a reason we are doing it outside? Timing?
(a) these are the use cases you want to address
(b) that your evil boss has given you deadlines for this
(c) that you are aware that DS plans these a bit later on
(d) that you really do want to use DS
(e) that if you provide the manpower to impl, can we accelerate those use cases
I have a very large email coming. still needs revision before I send it out. hopefully tomorrow.
---
Lincoln Baxter's Droid
http://ocpsoft.org
"Simpler is better."