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

Auth issue #863

Closed
mxmchr opened this issue Sep 27, 2024 · 4 comments
Closed

Auth issue #863

mxmchr opened this issue Sep 27, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@mxmchr
Copy link

mxmchr commented Sep 27, 2024

Bonjour,
Je suis en train d'effecteur des tests sur mercator sur différentes installations via docker compose.
depuis hier soir, quand je déploie mes conteneurs nginx et mercator, j'arrive sur la page de login, et je ne peux pas m'authentifier.
J'ai recommencé au propre ce soir, mais je rencontre la même erreur.
J'ai décidé d'aller voir dans la base sqlite, je vois bien la structure de la base de données, mais les tables sont totalement vide malgré la variable :

  • USE_DEMO_DATA=1 dans mon compose.

image

auth mercator

Voici mon yml :

version: '3.7'
services:
  reverse-proxy:
    image: nginx:latest
    restart: unless-stopped
    container_name: reverse-proxy
    volumes:
      - ./PV/nginx/nginx.conf:/etc/nginx/nginx.conf
      - ./PV/nginx/certs:/etc/nginx/certs
      ##########################################
      # uncomment if you need your company's CA root certificate (don't forget to change the certificate name)
      - ./PV/nginx/myCompany.crt:/usr/local/share/ca-certificates/CA.crt
      - ./PV/nginx/update-ca-certificates.sh:/docker-entrypoint.d/1000-update-ca-certificates.sh
      ##########################################

    ports:
      - 443:443
    depends_on:
      - mercator

  mercator:
    image: ghcr.io/dbarzin/mercator:latest
    restart: unless-stopped
    container_name: mercator
    volumes:
      - ./PV/mercator/db.sqlite/:/var/www/mercator/sql/db.sqlite
      - ./env/mercator.env:/var/www/mercator/.env
      - ../app/Http/Kernel.php:/var/www/mercator/app/Http/Kernel.php
      - ../app/Http/Middleware/ForceXForwardedProto.php:/var/www/mercator/app/Http/Middleware/ForceXForwardedProto.php
    expose:
      - 80
    environment:
      ##########################################
      # CONFIG set to your company's domain name
      - APP_URL=https://carto.lab.local/
      - ASSET_URL=https://carto.lab.local/
      ##########################################

      ##########################################
      # uncomment if you want to load demo data
      - USE_DEMO_DATA=1
      ##########################################

      # - Plusieurs types possibles : AD, OpenLDAP, FreeIPA, DirectoryServer
      - LDAP_TYPE="AD"
      # - # If true, LDAP actions will be written to the application's default log file
      - LDAP_LOGGING=true
      - LDAP_CONNECTION=default
      - LDAP_HOST=10.0.0.1
      # - # Identifiers of the user who will connect to the LDAP in order to perform queries
      - LDAP_USERNAME="dn=administrateur,cn=user,dc=lab,dc=local"
      - LDAP_PASSWORD=secret
      - LDAP_PORT=636
      - LDAP_BASE_DN="dc=lab,dc=local"
      # - LDAP_TIMEOUT=5
      - LDAP_SSL=true
      # - LDAP_TLS=false
      # - # Allows you to restrict access to a tree structure
      # - LDAP_SCOPE="ou=Accounting,ou=Groups,dc=planetexpress,dc=com"
      # - # Allows you to restrict access to groups
      # - LDAP_GROUPS="Delivering,Help Desk"
@dbarzin dbarzin self-assigned this Sep 27, 2024
@dbarzin
Copy link
Owner

dbarzin commented Sep 27, 2024

La table admin_users n'est pas utilisée pour l'authentification mais pour la cartographie des administrateurs.
Pour l'authentification dans l'application, c'est la table usersqui est utilisée.

@dbarzin dbarzin added the question Further information is requested label Sep 27, 2024
@mxmchr
Copy link
Author

mxmchr commented Sep 27, 2024

Effectivement, autant pour moi.
Je viens de vérifier, mais elle tout autant vide, et cela semble être le cas pour toutes les tables.

@dbarzin
Copy link
Owner

dbarzin commented Sep 27, 2024

C'est cette commande :

php artisan migrate --seed

Qui crée l'administrateur et peuple les tables indispensables au fonctionnement de l'application.

@mxmchr
Copy link
Author

mxmchr commented Sep 27, 2024

Merci pour ce retour !
je suis étonné, lors de mes précédant déploiement, je n'avais pas besoin d'utiliser cette commande pour peupler les tables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants