Skip to content
Provides a simple api that accepts username and returns an email from SQL.
JavaScript Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

F5 OTP Useremail Mapping

This web service is used in a F5 ILX workflow to return an email address for a given user id.

It leverages SQL for the backend, and relies on a stored procedure that accepts a string and returns the following fields:

  • UserName
    • Type: String
  • EmailAddress
    • Type: String

The following environment variables must exist in order for the API to work.

  • PORT - Port for the API to listen on.
  • SQLPORT - Port that SQL is listening on.
  • SQLSERVER - Hostname or IP of SQL Server.
  • SQLUSER - SQL User account. (Cannot be Windows user, local SQL user.)
  • SQLPASS - SQL User Password.
  • SQLDB - DB Name
  • SQLPROC - Stored Procedure name.


A status endpoint is available once launched:

  • /v1/status - Will return a status of running if successful.

    • "status": "running"
  • /v1/user/:username - Replacing :username with a real username will return that users email. (/v1/user/bob)

    • - Simple string response, you can pull the body of the response in for use int he F5.

Running Docker

To launch this API with docker, use the following. You may swap in a docker environment file if you choose, replacing values with real values. docker run -d -p 3001:3001 -e "SQLPORT=1433" -e "SQLSERVER=" -e "SQLUSER=username" -e "SQLPASS=userpassword" -e "SQLDB=dbname" -e "SQLPROC=storedprocname"

You can’t perform that action at this time.