Sample attendance checking via a unique QR code
Go to file
2023-05-27 22:06:13 +00:00
static main[ADD]attendance_flask:Codigos QR para asistencias 2022-10-10 20:59:37 +00:00
templates main[ADD]attendance_flask:Codigos QR para asistencias 2023-03-14 17:08:03 +00:00
.gitignore Changes for use in a proper domain 2022-07-28 19:38:44 +00:00
get_query.py main[ADD]attendance_flask:Codigos QR para asistencias 2023-03-14 17:09:35 +00:00
init_db.py Initial version 2022-07-28 01:42:30 -05:00
main.py Actualizar 'main.py' 2023-04-22 21:34:48 +00:00
README.md Indicate completed tasks 2023-05-27 22:06:13 +00:00
requirements.txt Minor adjustments for prototype 2022-07-28 22:49:18 +00:00
schema.sql main[ADD]attendance_flask:Codigos QR para asistencias 2023-01-12 19:18:29 +00:00

Sample application for verifying attendance through a unique QR code

To run in a Python virtual environment, using Flask:

mkvenv flask
venv flask
pip install Flask Flask-QRcode Flask-UUID

To create an empty database.db sqlite file with the table described in schema.sql:

./init_db.py

Nginx reverse proxy configuration

Add this code to the nginx configuration file for the virtual host:

    location /socket.io {
        set $webapp http://attendance.lxd:5000;
        include proxy_params;
        proxy_http_version 1.1;
        proxy_buffering off;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_pass $webapp;
    }

Tasks

  • Create a separate group in LDAP for non-Workspace users
  • Change Google Cloud Directory Sync configuration to skip users in this group
  • List all non-Workspace users with access to Odoo and create them in LDAP

To be decided

  • The Flask app will be installed in a central container? or a separate instance on every Raspberry Pi display?: In a central container
  • If every display has an instance, how to prevent direct connections to it, that bypass Authelia?
  • Different QR codes pointing to different URLs (perhaps with the same UUID?) for entrance/exit, very clearly labeled.
  • How to allow the display to show the main screen without having to login to Authelia? (remember that the Authelia registration cookie expires every month), and still requiring login for everyone else?
  • How to prevent users from accessing the main page and displaying the QR code? Perhaps using a separate attendance-checking domain?

Odoo login: OIDC or LDAP?

  • The OIDC module could be installed in Odoo to allow access and login via Authelia instead of Google/Oauth

  • Configure Authelia to require password from users in this LDAP group when accessing Odoo.

  • Change nginx configuration in Odoo server to force users to go through Authelia (internal connections will be allowed using the bypass option in Authelia; non-Workspace users who have logged into Authelia will be able to login to Odoo using one click).

  • Another option would be to install the LDAP authentication module in Odoo, and allow users to enter their username and password, instead of their personal Google account (not sure if it's possible), or a manually assigned password. The user would login twice in this scenario: once to Authelia for their attendance registration, and again in Odoo (using the same user and password).