Examples of Admin


Examples of org.ejbca.core.model.log.Admin

    }
        final IPatternLogger logger = TransactionLogger.getPatternLogger();
    List<Certificate> retval = new ArrayList<Certificate>(0);
    try{
      final EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
      final Admin admin = ejbhelper.getAdmin();
            logAdminName(admin,logger);
      if (userAdminSession.findUser(admin,username) != null) {  // checks authorization on CA and profiles and view_end_entity
        Collection<java.security.cert.Certificate> certs;
        if (onlyValid) {
          certs = certificateStoreSession.findCertificatesByUsernameAndStatus(admin, username, SecConst.CERT_ACTIVE);
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

    if (log.isTraceEnabled()) {
      log.trace(">getLastCertChain: "+username);
    }
    final List<Certificate> retval = new ArrayList<Certificate>();
    EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
    Admin admin = ejbhelper.getAdmin();
        final IPatternLogger logger = TransactionLogger.getPatternLogger();
        logAdminName(admin,logger);
    try {
      if (userAdminSession.findUser(admin, username) != null) { // checks authorization on CA and profiles and view_end_entity
        Collection<java.security.cert.Certificate> certs = certificateStoreSession.findCertificatesByUsername(admin,username);
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

  public List<Certificate> cvcRequest(String username, String password, String cvcreq)
      throws CADoesntExistsException, AuthorizationDeniedException, UserDoesntFullfillEndEntityProfile, NotFoundException,
      EjbcaException, ApprovalException, WaitingForApprovalException, SignRequestException, CertificateExpiredException {
    log.trace(">cvcRequest");
    EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
    Admin admin = ejbhelper.getAdmin();

    // If password is empty we can generate a big random one to use instead
    if (StringUtils.isEmpty(password)) {
      AllPrintableCharPasswordGenerator gen = new AllPrintableCharPasswordGenerator();
      password = gen.getNewPassword(15, 20);
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

    if (log.isTraceEnabled()) {
      log.trace(">caRenewCertRequest");     
    }
    log.debug("Create certificate request for CA "+caname+", regeneratekeys="+regenerateKeys+", usenextkey="+usenextkey+", activatekey="+activatekey+", keystorepwd: "+(keystorepwd==null?"null":"hidden"));
    EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
    Admin admin = ejbhelper.getAdmin();
    byte[] ret = null;
    try {
      ret = ejbhelper.caRenewCertRequest(ejbhelper, admin, caname, cachain, regenerateKeys, usenextkey, activatekey, keystorepwd);
    } catch (CertPathValidatorException e) {
        throw EjbcaWSHelper.getEjbcaException(e, null, ErrorCode.CERT_PATH_INVALID, Level.DEBUG);
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

   */
  public void caCertResponse(String caname, byte[] cert, List<byte[]> cachain, String keystorepwd) throws CADoesntExistsException, AuthorizationDeniedException, EjbcaException, ApprovalException, WaitingForApprovalException {
    log.trace(">caCertResponse");
    log.info("Import certificate response for CA "+caname+", keystorepwd: "+(keystorepwd==null?"null":"hidden"));
    EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
    Admin admin = ejbhelper.getAdmin();
    try {
      ejbhelper.caCertResponse(ejbhelper, admin, caname, cert, cachain, keystorepwd);     
    } catch (CertPathValidatorException e) {
        throw EjbcaWSHelper.getEjbcaException(e, null, ErrorCode.CERT_PATH_INVALID, Level.DEBUG);
    } catch (CATokenOfflineException e) {
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

  private byte[] processCertReq(final String username, final String password, final String req, final int reqType,
      final String hardTokenSN, final String responseType, final IPatternLogger logger) throws EjbcaException, AuthorizationDeniedException {
    byte[] retval = null;
    try {
      final EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
      final Admin admin = ejbhelper.getAdmin();       
            logAdminName(admin,logger);
      // check authorization to CAID
      final UserDataVO userdata = userAdminSession.findUser(admin, username);
      if (userdata == null) {
        throw new NotFoundException(intres.getLocalizedMessage("ra.errorentitynotexist", username));
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

    throws CADoesntExistsException, AuthorizationDeniedException, NotFoundException, EjbcaException {
   
        final IPatternLogger logger = TransactionLogger.getPatternLogger();
        try{
        EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
        Admin admin = ejbhelper.getAdmin();
              logAdminName(admin,logger);

        // check CAID
        UserDataVO userdata = userAdminSession.findUser(admin,username);
        if(userdata == null){
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

          log.debug("Revoke cert with serial number '"+certificateSN+"' from issuer '"+issuerDN+"' with reason '"+reason+"'.");
    }
        final IPatternLogger logger = TransactionLogger.getPatternLogger();
        try {
      final EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
      final Admin admin = ejbhelper.getAdmin();
            logAdminName(admin,logger);
      final int caid = CertTools.stringToBCDNString(issuerDN).hashCode();
      caAdminSession.verifyExistenceOfCA(caid);
      final BigInteger serno = new BigInteger(certificateSN, 16);
      // Revoke or unrevoke, will throw appropriate exceptions if parameters are wrong, such as trying to unrevoke a certificate
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

      throws CADoesntExistsException, AuthorizationDeniedException, NotFoundException, AlreadyRevokedException, EjbcaException, ApprovalException, WaitingForApprovalException {

        final IPatternLogger logger = TransactionLogger.getPatternLogger();
        try{
      EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
      Admin admin = ejbhelper.getAdmin();
            logAdminName(admin,logger);

      // check username
      UserDataVO userdata = userAdminSession.findUser(admin,username);
      if(userdata == null){
View Full Code Here

Examples of org.ejbca.core.model.log.Admin

  public void keyRecoverNewest(String username) throws CADoesntExistsException, AuthorizationDeniedException, NotFoundException, EjbcaException, ApprovalException, WaitingForApprovalException {
    log.trace(">keyRecoverNewest");
        final IPatternLogger logger = TransactionLogger.getPatternLogger();
        try{
      EjbcaWSHelper ejbhelper = new EjbcaWSHelper(wsContext, authorizationSession, caAdminSession, certificateProfileSession, certificateStoreSession, endEntityProfileSession, hardTokenSession, userAdminSession);
      Admin admin = ejbhelper.getAdmin();
            logAdminName(admin,logger);

            boolean usekeyrecovery = globalConfigurationSession.getCachedGlobalConfiguration(admin).getEnableKeyRecovery()
            if(!usekeyrecovery){
        throw EjbcaWSHelper.getEjbcaException("Keyrecovery have to be enabled in the system configuration in order to use this command.",
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.