* @param action the action being attempted by the subject on the resource
* @return true if the subject is allowed to perform the action, false otherwise
* @throws URISyntaxException
*/
public static boolean isAuthorized(final ServiceLocator habitat, final Subject subject, final String resource, final String action) throws URISyntaxException {
final AuthorizationService authorizationSvc =
AccessController.doPrivileged(
new PrivilegedLookup<AuthorizationService>(habitat, AuthorizationService.class));
return authorizationSvc.isAuthorized(subject, new URI("admin", resource, null), action);
}