Search in sources :

Example 1 with DefaultAuditLogger

use of com.yahoo.athenz.common.server.log.impl.DefaultAuditLogger in project athenz by yahoo.

the class ZMSImplTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    Mockito.when(mockServletRequest.getRemoteAddr()).thenReturn(MOCKCLIENTADDR);
    Mockito.when(mockServletRequest.isSecure()).thenReturn(true);
    System.setProperty(ZMSConsts.ZMS_PROP_FILE_NAME, "src/test/resources/zms.properties");
    System.setProperty(ZMSConsts.ZMS_PROP_METRIC_FACTORY_CLASS, ZMSConsts.ZMS_METRIC_FACTORY_CLASS);
    System.setProperty(ZMSConsts.ZMS_PROP_PROVIDER_ENDPOINTS, ".athenzcompany.com");
    System.setProperty(ZMSConsts.ZMS_PROP_PRIVATE_KEY_STORE_FACTORY_CLASS, "com.yahoo.athenz.auth.impl.FilePrivateKeyStoreFactory");
    System.setProperty(FilePrivateKeyStore.ATHENZ_PROP_PRIVATE_KEY, "src/test/resources/zms_private.pem");
    System.setProperty(ZMS_PROP_PUBLIC_KEY, "src/test/resources/zms_public.pem");
    System.setProperty(ZMSConsts.ZMS_PROP_DOMAIN_ADMIN, "user.testadminuser");
    System.setProperty(ZMSConsts.ZMS_PROP_AUTHZ_SERVICE_FNAME, "src/test/resources/authorized_services.json");
    System.setProperty(ZMSConsts.ZMS_PROP_SOLUTION_TEMPLATE_FNAME, "src/test/resources/solution_templates.json");
    auditLogger = new DefaultAuditLogger();
    initializeZms();
}
Also used : DefaultAuditLogger(com.yahoo.athenz.common.server.log.impl.DefaultAuditLogger)

Example 2 with DefaultAuditLogger

use of com.yahoo.athenz.common.server.log.impl.DefaultAuditLogger in project athenz by yahoo.

the class ZTSImplTest method setUpClass.

@BeforeClass
public void setUpClass() throws Exception {
    MockitoAnnotations.initMocks(this);
    Mockito.when(mockServletRequest.getRemoteAddr()).thenReturn(MOCKCLIENTADDR);
    System.setProperty(ZTSConsts.ZTS_PROP_METRIC_FACTORY_CLASS, ZTSConsts.ZTS_METRIC_FACTORY_CLASS);
    System.setProperty(ZTSConsts.ZTS_PROP_PRIVATE_KEY_STORE_FACTORY_CLASS, "com.yahoo.athenz.auth.impl.FilePrivateKeyStoreFactory");
    System.setProperty(ZTSConsts.ZTS_PROP_CERT_SIGNER_FACTORY_CLASS, "com.yahoo.athenz.zts.cert.impl.SelfCertSignerFactory");
    System.setProperty(FilePrivateKeyStore.ATHENZ_PROP_PRIVATE_KEY, "src/test/resources/zts_private.pem");
    System.setProperty(ZTSConsts.ZTS_PROP_ATHENZ_CONF, "src/test/resources/athenz.conf");
    System.setProperty(ZTSConsts.ZTS_PROP_FILE_NAME, "src/test/resources/zts.properties");
    System.setProperty(ZTSConsts.ZTS_PROP_NOAUTH_URI_LIST, "/zts/v1/schema,/zts/v1/status");
    System.setProperty(ZTSConsts.ZTS_PROP_CERT_REFRESH_IP_FNAME, "src/test/resources/cert_refresh_ipblocks.txt");
    System.setProperty(ZTSConsts.ZTS_PROP_OSTK_HOST_SIGNER_SERVICE, "sys.auth.hostsignd");
    auditLogger = new DefaultAuditLogger();
}
Also used : DefaultAuditLogger(com.yahoo.athenz.common.server.log.impl.DefaultAuditLogger) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

DefaultAuditLogger (com.yahoo.athenz.common.server.log.impl.DefaultAuditLogger)2 BeforeClass (org.testng.annotations.BeforeClass)1