Examples of checkAccessRights()


Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

  public ActionForward onExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
          throws Exception {
    // Setup the Replacement proxy
    LaunchSession launchSession = LaunchSessionFactory.getInstance()
            .getLaunchSession(request.getParameter(LaunchSession.LAUNCH_ID));
    launchSession.checkAccessRights(null, getSessionInfo(request));
    ReplacementProxyWebForward f = (ReplacementProxyWebForward) launchSession.getResource();

    VariableReplacement r = new VariableReplacement();
    r.setServletRequest(request);
    r.setLaunchSession(launchSession);
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

        if (Util.isNullOrTrimmedBlank(launchId)) {
            throw new Exception("No launch ID supplied.");
        }
       
        LaunchSession launchSession = LaunchSessionFactory.getInstance().getLaunchSession(launchId);
        launchSession.checkAccessRights(null, getSessionInfo(request));
        WebForward wf = (WebForward)launchSession.getResource();

        CoreEvent evt = new ResourceAccessEvent(this, WebForwardEventConstants.WEB_FORWARD_STARTED, wf, launchSession.getPolicy(), launchSession.getSession(),
                        CoreEvent.STATE_SUCCESSFUL).addAttribute(WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_URL,
            wf.getDestinationURL()).addAttribute(WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_TYPE,
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

          return true;
        } else {
          LaunchSession launchSession = LaunchSessionFactory.getInstance().createLaunchSession(agent.getSession(),
            resource,
            policy);
          launchSession.checkAccessRights(null, agent.getSession());
                    String uri = resource.getLaunchUri(launchSession);
                    ByteArrayWriter baw = new ByteArrayWriter();
                    baw.writeString(uri);
                    request.setRequestData(baw.toByteArray());
                  return true;
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

          try {
            String uniqueId = host.substring(0, idx);
            launchSession = LaunchSessionFactory.getInstance().getLaunchSession(session, uniqueId);
            if (launchSession != null) {
              wf = (ReverseProxyWebForward) launchSession.getResource();
              launchSession.checkAccessRights(null, session);
              if (!((ReverseProxyWebForward) wf).getActiveDNS()) {
                throw new Exception("Appears to be an active DNS request but the associated web forward is not active DNS. Is someone trying something funny???");
              }
                          LogonControllerFactory.getInstance().addCookies(request, response, session.getLogonTicket(), session);
              return handleReverseProxy(pathInContext, pathParams, request, response, launchSession);
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

    String hostField = request.getHeader("Host");
    HostService hostService = hostField == null ? null : new HostService(hostField);
    SessionInfo session = getSessionInfo(request);

    try {
      launchSession.checkAccessRights(null, session);

      /*
       * This requires more thought.
       *
       * 1. We can only have on launch session per resource
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

          if(isAgentRequired(resource) && !DefaultAgentManager.getInstance().hasActiveAgent(request)) {
            return new ActionForward("/launchAgent.do?returnTo=" +  Util.urlEncode(CoreUtil.getRealRequestURI(request) + "?resourceId=" + id + "&policy=" + policy.getResourceId() + "&returnTo=" + Util.urlEncode(returnTo)), true);
          }
          else {
                LaunchSession launchSession = LaunchSessionFactory.getInstance().createLaunchSession(session, resource, policy);
                launchSession.checkAccessRights(null, session);
                try {
                  return launch(mapping, launchSession, request, returnTo);
                }
                catch(CoreException ce) {
                  ActionMessages errs = new ActionMessages();
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

          return true;
        } else {
          LaunchSession launchSession = LaunchSessionFactory.getInstance().createLaunchSession(agent.getSession(),
            resource,
            policy);
          launchSession.checkAccessRights(null, agent.getSession());
                    String uri = resource.getLaunchUri(launchSession);
                    ByteArrayWriter baw = new ByteArrayWriter();
                    baw.writeString(uri);
                    request.setRequestData(baw.toByteArray());
                  return true;
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

            SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
            launchSession = session == null ? null : LaunchSessionFactory.getInstance().getLaunchSession(session, upload.getExtraAttribute2());
            if(launchSession == null) {
                throw new Exception("No launch session.");
            }
            launchSession.checkAccessRights(null, session);

            res = DAVServlet.getDAVResource(launchSession, request, response, upload.getResourcePath() + "/" + uploadFile.getFileName());
           
            res.getFile().exists();
            InputStream in = uploadFile.getInputStream();
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

          return true;
        } else {
          LaunchSession launchSession = LaunchSessionFactory.getInstance().createLaunchSession(agent.getSession(),
            resource,
            policy);
          launchSession.checkAccessRights(null, agent.getSession());
                  if (resource.getType() == TransportType.LOCAL_TUNNEL_ID) {
                      try {
                          Request req = buildLocalTunnel(resource, launchSession);
                          request.setRequestData(req.getRequestData());
                        return true;
View Full Code Here

Examples of com.adito.policyframework.LaunchSession.checkAccessRights()

      LaunchSession launchSession = LaunchSessionFactory.getInstance().getLaunchSession(launchId);
      if (launchSession == null) {
        throw new ChannelOpenException(ChannelOpenException.CHANNEL_REFUSED, "No launch session with ID " + launchId + ", cannot read file " + filename + " for " + name);
      }

      launchSession.checkAccessRights(null, agent.getSession());

      ExtensionDescriptor descriptor = ExtensionStore.getInstance().getExtensionDescriptor(name);
      if (!descriptor.containsFile(filename))
        throw new ChannelOpenException(ChannelOpenException.CHANNEL_REFUSED, "Application does not contain file " + filename + " in extension " + name);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.