@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); // get the beans we use for testing configurer = (GeoFencePropertyPlaceholderConfigurer) applicationContext.getBean("geofence-configurer"); configurer.setLocation( new UrlResource(this.getClass().getResource("/test-config.properties"))); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); // get the beans we use for testing configurer = (GeoFencePropertyPlaceholderConfigurer) applicationContext.getBean("geofence-configurer"); configurer.setLocation( new UrlResource(this.getClass().getResource("/test-config.properties"))); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); // addUser("admin", "geoxserver", null, Arrays.asList("ROLE_ADMINISTRATOR")); addLayerAccessRule("*", "*", AccessMode.READ, "*"); addLayerAccessRule("*", "*", AccessMode.WRITE, "*"); catalog = getCatalog(); // init xmlunit Map<String, String> namespaces = new HashMap<String, String>(); namespaces.put("ows", "http://www.opengis.net/ows/1.1"); namespaces.put("gml", "http://www.opengis.net/gml"); namespaces.put("wfs", "http://www.opengis.net/wfs"); namespaces.put("xlink", "http://www.w3.org/1999/xlink"); namespaces.put("xsi", "http://www.w3.org/2001/XMLSchema-instance"); namespaces.put("feature", "http://geoserver.sf.net"); testData.registerNamespaces(namespaces); XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces)); xp = XMLUnit.newXpathEngine(); addWcs11Coverages(testData); }
/** Add the users */ @Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); addUser("cite", "cite", null, Collections.singletonList("ROLE_DUMMY")); addUser("cite_mixed", "cite", null, Collections.singletonList("ROLE_DUMMY")); // populate the access manager TestResourceAccessManager tam = (TestResourceAccessManager) applicationContext.getBean("testResourceAccessManager"); Catalog catalog = getCatalog(); FeatureTypeInfo buildings = catalog.getFeatureTypeByName(getLayerId(SystemTestData.BUILDINGS)); // user in mixed mode tam.putLimits( "cite_mixed", buildings, new VectorAccessLimits( CatalogMode.MIXED, null, Filter.EXCLUDE, null, Filter.EXCLUDE)); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); OSEOTestSupport.setupBasicOpenSearch(testData, getCatalog(), getGeoServer(), false); OSEOInfo service = getGeoServer().getService(OSEOInfo.class); openSearchAccessStoreId = service.getOpenSearchAccessStoreId(); } }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); GeoServerSecurityManager manager = getSecurityManager(); GitHubOAuth2FilterConfig filterConfig = new GitHubOAuth2FilterConfig(); filterConfig.setName("github"); filterConfig.setClassName(GitHubOAuthAuthenticationFilter.class.getName()); filterConfig.setCliendId("foo"); filterConfig.setClientSecret("bar"); manager.saveFilter(filterConfig); SecurityManagerConfig config = manager.getSecurityConfig(); GeoServerSecurityFilterChain chain = config.getFilterChain(); RequestFilterChain www = chain.getRequestChainByName("web"); www.setFilterNames("github", "anonymous"); manager.saveSecurityConfig(config); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); GeoServerSecurityManager manager = getSecurityManager(); GoogleOAuth2FilterConfig filterConfig = new GoogleOAuth2FilterConfig(); filterConfig.setName("google"); filterConfig.setClassName(GoogleOAuthAuthenticationFilter.class.getName()); filterConfig.setCliendId("foo"); filterConfig.setClientSecret("bar"); manager.saveFilter(filterConfig); SecurityManagerConfig config = manager.getSecurityConfig(); GeoServerSecurityFilterChain chain = config.getFilterChain(); RequestFilterChain www = chain.getRequestChainByName("web"); www.setFilterNames("google", "anonymous"); manager.saveSecurityConfig(config); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); GeoServerSecurityManager manager = getSecurityManager(); OpenIdConnectFilterConfig filterConfig = new OpenIdConnectFilterConfig(); filterConfig.setName("openIdConnect"); filterConfig.setClassName(OpenIdConnectAuthenticationFilter.class.getName()); filterConfig.setCliendId("foo"); filterConfig.setClientSecret("bar"); filterConfig.setAccessTokenUri("https://www.connectid/fake/test"); filterConfig.setUserAuthorizationUri("https://www.connectid/fake/test"); filterConfig.setCheckTokenEndpointUrl("https://www.connectid/fake/test"); manager.saveFilter(filterConfig); SecurityManagerConfig config = manager.getSecurityConfig(); GeoServerSecurityFilterChain chain = config.getFilterChain(); RequestFilterChain www = chain.getRequestChainByName("web"); www.setFilterNames("openIdConnect", "anonymous"); manager.saveSecurityConfig(config); }