Package org.ejbca.core.model.log

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


                log.error(errMsg);
                response.sendError(HttpServletResponse.SC_BAD_REQUEST,errMsg);
                return;
            }
           
            Admin administrator = new Admin(Admin.TYPE_PUBLIC_WEB_USER, remoteAddr);
            log.debug("Got request '" + operation + "'");
            log.debug("Message: " + message);
        String iMsg = intres.getLocalizedMessage("scep.receivedmsg", remoteAddr);
      log.info(iMsg);
            if (operation.equals("PKIOperation")) {
View Full Code Here


  /**
   * Recievies the request.
   */
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
    log.trace(">doPost");
    Admin internalAdmin = Admin.getInternalAdmin();
    GlobalConfiguration globalConfiguration = globalConfigurationSession.getCachedGlobalConfiguration(internalAdmin);
    // Make sure we allow use of this Servlet
    if ( !globalConfiguration.getAutoEnrollUse() ) {
      log.info("Unauthorized access attempt from " + request.getRemoteAddr());
      response.getOutputStream().println("Not allowed.");
      return;
    }
    int caid = globalConfiguration.getAutoEnrollCA();
    if (caid == GlobalConfiguration.AUTOENROLL_DEFAULT_CA) {
      log.info("Configure a proper CA to use with enroll.");
      response.getOutputStream().println("Configure a proper CA to use with enroll.");
      return;
    }
    boolean debugRequest = "true".equalsIgnoreCase(request.getParameter("debug"));
    String debugInfo = "";

    Admin admin = new Admin(Admin.TYPE_RA_USER, request.getRemoteAddr());
    RequestHelper.setDefaultCharacterEncoding(request);

    if (debugRequest) {
      debugInfo += "getAttributeNames:\n";
      Enumeration enumeration = request.getAttributeNames();
View Full Code Here

  public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    ServletDebug debug = new ServletDebug(request, response);


     Admin admin = new Admin(Admin.TYPE_RA_USER, request.getRemoteAddr());
     RequestHelper.setDefaultCharacterEncoding(request);

      String dn = null;
      dn = request.getParameter("user");
      byte[] reqBytes = null;
View Full Code Here

    // Public methods
    public void initialize(HttpServletRequest request)
        throws Exception {
        if (!initialized) {
          administrator = new Admin(Admin.TYPE_PUBLIC_WEB_USER, request.getRemoteAddr());
          ejb = new EjbLocalHelper();
            initialized = true;
        }
    }
View Full Code Here

    assertNull("PUBLICKEY request resulted in error code: " + (errorCode==null?"":errorCode.getInternalErrorCode()), errorCode);
    }

    protected void enforcementOfUniquePublicKeys() throws Exception {

        final Admin admin = new Admin(Admin.TYPE_CACOMMANDLINE_USER);
        final UserDataVOWS ca1userData1 = getUserData(CA1_WSTESTUSER1);
        final UserDataVOWS ca1userData2 = getUserData(CA1_WSTESTUSER2);
        final UserDataVOWS ca2userData1 = getUserData(CA2_WSTESTUSER1);
        final String p10_1 = getP10();
        final String p10_2 = getP10();
View Full Code Here

        caAdminSessionRemote.editCA(admin, ca1Info);
    }

    protected void enforcementOfUniqueSubjectDN() throws Exception {
      log.trace(">enforcementOfUniqueSubjectDN");
        final Admin admin = new Admin(Admin.TYPE_CACOMMANDLINE_USER);
        final UserDataVOWS ca1userData1 = getUserData(CA1_WSTESTUSER1);
        final UserDataVOWS ca1userData2 = getUserData(CA1_WSTESTUSER2);
        final UserDataVOWS ca2userData1 = getUserData(CA2_WSTESTUSER1);
        final CAInfo ca1Info = caAdminSessionRemote.getCAInfo(admin, CA1);
        final int iRandom = SecureRandom.getInstance("SHA1PRNG").nextInt(); // to
View Full Code Here

    }

    protected void checkQueueLength() throws Exception {

        final String PUBLISHER_NAME = "myPublisher";
        final Admin admin = new Admin(Admin.TYPE_CACOMMANDLINE_USER);
        try {
            assertEquals(-4, ejbcaraws.getPublisherQueueLength(PUBLISHER_NAME));
            final CustomPublisherContainer publisher = new CustomPublisherContainer();
            publisher.setClassPath(DummyCustomPublisher.class.getName());
            publisher.setDescription("Used in Junit Test, Remove this one");
View Full Code Here

    public void tearDown() throws Exception {
    }

    public void test00SetupDatabase() throws Exception {
        Admin administrator = new Admin(Admin.TYPE_RA_USER);

        // Setup with two new Certificate profiles.
        EndUserCertificateProfile profile1 = new EndUserCertificateProfile();
        profile1.setKeyUsage(CertificateProfile.DIGITALSIGNATURE, false);
        profile1.setKeyUsage(CertificateProfile.KEYENCIPHERMENT, false);
View Full Code Here

        assertTrue(validateResultType.getResultMajor().equals(XKMSConstants.RESULTMAJOR_SUCCESS));
        assertTrue(validateResultType.getResultMinor().equals(XKMSConstants.RESULTMINOR_NOMATCH));

        // Revoke certificate
        Admin administrator = new Admin(Admin.TYPE_RA_USER);
        certificateStoreSession.revokeCertificate(administrator, cert1, new ArrayList(), RevokedCertInfo.REVOCATION_REASON_UNSPECIFIED, null);
        // Validate with revoked certificate
        validateRequestType = xKMSObjectFactory.createValidateRequestType();
        validateRequestType.setId("203");
View Full Code Here

        assertTrue(validateResultType.getKeyBinding().get(0).getStatus().getInvalidReason().contains(XKMSConstants.STATUSREASON_REVOCATIONSTATUS));

    }

    public void test99CleanDatabase() throws Exception {
        Admin administrator = new Admin(Admin.TYPE_RA_USER);
        userAdminSession.deleteUser(administrator, username1);
        userAdminSession.deleteUser(administrator, username2);
        userAdminSession.deleteUser(administrator, username3);

        endEntityProfileSession.removeEndEntityProfile(administrator, "XKMSTESTPROFILE");
View Full Code Here

TOP

Related Classes of org.ejbca.core.model.log.Admin

Copyright © 2018 www.massapicom. 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.