@Override protected SecurityUserGroupServiceConfig createUGConfig( String name, Class<?> aClass, String encoder, String policyName) { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); config.setName(name); config.setClassName(aClass.getName()); config.setPasswordEncoderName(encoder); config.setPasswordPolicyName(policyName); config.setCreatingTables(false); return config; }
@Override protected SecurityUserGroupServiceConfig getUGConfig(String name, Class<?> aClass, String encoder, String policyName) { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); config.setName(name); config.setClassName(aClass.getName()); config.setPasswordEncoderName(encoder); config.setPasswordPolicyName(policyName); config.setCreatingTables(false); return config; }
static protected JDBCUserGroupServiceConfig createConfigObject(String fixtureId,LiveDbmsDataSecurity data,GeoServerSecurityManager securityManager) throws Exception { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); Properties props=Util.loadUniversal(new FileInputStream(data.getFixture())); config.setName(fixtureId); config.setConnectURL(props.getProperty("url")); config.setDriverClassName(props.getProperty("driver")); config.setUserName(props.getProperty("user")== null ? props.getProperty("username"): props.getProperty("user")); config.setPassword(props.getProperty("password")); config.setClassName(JDBCUserGroupService.class.getName()); config.setCreatingTables(false); config.setPasswordEncoderName( securityManager.loadPasswordEncoder(GeoServerDigestPasswordEncoder.class).getName()); config.setPasswordPolicyName(PasswordValidator.DEFAULT_NAME); if ("mysql".equals(fixtureId)) { config.setPropertyFileNameDDL("usersddl.mysql.xml"); } else { config.setPropertyFileNameDDL(JDBCUserGroupService.DEFAULT_DDL_FILE); } config.setPropertyFileNameDML(JDBCUserGroupService.DEFAULT_DML_FILE); return config; } static protected GeoServerUserGroupService createUserGroupService(String fixtureId,
protected static JDBCUserGroupServiceConfig createConfigObject( String fixtureId, LiveDbmsDataSecurity data, GeoServerSecurityManager securityManager) throws Exception { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); Properties props = Util.loadUniversal(new FileInputStream(data.getFixture())); config.setName(fixtureId); config.setConnectURL(props.getProperty("url")); config.setDriverClassName(props.getProperty("driver")); config.setUserName( props.getProperty("user") == null ? props.getProperty("username") : props.getProperty("user")); config.setPassword(props.getProperty("password")); config.setClassName(JDBCUserGroupService.class.getName()); config.setCreatingTables(false); config.setPasswordEncoderName( securityManager .loadPasswordEncoder(GeoServerDigestPasswordEncoder.class) .getName()); config.setPasswordPolicyName(PasswordValidator.DEFAULT_NAME); if ("mysql".equals(fixtureId)) { config.setPropertyFileNameDDL("usersddl.mysql.xml"); } else { config.setPropertyFileNameDDL(JDBCUserGroupService.DEFAULT_DDL_FILE); } config.setPropertyFileNameDML(JDBCUserGroupService.DEFAULT_DML_FILE); return config; }
protected static JDBCUserGroupServiceConfig createConfigObjectH2Jndi( String serviceName ,GeoServerSecurityManager securityManager) { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); config.setName(serviceName); config.setJndi(true); config.setJndiName("ds.h2"); config.setClassName(JDBCUserGroupService.class.getName()); config.setPropertyFileNameDDL(JDBCUserGroupService.DEFAULT_DDL_FILE); config.setPropertyFileNameDML(JDBCUserGroupService.DEFAULT_DML_FILE); config.setCreatingTables(false); config.setPasswordEncoderName( securityManager.loadPasswordEncoder(GeoServerDigestPasswordEncoder.class).getName()); config.setPasswordPolicyName(PasswordValidator.DEFAULT_NAME); return config; } protected static GeoServerUserGroupService createH2UserGroupServiceFromJNDI(String serviceName,
protected static JDBCUserGroupServiceConfig createConfigObjectH2Jndi( String serviceName, GeoServerSecurityManager securityManager) { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); config.setName(serviceName); config.setJndi(true); config.setJndiName("ds.h2"); config.setClassName(JDBCUserGroupService.class.getName()); config.setPropertyFileNameDDL(JDBCUserGroupService.DEFAULT_DDL_FILE); config.setPropertyFileNameDML(JDBCUserGroupService.DEFAULT_DML_FILE); config.setCreatingTables(false); config.setPasswordEncoderName( securityManager .loadPasswordEncoder(GeoServerDigestPasswordEncoder.class) .getName()); config.setPasswordPolicyName(PasswordValidator.DEFAULT_NAME); return config; }
protected static JDBCUserGroupServiceConfig createConfigObjectH2(String serviceName, GeoServerSecurityManager securityManager) { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); config.setName(serviceName); config.setConnectURL("jdbc:h2:target/h2/security"); config.setDriverClassName("org.h2.Driver"); config.setUserName("sa"); config.setPassword(""); config.setClassName(JDBCUserGroupService.class.getName()); config.setPropertyFileNameDDL(JDBCUserGroupService.DEFAULT_DDL_FILE); config.setPropertyFileNameDML(JDBCUserGroupService.DEFAULT_DML_FILE); config.setCreatingTables(false); config.setPasswordEncoderName( securityManager.loadPasswordEncoder(GeoServerDigestPasswordEncoder.class).getName()); config.setPasswordPolicyName(PasswordValidator.DEFAULT_NAME); return config; }
protected static JDBCUserGroupServiceConfig createConfigObjectH2( String serviceName, GeoServerSecurityManager securityManager) { JDBCUserGroupServiceConfig config = new JDBCUserGroupServiceConfig(); config.setName(serviceName); config.setConnectURL("jdbc:h2:target/h2/security"); config.setDriverClassName("org.h2.Driver"); config.setUserName("sa"); config.setPassword(""); config.setClassName(JDBCUserGroupService.class.getName()); config.setPropertyFileNameDDL(JDBCUserGroupService.DEFAULT_DDL_FILE); config.setPropertyFileNameDML(JDBCUserGroupService.DEFAULT_DML_FILE); config.setCreatingTables(false); config.setPasswordEncoderName( securityManager .loadPasswordEncoder(GeoServerDigestPasswordEncoder.class) .getName()); config.setPasswordPolicyName(PasswordValidator.DEFAULT_NAME); return config; }