Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Progammatic Authentication and Declarative Authorization

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can we develop an application where we can use programmatic authentication that means we develop login page and ejb to implement authentication. And declarative authorization that means use deployment descriptor for role information and authorization.

Please suggest.

- Praveen
 
Ranch Hand
Posts: 218
VI Editor Ruby Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer is yes you can. More important question is would you want to?
 
Srivastava Praveen
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want my login page as requirement may be to use some more information to authenticate the user apart from userid and password. For example, if user fails to login twice, system may ask to provide some information for login. In form based declarative authentication, I can have only userid and password.

I want declarative authentication because currently application is in initial stage and will grow in future to add more roles. So if we have declarative authorization, then code change will not be required.

Please suggest.

- Praveen
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my experience, declarative security only works for the most simple uses cases. In all non-trivial applications I've found it much too limiting. It's not realistically possible (or desirable) to differentiate rights and privileges by URL. In many cases, having more (or different) rights means being able to view more (or different) data, not being able to access additional URLs (although that, too, can happen).
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could try with JAAS. I did some reading on this. JAAS provide good support on both programmatic custom and container mananged. I did not go very deep into it. Please let me know if any wrong.
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Yes what you are saying really makes sense.
You can authenticate for example using biometrics, and fetch the roles from a repository for example, LDAP and you will have the roles with you.
You can authorize as normal then.
 
reply
    Bookmark Topic Watch Topic
  • New Topic