- You need to have JDK8
installed on your machine to be able to build
- You need to have Chrome web browser
installed to be able to build because UI tests have a dependency on
DataHub Frontend is already built as part of top level build:
However, if you only want to build
DataHub Frontend specifically:
DataHub Frontend, you need to make sure that DataHub GMS and
all its dependencies have already started and running.
Also, user information should already be registered into the DB,
otherwise user will not be able to sign in.
To do that, first create a file named
user.dat containing below line and filling the parts
with your information:
mce producer script as below:
Or, you can run the script without providing any data file. In this case, the script will use
to bootstrap some sample users and datasets:
This will create a default user with username
datahub. You can sign in to the app using
datahub as your username.
Quickest way to try out
DataHub Frontend is running the Docker image.
If you do modify things and want to try it out quickly without building the Docker image, you can also run the application directly from command line after a successful build:
After starting your application in one of the two ways mentioned above, you can connect to it by typing below into your favorite web browser:
To be able to sign in, you need to provide your user name. You don't need to type any password.
All APIs for the application are defined in routes file. Below, you can find sample curl calls to these APIs and their responses.
DataHub frontend leverages Java Authentication and Authorization Service (JAAS) to perform the authentication. By default we provided a DummyLoginModule which will accept any username/password combination. You can update jaas.conf to match your authentication requirement. For example, use the following config for LDAP-based authentication,
The React app supports both JAAS as described above and separately OIDC authentication. To learn about configuring OIDC for React, see the OIDC in React document.
Most DataHub frontend API endpoints are protected using Play Authentication, which means it requires authentication information stored in the cookie for the request to go through. This makes debugging using curl difficult. One option is to first make a curl call against the
/authenticate endpoint and stores the authentication info in a cookie file like this
You can then make all subsequent calls using the same cookie file to pass the authentication check.