Authentification pour l'interface admin #31

Closed
opened 2022-05-09 08:13:35 +00:00 by juminet · 1 comment
Owner

Il n'y a pas d'authentification prévue pour l'accès à l'interface admin dans GeoNature-citizen. Ce qui est prévu dans GeoNature-citizen est de protéger l'accès via Apache ou Nginx.

cfr https://github.com/PnX-SI/GeoNature-citizen/issues/237

Il y a d'ailleurs cette configuration prévue pour apache ici (https://github.com/PnX-SI/GeoNature-citizen/blob/master/install/apache/gncitizen.conf) et pour nginx là (https://github.com/PnX-SI/GeoNature-citizen/blob/master/nginx/nginx.conf).

NB: Dans ce déployement: https://demo.geonature.fr/geonature/api/admin/ , ce n'est pas GeoNature-citizen, mais bien GeoNature. Ici, https://citizen.nature-occitanie.org/api/admin/, avec GeoNature-citizen, on a bien un accès restreint, mais pas par l'application.

Dans notre déploiement, nous n'avions pas encore prévu cet accès restreint dans notre configuration nginx.

Il n'y a pas d'authentification prévue pour l'accès à l'interface admin dans GeoNature-citizen. Ce qui est prévu dans GeoNature-citizen est de protéger l'accès via Apache ou Nginx. cfr https://github.com/PnX-SI/GeoNature-citizen/issues/237 Il y a d'ailleurs cette configuration prévue pour apache ici (https://github.com/PnX-SI/GeoNature-citizen/blob/master/install/apache/gncitizen.conf) et pour nginx là (https://github.com/PnX-SI/GeoNature-citizen/blob/master/nginx/nginx.conf). NB: Dans ce déployement: https://demo.geonature.fr/geonature/api/admin/ , ce n'est pas GeoNature-citizen, mais bien GeoNature. Ici, https://citizen.nature-occitanie.org/api/admin/, avec GeoNature-citizen, on a bien un accès restreint, mais pas par l'application. Dans notre déploiement, nous n'avions pas encore prévu cet accès restreint dans notre configuration nginx.
Author
Owner

Exemple de config nginx pour l'accès restreint à l'admin:

    location /api/admin {
      auth_basic "Restricted Area";
      auth_basic_user_file conf/.htpasswd;
      proxy_pass http://citizen-back:5002/api/admin;
      proxy_set_header  Host              $http_host;   # required for docker client's sake
      proxy_set_header  X-Real-IP         $remote_addr; # pass on real client's IP
      proxy_set_header  X-Forwarded-For   $proxy_add_x_forwarded_for;
      proxy_set_header  X-Forwarded-Proto $scheme;
      proxy_read_timeout                  900;
    }
Exemple de config nginx pour l'accès restreint à l'admin: ``` location /api/admin { auth_basic "Restricted Area"; auth_basic_user_file conf/.htpasswd; proxy_pass http://citizen-back:5002/api/admin; proxy_set_header Host $http_host; # required for docker client's sake proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 900; } ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: champs-libres/biommap#31
No description provided.