|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.secure.SecureRegistry
public class SecureRegistry
Registry implementation to perform authentication and authorization. Each user should use a separate instance of the SecureRegistry initialized with the user name and a back-end Registry. All SecureRegistry instances should be initialized using the same back-end registry implementation. SecureRegistry verifies whether the user has necessary permissions to perform the requested action and delegates the request to the back-end registry if the authorization succeeds. It also sets user name as a thread local variable before delegating the request, so that the back-end registry can use that user name to associate user information with performed operation (e.g. who commented on the resource /projects/abcbank/orders.doc).
Resource path is used as the unique ID of the resource to associate permissions. So when an operation is request on a certain path, we can first check the permissions for that path, without even touching the actual resource. This has a side effect that if a user has requested an operation on a non-existing resource, he gets an unauthorized operation message rather than a resource does not exist message. This is good as we don't want unauthorized users to check if a resource exist in a particular path.
Constructor Summary | |
---|---|
SecureRegistry()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecureRegistry()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |