Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Local DB authentication from HTTP request body to HTTP basic authentication #174

Closed
pincher95 opened this issue Nov 3, 2021 · 2 comments · Fixed by #172
Closed
Assignees
Labels
feature request New feature or request

Comments

@pincher95
Copy link
Contributor

Is your feature request related to existing pfSense functionality that is missing from the API? Please describe.

Local Database (default)
Uses the same credentials as the pfSense webConfigurator. To authenticate API calls, simply add a client-id value containing your username and a client-token value containing your password to your payload. For example {"client-id": "admin", "client-token": "pfsense"}

Is your feature request related to a problem? Please describe.

It's more an inconvenience, for example I was writing API client in GO and wanted to set auth once to http client to be used across all API calls since in current setup auth included in request body it was set in each API call.

Describe the solution you'd like

I think it will make more sense to use Local DB as http basic authentication
curl -u admin:pfsense https://127.0.0.1/api/v1/......

@pincher95 pincher95 added backlog Issues backlogged for inclusion in future releases feature request New feature or request labels Nov 3, 2021
@jaredhendrickson13 jaredhendrickson13 removed the backlog Issues backlogged for inclusion in future releases label Jan 12, 2022
@jaredhendrickson13
Copy link
Owner

Hey!

The current local database authentication mechanism was the original one and replacing that entirely would break many peoples implementations, which is really the only reason it still exists in it's current state. But I can easily add a condition that checks for basic authentication and then fallback to the request body if basic authentication was not used.

Thanks!

@danielmichaels
Copy link

Despite being one of those users who has built a lot of code based on the current implementation of local database auth, I still love the idea of a fallback from basic auth to the request body. Keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants