Skip to content

Commit

Permalink
Add auth instructions to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaydel committed Mar 20, 2023
1 parent 1298bb0 commit effa961
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,56 @@ You can add, update, and remove backend services using the following REST endpoi
- PUT /services/{name} - Updates an existing backend service
- DELETE /services/{name} - Removes a backend service

## Adding authentication to backend services
Frontman currently supports two methods of authentication: JWT tokens and Basic Auth. Authentication can be configured for each backend service separately using the `auth` configuration
option:

- Basic Auth with Username and Password In config:
```yaml
# .. backend config
auth:
type: "basic"
basic:
username: "test"
password: "test"
```

- Basic Auth with username and password environment variable:
```yaml
# .. backend config
auth:
type: "basic"
basic:
usernameEnvVariable: "API_USERNAME"
passwordEnvVariable: "API_PASSWORD"
```
- Basic Auth with username and password stored in credentials file:
```yaml
# .. backend config
auth:
type: "basic"
basic:
credentialsFile: "credentials.yaml"
```
credentials.yaml:
```yaml
username: "filetest"
password: "filetest"
```
- JWT Auth:
```yaml
# .. backend config
type: "jwt"
userDataContextKey: "user" # Header for storing user claims
jwt:
audience: <audience>
issuer: <issuer>
keysUrl: <jwks_uri>
```
## Frontman Plugins
Frontman allows you to create custom plugins that can be used to extend its functionality. Plugins are implemented using the FrontmanPlugin interface, which consists of three methods:
Expand Down Expand Up @@ -310,4 +360,4 @@ Once you have updated the configuration file, restart Frontman to load the new p
If you'd like to contribute to Frontman, please fork the repository and submit a pull request. We welcome bug reports, feature requests, and code contributions.

## License
Frontman is released under the GNU General Public License. See LICENSE for details.
Frontman is released under the GNU General Public License. See LICENSE for details.

0 comments on commit effa961

Please sign in to comment.