hyperioxx / frontman

Frontman is an open-source API gateway written in Go that allows you to manage your microservices and expose them as a single API endpoint. It acts as a reverse proxy and handles requests from clients, routing them to the appropriate backend service.

Home Page:https://frontman-labs.github.io/frontman/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phase 2 - Implement support for basic authentication using username and password

hyperioxx opened this issue · comments

Currently, Frontman does not support basic authentication using username and password. This feature is important for securing access to backend services that do not have their own authentication mechanisms. Implementing support for basic authentication will allow users to define credentials for accessing backend services.

Proposed Solution:

The proposed solution is to add a new field for username and password in the backend service struct. These credentials can be used to add the basic authentication header to requests made to the backend service. The username and password can be read from environment variables or a configuration file. Additionally, we can add a flag to specify the location of the configuration file or environment variables.

commented

I plan on taking this issue next since it aligns with my previous Auth work. Just so I don't replicate the issue again, what was the issue with the jwt Auth implementation?

It was something on the lines of calling AuthValidator and it would return a nil pointer if the backend didn’t have auth setup

commented

It was something on the lines of calling AuthValidator and it would return a nil pointer if the backend didn’t have auth setup

Weird. I tested that, but my approach changed in between tests. Thanks for cleaning that up for me!