User Tools

Site Tools


infra:services:hula

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
infra:services:hula [2026/02/03 09:29] atluxity_idp.hackeriet.noinfra:services:hula [2026/07/21 16:16] (current) atluxity_idp.hackeriet.no
Line 1: Line 1:
 ====== Hacker-hula ====== ====== Hacker-hula ======
 +
 +
 +==== Adding a new member user =====
 +
 +Hula is a Django application. New users are added through the Django admin.
 +
 +The practical admin flow is:
 +
 +  - Open the Hula Django admin.
 +  - Go to users and click add user.
 +  - Set the username.
 +  - Set a temporary password.
 +  - Exchange the temporary password with the user out-of-band and tell them to change it after logging in.
 +  - Set the e-mail address. This is important: Hacker-ID / IDP enrollment depends on the user having an e-mail address in Hula.
 +  - Fill required fields. At the moment address is required even when we do not have a useful address; the current workaround is to put ''a''.
 +  - Save the user.
 +
 +After the Hula user exists, the member can start Hacker-ID onboarding from:
 +
 +  * https://hackeriet.no/hula/idp/
 +
 +=== RFID / door access card ===
 +
 +If the new member should get door access through the door system Hula controls:
 +
 +  - Get an RFID card from the safe.
 +  - Watch the door daemon logs while presenting the card to the door reader:
 +
 +<code>
 +ssh bac-door1.hackeriet.no "sudo journalctl -u doord -f"
 +</code>
 +
 +  - The door system logs continuously while it looks for card information.
 +  - Present the unregistered card to the door lock.
 +  - Look for the ''unregistered card'' log line and copy the card number from that line.
 +  - Put that card number into the Hula Django field named ''RFID access card number. (new):''.
 +  - Save the user/member record.
  
  
Line 48: Line 85:
       |                        |              |                        |       
       | Hackeriet bank account |              | Hackeriet bank account |       
-      |        (Cultura)       |       +      |        (Cultura)       
       |                        |              |                        |       
       +-----------+------------+              +-----------+------------+       
Line 80: Line 117:
  
 See also https://github.com/hackeriet/fiken-hula See also https://github.com/hackeriet/fiken-hula
 +
 +The Fiken API token is stored in the password manager. `hackerpass fiken/api`
 +To avoid storing the token in plaintext in `.env`, pipe it directly into the vault helper: 
  
 <code> <code>
-atluxity@hostname: git$ gh repo clone hackeriet/fiken-hula +atluxity@hostname:~$ gh repo clone hackeriet/fiken-hula 
-atluxity@hostname: git$ cd fiken-hula/ +atluxity@hostname:~$ cd fiken-hula/                                                                                                                                                    
-atluxity@hostname: fiken-hula$ echo FIKEN_API=\"$(hackerpass fiken/api)\" > .env +atluxity@hostname:fiken-hula$ python3 -m venv env                                                                                                                                      
-atluxity@hostname: fiken-hula$ source env/bin/activate +atluxity@hostname:fiken-hula$ source env/bin/activate                                                                                                                                  
-(env) atluxity@hostname: fiken-hula$ pip install -r requirements.txt  +(env) atluxity@hostname:fiken-hula$ pip install -r requirements.txt 
-(env) atluxity@hostname: fiken-hula$ python dump_all_sales.py > $(date +%Y-%d-%m)-all-sales.json+(env) atluxity@hostname:fiken-hula$ hackerpass fiken/api | python env_vault.py encrypt --name FIKEN_API --value-stdin 
 +Encryption password: 
 +Confirm encryption password: 
 +Updated .env with FIKEN_API_VAULT 
 +(env) atluxity@hostname: fiken-hula$ python dump_all_sales.py > $(date +%Y-%m-%d)-all-sales.json
 </code> </code>
  
Line 100: Line 144:
 hackerietweb@blade:~$ cd /srv/webapp-hackerhula/new/hackerhula/ hackerietweb@blade:~$ cd /srv/webapp-hackerhula/new/hackerhula/
 hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ poetry shell hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ poetry shell
-(hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ python3 manage.py sync_fiken /home/atluxity/2025-12-27-fiken-sales.json+(hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ uv run manage.py sync_fiken /home/atluxity/2025-12-27-fiken-sales.json
 (hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ exit                                     (hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ exit                                    
 atluxity@blade:~$ rf 2025-12-27-fiken-sales.json atluxity@blade:~$ rf 2025-12-27-fiken-sales.json
Line 130: Line 174:
   --version             Show program's version number and exit.   --version             Show program's version number and exit.
   -v {0,1,2,3}, --verbosity {0,1,2,3}   -v {0,1,2,3}, --verbosity {0,1,2,3}
-                        Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output+                        Verbosity level; 0=minimal output, 1=normal output, 2=verbose, 3=very verbose
   --settings SETTINGS   The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.   --settings SETTINGS   The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.
   --pythonpath PYTHONPATH   --pythonpath PYTHONPATH
Line 136: Line 180:
   --traceback           Raise on CommandError exceptions.   --traceback           Raise on CommandError exceptions.
   --no-color            Don't colorize the command output.   --no-color            Don't colorize the command output.
-  --force-color         Force colorization of the command output.+  --force-color         Force colorization of output.
   --skip-checks         Skip system checks.   --skip-checks         Skip system checks.
 </code> </code>
/srv/hackeriet-wiki/dokuwiki/data/attic/infra/services/hula.1770110969.txt.gz · Last modified: by atluxity_idp.hackeriet.no