Package org.ejbca.core.model.log

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


        /*
         * Some slight reflective manipulation of crmfMessageHandler here in
         * order to get around the fact that we're not running any of the logic
         * in its usual constructor, instead using the empty default one.
         */
        SimpleMock.inject(crmfMessageHandler, "admin", new Admin(Admin.TYPE_RA_USER));
        final UserAdminSessionRemote userAdminSessionMock = new SimpleMock(UserAdminSessionRemote.class) {{
          map("findUserBySubjectDN", new UserDataVO() {
        private static final long serialVersionUID = 1L;
        public String getUsername() { return USER_NAME; };
      });
View Full Code Here


    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    @Override
    public String testAllConnections() {
        log.trace(">testAllPublishers");
        String returnval = "";
        Admin admin = Admin.getInternalAdmin();
        Iterator<PublisherData> i = PublisherData.findAll(entityManager).iterator();
        while (i.hasNext()) {
          PublisherData pdl = i.next();
          String name = pdl.getName();
          try {
            getPublisher(pdl).testConnection(admin);
          } catch (PublisherConnectionException pe) {
            String msg = intres.getLocalizedMessage("publisher.errortestpublisher", name);
            logSession.log(admin, admin.getCaId(), LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_PUBLISHERDATA,
                msg, pe);
            returnval += "\n" + msg;
          }
        }
        log.trace("<testAllPublishers");
View Full Code Here

    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    @Override
    public String healthCheck() {
        String returnval = "";
        final Admin admin = Admin.getInternalAdmin();
        boolean caTokenSignTest = EjbcaConfiguration.getHealthCheckCaTokenSignTest();
        log.debug("CaTokenSignTest: " + caTokenSignTest);
        Iterator<Integer> iter = caSession.getAvailableCAs().iterator();
        while (iter.hasNext()) {
            int caid = iter.next().intValue();
View Full Code Here

        log.trace(">doGet()");

        String command;
        // Keep this for logging.
        String remoteAddr = req.getRemoteAddr();
        Admin administrator = new Admin(Admin.TYPE_PUBLIC_WEB_USER, remoteAddr);

        RequestHelper.setDefaultCharacterEncoding(req);
        String issuerdn = null;
        if(req.getParameter(ISSUER_PROPERTY) != null){
          issuerdn = java.net.URLDecoder.decode(req.getParameter(ISSUER_PROPERTY),"UTF-8");
View Full Code Here

    private CertificateProfileSession certProfileSession = InterfaceCache.getCertificateProfileSession();

    public CrmfRARequestTest(String arg0) throws CertificateEncodingException, CertificateException {
        super(arg0);

        admin = new Admin(Admin.TYPE_BATCHCOMMANDLINE_USER);
        // Configure CMP for this test, we allow custom certificate serial numbers
      CertificateProfile profile = new EndUserCertificateProfile();
      //profile.setAllowCertSerialNumberOverride(true);
      try {
        certProfileSession.addCertificateProfile(admin, "CMPTESTPROFILE", profile);
View Full Code Here

        adminEntitySession.addAdminEntities(internalAdmin, AdminGroup.TEMPSUPERADMINGROUP, adminentities);
        authorizationSession.forceRuleUpdate(internalAdmin);
        X509Certificate admincert = (X509Certificate) certificateStoreSession.findCertificatesByUsername(internalAdmin, adminUsername).iterator().next();
        X509Certificate reqadmincert = (X509Certificate) certificateStoreSession.findCertificatesByUsername(internalAdmin, requestingAdminUsername).iterator()
                .next();
        approvingAdmin = new Admin(admincert, adminUsername, null);
        reuestingAdmin = new Admin(reqadmincert, requestingAdminUsername, null);
        // Create new CA using approvals
        String caname = RevocationApprovalTest.class.getSimpleName();
        approvalCAID = createApprovalCA(internalAdmin, caname, CAInfo.REQ_APPROVAL_REVOCATION, caAdminSession, caSession);
    }
View Full Code Here

    public void tearDown() throws Exception {
    }

    public void test00SetupAccessRights() throws Exception {
      log.trace(">test00SetupAccessRights");
        Admin administrator = new Admin(Admin.TYPE_RA_USER);
        username = baseUsername + "1";
        try {
            userAdminSession.addUser(administrator, username, "foo123", "CN=superadmin", null, null, false, SecConst.EMPTY_ENDENTITYPROFILE,
                    SecConst.CERTPROFILE_FIXED_ENDUSER, SecConst.USER_ADMINISTRATOR, SecConst.TOKEN_SOFT_JKS, 0, caid);
            userAdminSession.setClearTextPassword(administrator, username, "foo123");
View Full Code Here

      log.trace("<test03SendUntrustedRequest");
    }

    public void test04SendRevokedRequest() throws Exception {
      log.trace(">test04SendRevokedRequest");
        userAdminSession.revokeUser(new Admin(Admin.TYPE_RA_USER), username, RevokedCertInfo.REVOCATION_REASON_KEYCOMPROMISE);

        KeyStore clientKeyStore = KeyStore.getInstance("JKS");
        keystorefile = new File(tmpfile.getAbsolutePath() + "/" + username + ".jks");
        clientKeyStore.load(new FileInputStream(keystorefile), "foo123".toCharArray());
View Full Code Here

        assertFalse(popVerXmlSig.checkSignatureValue(pkCert.getPublicKey()));
      log.trace("<test06AuthenticationKeyBindingSignature");
    }

    public void test99RemoveUser() throws Exception {
        Admin administrator = new Admin(Admin.TYPE_RA_USER);
        userAdminSession.deleteUser(administrator, username);
        keystorefile.deleteOnExit();
    }
View Full Code Here

    protected String remoteIP = null;

    public BaseResponseGenerator(String remoteIP) {
        this.remoteIP = remoteIP;
        raAdmin = new Admin(Admin.TYPE_RA_USER, remoteIP);
        pubAdmin = new Admin(Admin.TYPE_PUBLIC_WEB_USER, remoteIP);
    }
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.