diff --git a/wherehows-dao/src/main/java/wherehows/dao/view/DataTypesViewDao.java b/wherehows-dao/src/main/java/wherehows/dao/view/DataTypesViewDao.java index fff44a1c10..043539e5c7 100644 --- a/wherehows-dao/src/main/java/wherehows/dao/view/DataTypesViewDao.java +++ b/wherehows-dao/src/main/java/wherehows/dao/view/DataTypesViewDao.java @@ -38,12 +38,4 @@ public class DataTypesViewDao extends BaseViewDao { throw new UnsupportedOperationException("Operation not implemented"); } - /** - * Get docs for all field format types - */ - public Map getDocsForAllFieldFormats() throws Exception { - throw new UnsupportedOperationException("Operation not implemented"); - } - - } diff --git a/wherehows-frontend/app/controllers/api/v2/Dataset.java b/wherehows-frontend/app/controllers/api/v2/Dataset.java index cca03c5013..49bf2c0f0b 100644 --- a/wherehows-frontend/app/controllers/api/v2/Dataset.java +++ b/wherehows-frontend/app/controllers/api/v2/Dataset.java @@ -144,16 +144,6 @@ public class Dataset extends Controller { } } - public static Promise getFieldFormatDocs() { - try { - return Promise.promise(() -> ok( - Json.newObject().set("fieldFormatDocs", Json.toJson(DATA_TYPES_DAO.getDocsForAllFieldFormats())))); - } catch (Exception e) { - Logger.error("Fail to get docs of field formats", e); - return Promise.promise(() -> notFound(errorResponse(e))); - } - } - public static Promise getDataPlatforms() { try { return Promise.promise( diff --git a/wherehows-frontend/app/security/AuthenticationManager.java b/wherehows-frontend/app/security/AuthenticationManager.java index b902314249..cc00060ae3 100644 --- a/wherehows-frontend/app/security/AuthenticationManager.java +++ b/wherehows-frontend/app/security/AuthenticationManager.java @@ -33,7 +33,7 @@ public class AuthenticationManager { LoginContext lc = null; // authenticate using the jaas config try { - lc = new LoginContext("WH-Authentication", new WHCallbackHandler(userName, password)); + lc = new LoginContext("WHZ-Authentication", new WHZCallbackHandler(userName, password)); } catch (LoginException le) { throw new AuthenticationException(le.toString()); } catch (SecurityException se) { @@ -47,10 +47,10 @@ public class AuthenticationManager { } } - private static class WHCallbackHandler implements CallbackHandler { + private static class WHZCallbackHandler implements CallbackHandler { private String password = null; private String username = null; - private WHCallbackHandler(String username, String password) { + private WHZCallbackHandler(String username, String password) { this.username = username; this.password = password; } @@ -71,5 +71,6 @@ public class AuthenticationManager { } } } - + } + diff --git a/wherehows-frontend/application.env b/wherehows-frontend/application.env index d21237ae10..07be26db7a 100644 --- a/wherehows-frontend/application.env +++ b/wherehows-frontend/application.env @@ -17,11 +17,6 @@ WHZ_ES_DATASET_URL="http://localhost:9200/wherehows/dataset/_search" WHZ_ES_METRIC_URL="http://localhost:9200/wherehows/metric/_search" WHZ_ES_FLOW_URL="http://localhost:9200/wherehows/flow_jobs/_search" -# LDAP -WHZ_LDAP_URL=your_ldap_url -WHZ_LDAP_PRINCIPAL_DOMAIN=your_ldap_principal_domain -WHZ_LDAP_SEARCH_BASE=your_ldap_search_base - # Piwik tracking configuration PIWIK_SITE_ID="0000" # change_to_your_piwik_id PIWIK_URL="change_to_your_piwik_url" \ No newline at end of file diff --git a/wherehows-frontend/conf/application.conf b/wherehows-frontend/conf/application.conf index 02136bc1a5..e7f2fdafee 100644 --- a/wherehows-frontend/conf/application.conf +++ b/wherehows-frontend/conf/application.conf @@ -80,11 +80,6 @@ elasticsearch.dataset.url = ${WHZ_ES_DATASET_URL} elasticsearch.metric.url = ${WHZ_ES_METRIC_URL} elasticsearch.flow.url = ${WHZ_ES_FLOW_URL} -authentication.ldap.context_factory_class = "com.sun.jndi.ldap.LdapCtxFactory" -authentication.ldap.url = ${WHZ_LDAP_URL} -authentication.principal.domain = ${WHZ_LDAP_PRINCIPAL_DOMAIN} -authentication.ldap.search.base = ${WHZ_LDAP_SEARCH_BASE} - dataset.hdfs_browser.link = "https://localhost:8888/filebrowser/#" dataset.hdfs_browser.link = ${?YOUR_HDFS_BROWSER_LINK} diff --git a/wherehows-frontend/conf/jaas.conf b/wherehows-frontend/conf/jaas.conf new file mode 100644 index 0000000000..34579536d3 --- /dev/null +++ b/wherehows-frontend/conf/jaas.conf @@ -0,0 +1,9 @@ +WHZ-Authentication { + com.sun.security.auth.module.LdapLoginModule sufficient + userProvider="" + authIdentity="{USERNAME}" + userFilter="" + java.naming.security.authentication="simple" + debug="false" + useSSL="true"; +}; \ No newline at end of file diff --git a/wherehows-frontend/conf/routes b/wherehows-frontend/conf/routes index 85b35bfec1..bc3b4d423d 100644 --- a/wherehows-frontend/conf/routes +++ b/wherehows-frontend/conf/routes @@ -270,8 +270,6 @@ GET /api/v2/list/platforms GET /api/v2/list/compliance-data-types controllers.api.v2.Dataset.getComplianceDataTypes -GET /api/v2/list/field-format-docs controllers.api.v2.Dataset.getFieldFormatDocs - GET /api/v2/platforms/:platform/prefix/:prefix controllers.api.v2.Dataset.listSegments(platform: String, prefix: String) GET /api/v2/platforms/:platform controllers.api.v2.Dataset.listSegments(platform: String, prefix = "") diff --git a/wherehows-frontend/runFrontend b/wherehows-frontend/runFrontend index eae18e8222..be611a3190 100755 --- a/wherehows-frontend/runFrontend +++ b/wherehows-frontend/runFrontend @@ -3,6 +3,6 @@ set -a source ./application.env set +a -export JAVA_OPTS="-Xms512m -Xmx2048m -Dhttp.port=9000" +export JAVA_OPTS="-Xms512m -Xmx2048m -Dhttp.port=9000 -Djava.security.auth.login.config=conf/jaas.conf" build/stage/wherehows-frontend/bin/playBinary \ No newline at end of file