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

External auth (.htpasswd with nginx) should support read only for HEAD/GET/OPTIONS #50

Open
dmsimard opened this issue Oct 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dmsimard
Copy link
Contributor

dmsimard commented Oct 18, 2021

Authentication for the API and reporting interface can be managed by django or a frontend server like apache or nginx with a .htpasswd.

The current implementation for nginx hardcodes it for every URL and every method:

server {
listen 443;
server_name {{ ara_api_fqdn }};
{% if ara_api_external_auth -%}
auth_basic "Privileged access";
# A .htpasswd file
auth_basic_user_file {{ ara_api_external_auth_file }};
{% endif %}

We could provide a "read only" implementation by allowing HEAD/GET/OPTIONS just like the django authentication toggle for authenticating reads or writes:

# ARA_READ_LOGIN_REQUIRED - Whether authentication is required for reading data
ara_api_read_login_required: false
# ARA_WRITE_LOGIN_REQUIRED - Whether authentication is required for writing data
ara_api_write_login_required: false

(These above should stay false when using ara_api_external_auth: true since it's the web server handling the authentication)

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

No branches or pull requests

1 participant