Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to programmatically authorize a User based upon User Group

 
Tarun Chatterjee
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have a user group which has been passed to be from a java program.
How can i check the access control of that user group to access a resource programmatically.?

Kindly help, as this is Urgent?

Regards
Tarun
 
Ken Rubin
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm not a security expert and I'm not sure what kind of resources
you refer to, but here is a start.

If you are interested in EJBs get the EJB Spec at
http://java.sun.com/products/ejb/docs.html
Find the Security Management chapter and look at Bean Provider's Responsibilities. The spec is readable. See explanation of
isCallerInRole and getCallerPrincipal functions.

The same functions seem to be used in Servlets.
For Servlet Spec
http://jcp.org/en/jsr/detail?id=154
For JSP Spec
http://jcp.org/en/jsr/detail?id=152
http://java.sun.com/security/ has links to the JAAS Java Authentication
and Authorization Service API.

http://edocs.bea.com/wls/docs81/secintro/concepts.html - Security Concepts in Weblogic including JAAS.

Good Luck!!!
 
Ken Rubin
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also please consider the warnings in the Specs about coding Security
Policies.
 
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!