Closed mtazzari closed 5 years ago
At this page https://adamkewley.github.io/jobson/workspaces.html I found that the users
file has to be created with `jobson users add
users: Authorized System Users A plaintext file that contains users authorized to use the Jobson API when basic authorization (see configuration documentation) is enabled. This file should not be edited directly. Instead, the users command should be used to add or modify entries in the file.
But still I don't know how to submit a POST request with basic authentication.
I will update the documentation with more details.
"Basic Authentication" in this case is directly referring to "HTTP basic access authentication (RFC 7617)", which most HTTP clients support (e.g. curl
does with --basic --user
). The algorithm for adding basic auth data to a HTTP request is very straightforward (see wiki or RFC): it involves adding one header containing the client's username and password (b64-encoded) to the request.
Note: as with all auth methods, auth should be done under an encryption layer if you're using it across an open network.
Great, thanks!
For reference, I found that the requests
Python package allows implementing the basic authentication easily with:
import requests
requests.get(url="http://url/to/jobson", auth=(<user>, <password>))
requests.post(url="http://url/to/jobson", auth=(<user>, <password>))
The authentication docs will be updated as part of the 1.0.0 release
Attached this issue to the mega 1.0.0 issue, will close this
Related to #25, at the moment there is basically no documentation on how to setup authentication. For each authentication, I think it would be sufficient a a simple working example showing:
In the Stateless JSON Web Token (JWT)", the link to
is broken.
I have tried to set up the Basic authentication, but I couldn't come up with a working
users
file. I have created ausers
file containing:but it doesn't work. I get this log entry in the console:
but I couldn't understand how to create these three columns properly.