Examples of SecurityException


Examples of cartago.security.SecurityException

      roleName = securityManager.getDefaultRoleName();
    }
    synchronized (agentBodyMap){
      AgentBody context = agentBodyMap.get(cred.getGlobalId());
      if (context != null){
        throw new SecurityException("Duplicate identity.");
      }
      ctxIds++;
      AgentId userId = new AgentId(cred.getId(), cred.getGlobalId(), ctxIds, roleName,id);       
      boolean joinOK = true;
      String failureMsg = "no msg";
View Full Code Here

Examples of com.caucho.security.SecurityException

        adminCookie = "";

      return SelfEncryptedCookie.decrypt(adminCookie, encData);
    }
    else if (_isRequireEncryptedPassword) {
      throw new SecurityException("passwords must be encrypted");
    }
    else
      return credentials;
  }
View Full Code Here

Examples of com.dbxml.db.core.security.SecurityException

         IndexManager.magicUser = magicUser;
         if ( userStack != null )
            autoIndexer = new AutoIndexer();
      }
      else
         throw new SecurityException(FaultCodes.SEC_INVALID_ACCESS, "Can't overwrite Magic User");
   }
View Full Code Here

Examples of com.dotcms.rest.exception.SecurityException

    if(UtilMethods.isSet(requiredPortlet)) {

      try {
        if(!APILocator.getLayoutAPI().doesUserHaveAccessToPortlet(requiredPortlet, user)){
          throw new SecurityException("User does not have access to required Portlet", Response.Status.UNAUTHORIZED);
        }
      } catch (DotDataException e) {
        throw new SecurityException("User does not have access to required Portlet", Response.Status.UNAUTHORIZED);
      }

    }

    initData.setParamsMap(paramsMap);
View Full Code Here

Examples of com.foundationdb.server.error.SecurityException

            conn = openConnection();
            stmt = conn.prepareStatement(ADD_ROLE_SQL);
            stmt.setString(1, name);
            int nrows = stmt.executeUpdate();
            if (nrows != 1) {
                throw new SecurityException("Failed to add role " + name);
            }
            conn.commit();
        }
        catch (SQLException ex) {
            throw new SecurityException("Error adding role", ex);
        }
        finally {
            cleanup(conn, stmt);

        }
View Full Code Here

Examples of de.suse.swamp.core.util.SecurityException

    public void doRunjob(RunData data, Context context) throws Exception {
       
        SWAMPUser user = ((SWAMPTurbineUser) data.getUser()).getSWAMPUser();
       
        if (!de.suse.swamp.core.container.SecurityManager.isGroupMember(user, "swampadmins"))
            throw new SecurityException("No permission (needs group swampadmins)");
           
        int job = data.getParameters().getInt("job");
        JobEntry jobEntry = TurbineScheduler.getJob(job);
        SWAMPScheduledJob schedJob = (SWAMPScheduledJob) ScheduledJobLoader.getInstance().getInstance(jobEntry.getTask());
        schedJob.run(jobEntry);       
View Full Code Here

Examples of de.suse.swamp.core.util.SecurityException

   
 
  public LRUMap doGetWorkflowCache(String username) throws SecurityException,
    UnknownElementException, StorageException {
    if (!SecurityManager.isGroupMember(SecurityManager.getUser(username), "swampadmins")){
      throw new SecurityException("No permission to read Workflowcache!");
    }
    return WorkflowManager.getInstance().getWorkflowCache();
  }
View Full Code Here

Examples of de.suse.swamp.core.util.SecurityException

            UnknownElementException {
        Workflow wf = WorkflowManager.getInstance().getWorkflow(wfid);
        if (wf == null) {
            throw new UnknownElementException("Workflow #" + wfid + " not found");
        } else if (!wf.hasRole(username, WorkflowRole.USER)) {
            throw new SecurityException("No permission to read Workflow #"
                + wfid + " for " + username + ". (Not in role USER)");
        }
        return wf;
    }
View Full Code Here

Examples of de.suse.swamp.core.util.SecurityException

   
    public Workflow getWorkflowForWriting(int wfid, String username) throws SecurityException, UnknownElementException {
        Workflow wf = this.getWorkflow(wfid, username);
        if (!wf.hasRole(username, WorkflowRole.ADMIN) &&
             !wf.hasRole(username, WorkflowRole.OWNER)){
            throw new SecurityException("No permission to write to Workflow #" + wfid + " for " + username);
        }
        return wf;
    }
View Full Code Here

Examples of de.suse.swamp.core.util.SecurityException

        throws SecurityException, UnknownElementException {
        WorkflowTemplate wftemp = WorkflowManager.getInstance().getWorkflowTemplate(template);
        if (wftemp == null){
            throw new UnknownElementException("Template: " + template + " not found");
        } else if (!wftemp.hasRole(username, WorkflowRole.USER) && !wftemp.hasRole(username, WorkflowRole.STARTER)){
            throw new SecurityException("No permission to read template: " + template + " for " + username);
        }
        return wftemp;
    }
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.