-
Notifications
You must be signed in to change notification settings - Fork 46
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
Authentication credentials for v3 API running locally in Docker #2112
Comments
It was suggested that I create a superuser in the Docker container and use the user and password as authentication credentials. Based on the response header that is generated I believe what I need is a bearer token of some kind: access-control-allow-origin: * |
The docker-compose setup uses the Development configuration by default. That configuration includes an authentication called "InsecureEmailAuthentication". I'm not sure why that wasn't included in the To use I'd like to keep this issue open to deal with
|
Although the spec allows the We have a few options:
I don't like any of these options, but I'm leaning towards 1. @jaredlockhart do you have thoughts? |
I am writing the rest of the v3 API contract tests using a version of Normandy running locally and require authentication credentials to do so. A brief conversation in Slack with @jaredlockhart indicates there might be some setting that needs to be changed to make this happen.
Here is a sample call built using http://localhost:8000/api/v3/swagger/
curl -X POST "http://localhost:8000/api/v3/approval_request/1/approve/" -H "accept: application/json" -H "authorization: Basic YWRkOnBhc3N3ZA==" -H "Content-Type: application/json" -H "X-CSRFToken: 7pLjg7I3wpD0RPlt1FjSVQkzCbUfZ7KnuLTZDg7Icb4rJKctjIAdNuylwEmDARXj" -d "{ "approved": true, "approver": { "first_name": "string", "last_name": "string", "email": "string" }, "comment": "string", "creator": { "first_name": "string", "last_name": "string", "email": "string" }}"
and it currently returns:
{"detail":"Authentication credentials were not provided."}
The text was updated successfully, but these errors were encountered: