Giter Site home page Giter Site logo

edumfa / edumfa Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 8.0 50.26 MB

Up-to-date multifactor authentication for academic institutions.

Home Page: https://edumfa.io

License: GNU Affero General Public License v3.0

Dockerfile 0.01% JavaScript 12.23% Makefile 0.03% Python 80.21% Shell 0.47% HTML 6.35% CSS 0.19% Mako 0.01% Perl 0.38% Roff 0.11%
mfa passkeys totp

edumfa's Introduction

eduMFA

image

Latest Version

PyPI - Python Version

License

Documentation

eduMFA is an open solution for strong two-factor authentication like OTP tokens, SMS, smartphones or SSH keys. Using eduMFA you can enhance your existing applications like local login (PAM, Windows Credential Provider), VPN, remote access, SSH connections, access to websites or web portals with a second factor during authentication. Thus boosting the security of your existing applications.

The project eduMFA is based on the privacyIDEA Project and aims to provide up-to-date multifactor authentication for academic institutions.

Overview

eduMFA runs as an additional service in your network, and you can connect different applications to eduMFA.

eduMFA does not bind you to any decision of the authentication protocol, nor does it dictate you where your user information should be stored. This is achieved by its totally modular architecture. eduMFA is not only open as far as its modular architecture is concerned. But eduMFA is completely licensed under the AGPLv3.

It supports a wide variety of authentication devices like OTP tokens (HMAC, HOTP, TOTP, OCRA, mOTP), Yubikey (HOTP, TOTP, AES), FIDO U2F, as well as FIDO2 WebAuthn devices like Yubikey and Plug-Up, smartphone Apps like Google Authenticator, FreeOTP, Token2 or TiQR, SMS, Email, SSH keys, x509 certificates and Registration Codes for easy deployment.

eduMFA is based on Flask and SQLAlchemy as the python backend. The web UI is based on angularJS and bootstrap. A MachineToken design lets you assign tokens to machines. Thus, you can use your Yubikey to unlock LUKS, assign SSH keys to SSH servers or use Offline OTP with PAM.

Setup

For setting up the system to run it, please read install instructions at edumfa.readthedocs.io.

If you want to setup a development environment start like this:

git clone https://github.com/edumfa/edumfa.git
cd edumfa
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

You may additionally want to set up your environment for testing, by adding the additional dependencies:

pip install -r tests/requirements.txt

Getting and updating submodules

The client-side library for the registering and signing of WebAuthn-Credentials resides in a submodule.

To fetch all submodules for this repository, run:

git submodule update --init --recursive

When pulling changes from upstream later, you can automatically update any outdated submodules, by running:

git pull --recurse-submodules

Running it

First You need to create a config-file.

Then create the database tables and the encryption key:

./edumfa-manage create_tables
./edumfa-manage create_enckey

If You want to keep the development database upgradable, You should stamp it to simplify updates:

./edumfa-manage db stamp head -d migrations/

Create the key for the audit log:

./edumfa-manage create_audit_keys

Create the first administrator:

./edumfa-manage admin add <username>

Run it:

./edumfa-manage runserver

Now you can connect to http://localhost:5000 with your browser and login as administrator.

Run tests

If you have followed the steps above to set up your environment for testing, running the test suite should be as easy as running pytest with the following options:

python -m pytest -v --cov=eduMFA --cov-report=html tests/

Contributing

There are a lot of different ways to contribute to eduMFA, even if you are not a developer.

If you found a security vulnerability please report it to us using the reporting form provided by GitHub

You can find detailed information about contributing here: https://github.com/eduMFA/eduMFA/blob/main/CONTRIBUTING.md

Code structure

The database models are defined in models.py and tested in tests/test_db_model.py.

Based on the database models there are the libraries lib/config.py which is responsible for basic configuration in the database table config. And the library lib/resolver.py which provides functions for the database table resolver. This is tested in tests/test_lib_resolver.py.

Based on the resolver there is the library lib/realm.py which provides functions for the database table realm. Several resolvers are combined into a realm.

Based on the realm there is the library lib/user.py which provides functions for users. There is no database table user, since users are dynamically read from the user sources like SQL, LDAP, SCIM or flat files.

Versioning

eduMFA adheres to Semantic Versioning.

edumfa's People

Contributors

andyboeh avatar brunocascio avatar cornelinux avatar dependabot[bot] avatar enricomv avatar fredreichbier avatar fritterhoff avatar gallolp avatar j-hoff avatar jalr avatar jh23453 avatar jona-samuel avatar jp-hoehmann avatar koenr avatar laclaro avatar luc1412 avatar malavolti avatar melanger avatar mipronimo avatar nnlemling avatar pablo-knight avatar plettich avatar quoc-axiadids avatar renovate[bot] avatar salihkiraz avatar tamaro-skaljic avatar theodor-franke avatar weblate avatar wheldom01 avatar yurlov-alexander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

edumfa's Issues

Upgrade Docs Theme

Is your feature request related to a problem? Please describe.

The change of the docs theme is a quality of life improvement. It may add following features which makes browsing docs more pleasant:

  • Local TOC for fast navigating larger pages
  • Dark theme, which is preferred by many developers
  • Better design, with important elements being visually more distinctive
  • Better search e.g. with a keyboard shortcut

Describe the solution you'd like

There are multiple Themes available at sphinx-themes.org/. I think Furo might be one of the best ones available.

Implementation

  1. furo needs to be added as a dependency
  2. In the conf.py furo needs to be set as a theme

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency croniter to v1.4.1
  • chore(deps): update dependency docutils to v0.21.1
  • chore(deps): update dependency flask-sqlalchemy to v3.1.1
  • chore(deps): update dependency google-auth to v2.29.0
  • chore(deps): update dependency huey to v2.5.0
  • chore(deps): update dependency importlib-metadata to v6.11.0
  • chore(deps): update dependency lxml to v5.2.1
  • chore(deps): update dependency mako to v1.3.3
  • chore(deps): update dependency mock to v5.1.0
  • chore(deps): update dependency netaddr to v0.10.1
  • chore(deps): update dependency pyasn1 to v0.6.0
  • chore(deps): update dependency pyasn1-modules to v0.4.0
  • chore(deps): update dependency pycparser to v2.22
  • chore(deps): update dependency pygments to v2.17.2
  • chore(deps): update dependency pyjwt to v2.8.0
  • chore(deps): update dependency pymysql to v1.1.0
  • chore(deps): update dependency pyopenssl to v24.1.0
  • chore(deps): update dependency pytest to v7.4.4
  • chore(deps): update dependency python-dateutil to v2.9.0.post0
  • chore(deps): update dependency pytz to v2023.4
  • chore(deps): update dependency redis to v4.6.0
  • chore(deps): update dependency responses to v0.25.0
  • chore(deps): update dependency segno to v1.6.1
  • chore(deps): update dependency setuptools to v69.5.1
  • chore(deps): update dependency soupsieve to v2.5
  • chore(deps): update dependency sphinxcontrib-plantuml to v0.29
  • chore(deps): update dependency testfixtures to v7.2.2
  • chore(deps): update dependency typing-extensions to v4.11.0
  • chore(deps): update dependency zipp to v3.18.1
  • fix(deps): update dependency jquery to v3.7.1
  • chore(deps): update dependency argon2-cffi to v23
  • chore(deps): update dependency certifi to v2024
  • chore(deps): update dependency croniter to v2
  • chore(deps): update dependency importlib-metadata to v7
  • chore(deps): update dependency netaddr to v1
  • chore(deps): update dependency packaging to v24
  • chore(deps): update dependency pydash to v8
  • chore(deps): update dependency pytest to v8
  • chore(deps): update dependency pytz to v2024
  • chore(deps): update dependency redis to v5
  • chore(deps): update dependency sqlalchemy to v2
  • chore(deps): update dependency testfixtures to v8
  • fix(deps): update dependency bootstrap to v5
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
deploy/docker-compose-example.yml
dockerfile
Dockerfile
  • python 3.12-slim-bookworm
  • python 3.12-slim-bookworm
github-actions
.github/workflows/bandit.yml
  • actions/checkout v4
  • shundor/python-bandit-scan v1.0
.github/workflows/codeql.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/codespell.yml
  • actions/checkout v4
  • codespell-project/actions-codespell v2
.github/workflows/docker.yml
  • actions/checkout v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
.github/workflows/greetings.yml
  • actions/first-interaction v1
.github/workflows/python-dist.yml
  • actions/checkout v4
  • actions/setup-python v5
  • softprops/action-gh-release v2
.github/workflows/python.yml
  • actions/checkout v4
  • dorny/paths-filter v3
  • actions/checkout v4
  • actions/setup-python v5
  • actions/cache v4
  • codecov/codecov-action v4
  • ubuntu 22.04
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-python v5
  • actions/upload-artifact v4
.github/workflows/ubuntu.yml
  • actions/checkout v4
  • actions/checkout v4
  • ubuntu 22.04
  • ubuntu 20.04
npm
edumfa/static/package.json
  • angular ^1.8.3
  • angular-gettext ^2.4.2
  • angular-hotkeys ^1.7.0
  • angular-inform 0.0.19
  • angular-sanitize ^1.8.3
  • angular-ui-bootstrap ^2.5.6
  • angular-ui-router ^1.0.30
  • bootstrap ^3.4.1
  • isteven-angular-multiselect ^4.0.0
  • jquery ^3.6.0
  • ng-file-upload ^12.2.13
  • ng-idle ^1.3.2
pip_requirements
doc/requirements.txt
  • alabaster ==0.7.13
  • docutils ==0.20.1
  • imagesize ==1.4.1
  • packaging ==21.3
  • Pallets-Sphinx-Themes ==2.1.1
  • pyenchant ==3.2.2
  • Pygments ==2.15.0
  • snowballstemmer ==2.2.0
  • Sphinx ==7.2.6
  • sphinxcontrib-applehelp ==1.0.8
  • sphinxcontrib-devhelp ==1.0.6
  • sphinxcontrib-htmlhelp ==2.0.5
  • sphinxcontrib-httpdomain ==1.8.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-plantuml ==0.25
  • sphinxcontrib-qthelp ==1.0.7
  • sphinxcontrib-serializinghtml ==1.1.10
  • sphinxcontrib-spelling ==8.0.0
requirements-hsm.txt
  • PyKCS11 ==1.5.11
requirements-kerberos.txt
  • gssapi ==1.8.2
requirements-test.txt
  • testfixtures ==7.1.0
  • pytest ==7.3.1
  • mock ==5.0.2
  • responses ==0.23.1
requirements.txt
  • alembic ==1.13.1
  • argon2-cffi ==21.3.0
  • argon2-cffi-bindings ==21.2.0
  • async-timeout ==4.0.3
  • babel ==2.14.0
  • bcrypt ==4.0.1
  • beautifulsoup4 ==4.12.3
  • blinker ==1.7.0
  • cachetools ==5.3.3
  • cbor2 ==5.4.6
  • certifi ==2023.7.22
  • cffi ==1.15.1
  • charset-normalizer ==3.1.0
  • click ==8.1.7
  • configobj ==5.0.8
  • croniter ==1.3.8
  • cryptography ==42.0.5
  • defusedxml ==0.7.1
  • flask ==3.0.3
  • flask-babel ==4.0.0
  • flask-migrate ==4.0.7
  • flask-sqlalchemy ==3.0.5
  • flask-versioned ==0.9.4.post20101221
  • google-auth ==2.17.0
  • grpcio ==1.62.1
  • huey ==2.4.5
  • idna ==3.7
  • importlib-metadata ==6.1.0
  • itsdangerous ==2.1.2
  • jinja2 ==3.1.3
  • ldap3 ==2.9.1
  • lxml ==5.1.0
  • mako ==1.2.4
  • markupsafe ==2.1.5
  • netaddr ==0.8.0
  • passlib ==1.7.4
  • pyasn1 ==0.4.8
  • pyasn1-modules ==0.2.8
  • pycparser ==2.21
  • pydash ==6.0.2
  • pyjwt ==2.6.0
  • pymysql ==1.0.3
  • pyopenssl ==24.0.0
  • pyrad ==2.4
  • python-dateutil ==2.8.2
  • python-gnupg ==0.5.0
  • pytz ==2023.3
  • pyyaml ==6.0.1
  • redis ==4.4.4
  • requests ==2.31.0
  • rsa ==4.9
  • segno ==1.5.2
  • six ==1.16.0
  • smpplib ==2.2.3
  • soupsieve ==2.4
  • sqlalchemy ==1.4.52
  • typing-extensions ==4.10.0
  • urllib3 ==2.2.1
  • werkzeug ==3.0.2
  • zipp ==3.15.0
  • setuptools ==69.1.1
pip_setup
setup.py
  • Flask-Babel >=4.0.0
  • Flask-Migrate >=3.2.0
  • Flask-SQLAlchemy >=3.0
  • Flask-Versioned >=0.9.4
  • Flask >=3.0
  • PyJWT >=1.3.0
  • PyMySQL >=0.6.6
  • PyYAML >=6.0.1
  • SQLAlchemy >=1.4.0
  • argon2_cffi >=20.1.0
  • beautifulsoup4 >=4.12.3
  • cbor2 >=5.0.1
  • configobj >=5.0.6
  • croniter >=0.3.8
  • cryptography >=42.0.5
  • defusedxml >=0.4.1
  • google-auth >=1.23.0
  • grpcio >=1.62.1
  • huey >=1.11.0
  • importlib_metadata >=2.1.1
  • ldap3 >=2.6
  • lxml >=5.0.0
  • netaddr >=0.7.12
  • passlib >=1.7.0
  • pyOpenSSL >=24
  • pydash >=4.7.4
  • pyrad >=2.0
  • python-dateutil >=2.7.3
  • python-gnupg >=0.4.4
  • requests >=2.31.0
  • segno >=1.5
  • smpplib >=2.0
  • typing-extensions >=4.6.0
  • urllib3 >=2.2.1
  • Pallets-Sphinx-Themes >=1.2.3
  • Sphinx >=1.3.1
  • sphinxcontrib-httpdomain >=1.3.0
  • sphinxcontrib-plantuml >=0.18
  • sphinxcontrib-spelling >=7.0.0
  • mock >=2.0.0
  • pytest >=3.6.0
  • pytest-cov >=2.5.1
  • responses >=0.9.0
  • testfixtures >=6.14.2
  • psycopg2 >=2.9.9
  • PyKCS11 >=1.5.10
  • gssapi >=1.7.0

  • Check this box to trigger a request for Renovate to run again on this repository

sqlite3.OperationalError: no such table: config

Top-level intent

Maybe this is also a problem with the broken db migration. But I don't know.

Steps to reproduce

  1. cat eduroamapp.py
import sys
sys.stdout = sys.stderr
from edumfa.app import create_app
# Now we can select the config file:
application = create_app(config_name="production", config_file="/etc/edumfa/pi.cfg")


if __name__ == "__main__":
    application.run(host="0.0.0.1)

2. /opt/edumfa/venv/bin/uwsgi --http :8000 --master -b 32768 -p 4 --wsgi-file edumfaapp.py

But the table exists:

mysql> select * from config;
+-------------------------------+-------------------------------------------------------------+--------+---------------------------------+
| Key                           | Value                                                       | Type   | Description                     |
+-------------------------------+-------------------------------------------------------------+--------+---------------------------------+
| __timestamp__                 | 1710767325                                                  |        | config timestamp. last changed. |
| email.tls                     | 0                                                           |        |                                 |
| hotp.hashlib                  | sha1                                                        | public |                                 |
| radius.dictfile               | /etc/privacyidea/dictionary                                 |        |                                 |
| remote.verify_ssl_certificate | 0                                                           |        |                                 |
| sms.Provider                  | privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider |        |                                 |
| totp.hashlib                  | sha1                                                        | public |                                 |
| totp.timeShift                | 0                                                           |        |                                 |
| totp.timeStep                 | 30                                                          | public |                                 |
| totp.timeWindow               | 180                                                         | public |                                 |
+-------------------------------+-------------------------------------------------------------+--------+---------------------------------+
10 rows in set (0,00 sec)

Here is interesting, that the values aren't changed.

Actual outcome

See Logs.

Configuration

  • eduMFA version: 1.4
  • Installation method: pypi
  • Python version: 3.10
  • Operating system: Ubuntu
  • Webserver: nginx
  • Token database: MySQL

Log file

Traceback (most recent call last):
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
    self.dialect.do_execute(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: config

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 1948, in full_dispatch_request
    rv = self.preprocess_request()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 2242, in preprocess_request
    rv = func()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/webui/login.py", line 70, in before_request
    g.client_ip = get_client_ip(request, get_from_config(SYSCONF.OVERRIDECLIENT))
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/log.py", line 148, in log_wrapper
    return func(*args, **kwds)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/config.py", line 364, in get_from_config
    config_object = get_config_object()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/config.py", line 344, in get_config_object
    store['config_object'] = shared_config.reload_and_clone()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/config.py", line 197, in reload_and_clone
    self._reload_from_db()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/config.py", line 100, in _reload_from_db
    db_ts = Config.query.filter_by(Key=EDUMFA_TIMESTAMP).first()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2824, in first
    return self.limit(1)._iter().first()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2916, in _iter
    result = self.session.execute(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1714, in execute
    result = conn._execute_20(statement, params or {}, execution_options)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
    ret = self._execute_context(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
    self._handle_dbapi_exception(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
    util.raise_(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
    self.dialect.do_execute(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: config
[SQL: SELECT config."Key" AS "config_Key", config."Value" AS "config_Value", config."Type" AS "config_Type", config."Description" AS "config_Description" 
FROM config 
WHERE config."Key" = ?
 LIMIT ? OFFSET ?]
[parameters: ('__timestamp__', 1, 0)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask/app.py", line 1879, in handle_exception
    server_error = handler(server_error)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/api/before_after.py", line 410, in internal_error
    g.audit_object.log({"info": str(error)})
AttributeError: 'NoneType' object has no attribute 'log'

Bug using passkeys

Using passkeys triggers a error/warning message. This has no real impact on the usability of passkeys themself but should be fixed.

[2024-03-18 09:47:38,134][162][140073668225920][ERROR][edumfa.api.lib.postpolicy:351] There was no acceptable client mode in the multi-challenge list. The preferred client mode is set to "interactive". Please check Your policy (['interactive', 'webauthn', 'poll', 'u2f']). Error: list index out of range

edumfa-schema-upgrade: Unknown column 'policy.edumfanode' in 'field list'

Steps to reproduce

  1. edumfa-schema-upgrade eduMFA/migrations/

Expected outcome

exit 0

Actual outcome

Can not import grpc modules.

               _       __  __ ______      
              | |     |  \/  |  ____/\    
       ___  __| |_   _| \  / | |__ /  \   
      / _ \/ _` | | | | |\/| |  __/ /\ \  
     |  __/ (_| | |_| | |  | | | / ____ \ 
      \___|\__,_|\__,_|_|  |_|_|/_/    \_          v1.4.0
        
++ Stamping DB to 4f32a4e1bf33
Can not import grpc modules.

               _       __  __ ______      
              | |     |  \/  |  ____/\    
       ___  __| |_   _| \  / | |__ /  \   
      / _ \/ _` | | | | |\/| |  __/ /\ \  
     |  __/ (_| | |_| | |  | | | / ____ \ 
      \___|\__,_|\__,_|_|  |_|_|/_/    \_          v1.4.0
        
++ Upgrading DB schema.
Can not import grpc modules.

               _       __  __ ______      
              | |     |  \/  |  ____/\    
       ___  __| |_   _| \  / | |__ /  \   
      / _ \/ _` | | | | |\/| |  __/ /\ \  
     |  __/ (_| | |_| | |  | | | / ____ \ 
      \___|\__,_|\__,_|_|  |_|_|/_/    \_          v1.4.0
        
Running online
Good. Column tokeninfo already exists.
Good. Column priority already exists.
Good. Column adminrealm already exists.
Good. Column revoked already exists.
Good. Column locked already exists.
(MySQLdb.OperationalError) (1050, "Table 'smtpserver' already exists")
[SQL: 
CREATE TABLE smtpserver (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	identifier VARCHAR(255) NOT NULL, 
	server VARCHAR(255) NOT NULL, 
	port INTEGER, 
	username VARCHAR(255), 
	password VARCHAR(255), 
	sender VARCHAR(255), 
	tls BOOL, 
	description VARCHAR(2000), 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
(MySQLdb.OperationalError) (1050, "Table 'passwordreset' already exists")
[SQL: 
CREATE TABLE passwordreset (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	recoverycode VARCHAR(255) NOT NULL, 
	username VARCHAR(64) NOT NULL, 
	realm VARCHAR(64) NOT NULL, 
	resolver VARCHAR(64), 
	email VARCHAR(255), 
	timestamp DATETIME(6), 
	expiration DATETIME(6), 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
(MySQLdb.OperationalError) (1050, "Table 'radiusserver' already exists")
[SQL: 
CREATE TABLE radiusserver (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	identifier VARCHAR(255) NOT NULL, 
	server VARCHAR(255) NOT NULL, 
	port INTEGER, 
	secret VARCHAR(255), 
	description VARCHAR(2000), 
	PRIMARY KEY (id), 
	UNIQUE (identifier)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Good. Table 'radiusserver' already exists.
(MySQLdb.OperationalError) (1050, "Table 'eventhandler' already exists")
[SQL: 
CREATE TABLE eventhandler (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	ordering INTEGER NOT NULL, 
	event VARCHAR(255) NOT NULL, 
	handlermodule VARCHAR(255) NOT NULL, 
	`condition` VARCHAR(1024), 
	action VARCHAR(1024), 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Table already exists
(MySQLdb.OperationalError) (1050, "Table 'smsgateway' already exists")
[SQL: 
CREATE TABLE smsgateway (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	identifier VARCHAR(255) NOT NULL, 
	description VARCHAR(1024), 
	providermodule VARCHAR(1024) NOT NULL, 
	PRIMARY KEY (id), 
	UNIQUE (identifier)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Table already exists
(MySQLdb.OperationalError) (1050, "Table 'eventhandlercondition' already exists")
[SQL: 
CREATE TABLE eventhandlercondition (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	eventhandler_id INTEGER, 
	`Key` VARCHAR(255) NOT NULL, 
	`Value` VARCHAR(2000), 
	comparator VARCHAR(255), 
	PRIMARY KEY (id), 
	FOREIGN KEY(eventhandler_id) REFERENCES eventhandler (id), 
	CONSTRAINT ehcix_1 UNIQUE (eventhandler_id, `Key`)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Table already exists
(MySQLdb.OperationalError) (1050, "Table 'clientapplication' already exists")
[SQL: 
CREATE TABLE clientapplication (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	ip VARCHAR(255) NOT NULL, 
	hostname VARCHAR(255), 
	clienttype VARCHAR(255) NOT NULL, 
	lastseen DATETIME(6), 
	PRIMARY KEY (id), 
	CONSTRAINT caix UNIQUE (ip, clienttype)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Table subscription exists
(MySQLdb.OperationalError) (1050, "Table 'subscription' already exists")
[SQL: 
CREATE TABLE subscription (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	application VARCHAR(30), 
	for_name VARCHAR(50) NOT NULL, 
	for_address VARCHAR(128), 
	for_email VARCHAR(128) NOT NULL, 
	for_phone VARCHAR(50) NOT NULL, 
	for_url VARCHAR(80), 
	for_comment VARCHAR(255), 
	by_name VARCHAR(50) NOT NULL, 
	by_email VARCHAR(128) NOT NULL, 
	by_address VARCHAR(128), 
	by_phone VARCHAR(50), 
	by_url VARCHAR(80), 
	date_from DATETIME(6), 
	date_till DATETIME(6), 
	num_users INTEGER, 
	num_tokens INTEGER, 
	num_clients INTEGER, 
	level VARCHAR(30), 
	signature VARCHAR(640), 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
pidea_audit table obviously already exists.
(MySQLdb.OperationalError) (1050, "Table 'pidea_audit' already exists")
[SQL: 
CREATE TABLE pidea_audit (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	date DATETIME(6), 
	signature VARCHAR(620), 
	action VARCHAR(50), 
	success INTEGER, 
	serial VARCHAR(20), 
	token_type VARCHAR(12), 
	user VARCHAR(20), 
	realm VARCHAR(20), 
	administrator VARCHAR(20), 
	action_detail VARCHAR(50), 
	info VARCHAR(50), 
	privacyidea_server VARCHAR(255), 
	client VARCHAR(50), 
	loglevel VARCHAR(12), 
	clearance_level VARCHAR(12), 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
column resolver in pidea_audit obviously already exists.
(MySQLdb.OperationalError) (1060, "Duplicate column name 'resolver'")
[SQL: ALTER TABLE pidea_audit ADD COLUMN resolver VARCHAR(50)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Good. Columns name and active already exist.
Could not add column 'check_all_resolvers'
(MySQLdb.OperationalError) (1060, "Duplicate column name 'check_all_resolvers'")
[SQL: ALTER TABLE policy ADD COLUMN check_all_resolvers BOOL]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add index in table pidea_audit.
(MySQLdb.OperationalError) (1061, "Duplicate key name 'ix_pidea_audit_user'")
[SQL: CREATE INDEX ix_pidea_audit_user ON pidea_audit (user)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add index to 'challenge.serial'
(MySQLdb.OperationalError) (1061, "Duplicate key name 'ix_challenge_serial'")
[SQL: CREATE INDEX ix_challenge_serial ON challenge (serial)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not create table 'usercache'.
(MySQLdb.OperationalError) (1050, "Table 'usercache' already exists")
[SQL: 
CREATE TABLE usercache (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	username VARCHAR(64), 
	resolver VARCHAR(120), 
	user_id VARCHAR(320), 
	timestamp DATETIME(6), 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
## Schema seems already to be oracle compatible.
(MySQLdb.OperationalError) (1091, "Can't DROP 'ix_clientapplication_id'; check that column/key exists")
[SQL: 
DROP INDEX ix_clientapplication_id ON clientapplication]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
## Unnecessary columns in table usercache obviously do not exist anymore.
(MySQLdb.OperationalError) (1091, "Can't DROP 'realm'; check that column/key exists")
[SQL: ALTER TABLE usercache DROP COLUMN realm]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add table 'authcache' - probably already exists!
(MySQLdb.OperationalError) (1050, "Table 'authcache' already exists")
[SQL: 
CREATE TABLE authcache (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	first_auth DATETIME(6), 
	last_auth DATETIME(6), 
	username VARCHAR(64), 
	resolver VARCHAR(120), 
	realm VARCHAR(120), 
	client_ip VARCHAR(40), 
	user_agent VARCHAR(120), 
	authentication VARCHAR(64), 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Can not create table 'privacyideaserver'. It probably already exists
(MySQLdb.OperationalError) (1050, "Table 'privacyideaserver' already exists")
[SQL: 
CREATE TABLE privacyideaserver (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	identifier VARCHAR(255) NOT NULL, 
	url VARCHAR(255) NOT NULL, 
	tls BOOL, 
	description VARCHAR(2000), 
	PRIMARY KEY (id), 
	UNIQUE (identifier)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add retries and timeout to radiusserver
(MySQLdb.OperationalError) (1060, "Duplicate column name 'retries'")
[SQL: ALTER TABLE radiusserver ADD COLUMN retries INTEGER]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add column 'smtpserver.timeout'
(MySQLdb.OperationalError) (1060, "Duplicate column name 'timeout'")
[SQL: ALTER TABLE smtpserver ADD COLUMN timeout INTEGER]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not create table eventcounter. Probably already exists!
(MySQLdb.OperationalError) (1050, "Table 'eventcounter' already exists")
[SQL: 
CREATE TABLE eventcounter (
	counter_name VARCHAR(80) NOT NULL, 
	counter_value INTEGER, 
	PRIMARY KEY (counter_name)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add column 'priority' to table 'policy'.
(MySQLdb.OperationalError) (1060, "Duplicate column name 'priority'")
[SQL: ALTER TABLE policy ADD COLUMN priority INTEGER NOT NULL DEFAULT '1']
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add tables for periodic tasks!
(MySQLdb.OperationalError) (1050, "Table 'periodictask' already exists")
[SQL: 
CREATE TABLE periodictask (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	name VARCHAR(64) NOT NULL, 
	active BOOL NOT NULL, 
	`interval` VARCHAR(256) NOT NULL, 
	nodes VARCHAR(256) NOT NULL, 
	taskmodule VARCHAR(256) NOT NULL, 
	ordering INTEGER NOT NULL, 
	last_update DATETIME(6) NOT NULL, 
	PRIMARY KEY (id), 
	UNIQUE (name)
)ROW_FORMAT=DYNAMIC

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add table for monitoring stats!
(MySQLdb.OperationalError) (1050, "Table 'monitoringstats' already exists")
[SQL: 
CREATE TABLE monitoringstats (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	timestamp DATETIME(6) NOT NULL, 
	stats_key VARCHAR(128) NOT NULL, 
	stats_value INTEGER NOT NULL, 
	PRIMARY KEY (id), 
	CONSTRAINT msix_1 UNIQUE (timestamp, stats_key)
)ROW_FORMAT=DYNAMIC

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
position column in eventhandler table obviously already exists.
(MySQLdb.OperationalError) (1060, "Duplicate column name 'position'")
[SQL: ALTER TABLE eventhandler ADD COLUMN position VARCHAR(10)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Creation of periodictasklastrun and periodictaskoption with shortened columns failed: OperationalError('(MySQLdb.OperationalError) (1050, "Table \'periodictasklastrun\' already exists")')
This is expected behavior if they were already present.
Successfully shortened columns of periodictasklastrun and periodictaskoption.
Adding of column "policies" in table pidea_audit failed: OperationalError('(MySQLdb.OperationalError) (1060, "Duplicate column name \'policies\'")')
This is expected behavior if this column already exists.
Adding of column "used_login" in table usercache failed: OperationalError('(MySQLdb.OperationalError) (1060, "Duplicate column name \'used_login\'")')
This is expected behavior if this column already exists.
Can not create table 'tokenowner'. It probably already exists
(MySQLdb.OperationalError) (1050, "Table 'tokenowner' already exists")
[SQL: 
CREATE TABLE tokenowner (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	token_id INTEGER, 
	resolver VARCHAR(120), 
	user_id VARCHAR(320), 
	realm_id INTEGER, 
	PRIMARY KEY (id), 
	FOREIGN KEY(realm_id) REFERENCES realm (id), 
	FOREIGN KEY(token_id) REFERENCES token (id)
)ROW_FORMAT=DYNAMIC

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Failed to migrate token assignment data!
(MySQLdb.OperationalError) (1054, "Unknown column 'token.resolver' in 'field list'")
[SQL: SELECT token.id AS token_id, token.serial AS token_serial, token.resolver AS token_resolver, token.resolver_type AS token_resolver_type, token.user_id AS token_user_id 
FROM token 
WHERE token.user_id != %s AND token.user_id IS NOT NULL]
[parameters: ('',)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add column 'smtpserver.enqueue_job'
(MySQLdb.OperationalError) (1060, "Duplicate column name 'enqueue_job'")
[SQL: ALTER TABLE smtpserver ADD COLUMN enqueue_job BOOL NOT NULL DEFAULT false]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
No admin policy active. No need to create 'tokenlist' action.
Could not create table policycondition: OperationalError('(MySQLdb.OperationalError) (1050, "Table \'policycondition\' already exists")')
No admin policy active. No need to create 'periodictask_read,mresolverread,edumfaserver_read,radiusserver_read,smtpserver_read,eventhandling_read,policyread,resolverread,caconnectorread,smsgateway_read,statistics_read,configread' action.
Failed to add 'node' column to 'clientapplication' table
(MySQLdb.OperationalError) (1060, "Duplicate column name 'node'")
[SQL: ALTER TABLE clientapplication ADD COLUMN node VARCHAR(255) NOT NULL DEFAULT 'localnode']
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Adding of column "adminuser" in table policy failed: OperationalError('(MySQLdb.OperationalError) (1060, "Duplicate column name \'adminuser\'")')
This is expected behavior if this column already exists.
Adding of column "pinode" in table policy failed: OperationalError('(MySQLdb.OperationalError) (1060, "Duplicate column name \'pinode\'")')
This is expected behavior if this column already exists.
Could not add duration and startdate to the table pidea_audit.
(MySQLdb.OperationalError) (1060, "Duplicate column name 'duration'")
[SQL: ALTER TABLE pidea_audit ADD COLUMN duration DATETIME(6)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Good. Column adminrealm already exists.
Could not add table 'userattribute'.
(MySQLdb.OperationalError) (1050, "Table 'customuserattribute' already exists")
[SQL: 
CREATE TABLE customuserattribute (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	user_id VARCHAR(320), 
	resolver VARCHAR(120), 
	realm_id INTEGER, 
	`Key` VARCHAR(255) NOT NULL, 
	`Value` TEXT, 
	`Type` VARCHAR(100), 
	PRIMARY KEY (id), 
	FOREIGN KEY(realm_id) REFERENCES realm (id)
)

]
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'policy.edumfanode' in 'field list'")
[SQL: SELECT policy.id AS policy_id, policy.active AS policy_active, policy.check_all_resolvers AS policy_check_all_resolvers, policy.name AS policy_name, policy.scope AS policy_scope, policy.action AS policy_action, policy.realm AS policy_realm, policy.adminrealm AS policy_adminrealm, policy.adminuser AS policy_adminuser, policy.resolver AS policy_resolver, policy.edumfanode AS policy_edumfanode, policy.user AS policy_user, policy.client AS policy_client, policy.time AS policy_time, policy.priority AS policy_priority, policycondition_1.id AS policycondition_1_id, policycondition_1.policy_id AS policycondition_1_policy_id, policycondition_1.section AS policycondition_1_section, policycondition_1.`Key` AS `policycondition_1_Key`, policycondition_1.comparator AS policycondition_1_comparator, policycondition_1.`Value` AS `policycondition_1_Value`, policycondition_1.active AS policycondition_1_active 
FROM policy LEFT OUTER JOIN policycondition AS policycondition_1 ON policy.id = policycondition_1.policy_id ORDER BY policycondition_1.id]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

Configuration

  • eduMFA version: 1.4
  • Installation method: pypi
  • Python version: 3.10
  • Operating system: Ubuntu
  • Webserver: nginx
  • Token database: MySQL

Logs

(Background on this error at: https://sqlalche.me/e/14/e3q8)
Could not add column 'retry_if_failed'
(MySQLdb.OperationalError) (1060, "Duplicate column name 'retry_if_failed'")
[SQL: ALTER TABLE periodictask ADD COLUMN retry_if_failed BOOL NOT NULL DEFAULT true]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
[]
Traceback (most recent call last):
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
    self.dialect.do_execute(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute
    res = self._query(mogrified_query)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query
    db.query(q)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 257, in query
    _mysql.connection.query(self, query)
MySQLdb.OperationalError: (1054, "Unknown column 'policy.edumfanode' in 'field list'")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/edumfa/venv/bin/edumfa-manage", line 1718, in <module>
    manager.run()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask_script/__init__.py", line 417, in run
    result = self.handle(argv[0], argv[1:])
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask_script/__init__.py", line 386, in handle
    res = handle(*args, **config)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask_migrate/__init__.py", line 96, in wrapped
    f(*args, **kwargs)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/flask_migrate/__init__.py", line 271, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/alembic/command.py", line 403, in upgrade
    script.run_env()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/alembic/script/base.py", line 583, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/opt/edumfa/venv/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/edumfa/eduMFA/migrations/env.py", line 110, in <module>
    run_migrations_online()
  File "/opt/edumfa/eduMFA/migrations/env.py", line 100, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/opt/edumfa/venv/lib/python3.10/site-packages/alembic/runtime/environment.py", line 948, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/alembic/runtime/migration.py", line 627, in run_migrations
    step.migration_fn(**kw)
  File "/opt/edumfa/eduMFA/migrations/versions/fa07bd604a75.py", line 24, in upgrade
    pols = P.list_policies(scope=SCOPE.ENROLL,
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/log.py", line 148, in log_wrapper
    return func(*args, **kwds)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/policy.py", line 508, in list_policies
    reduced_policies = self.policies
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/policy.py", line 430, in policies
    return get_config_object().policies
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/config.py", line 344, in get_config_object
    store['config_object'] = shared_config.reload_and_clone()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/config.py", line 197, in reload_and_clone
    self._reload_from_db()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/edumfa/lib/config.py", line 145, in _reload_from_db
    for pol in Policy.query.all():
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2773, in all
    return self._iter().all()
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2916, in _iter
    result = self.session.execute(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1717, in execute
    result = conn._execute_20(statement, params or {}, execution_options)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
    ret = self._execute_context(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
    self._handle_dbapi_exception(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
    util.raise_(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
    self.dialect.do_execute(
  File "/opt/edumfa/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute
    res = self._query(mogrified_query)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query
    db.query(q)
  File "/opt/edumfa/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 257, in query
    _mysql.connection.query(self, query)

edumfa-schema-upgrade: Unknown column 'policy.edumfanode' in 'field list'

I run edumfa-schema-upgrade eduMFA/migrations/ and got this error message:

sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'policy.edumfanode' in 'field list'") [SQL: SELECT policy.id AS policy_id, policy.active AS policy_active, policy.check_all_resolvers AS policy_check_all_resolvers, policy.name AS policy_name, policy.scope AS policy_scope, policy.action AS policy_action, policy.realm AS policy_realm, policy.adminrealm AS policy_adminrealm, policy.adminuser AS policy_adminuser, policy.resolver AS policy_resolver, policy.edumfanode AS policy_edumfanode, policy.user AS policy_user, policy.client AS policy_client, policy.time AS policy_time, policy.priority AS policy_priority, policycondition_1.id AS policycondition_1_id, policycondition_1.policy_id AS policycondition_1_policy_id, policycondition_1.section AS policycondition_1_section, policycondition_1.KeyASpolicycondition_1_Key, policycondition_1.comparator AS policycondition_1_comparator, policycondition_1.ValueASpolicycondition_1_Value, policycondition_1.active AS policycondition_1_active FROM policy LEFT OUTER JOIN policycondition AS policycondition_1 ON policy.id = policycondition_1.policy_id ORDER BY policycondition_1.id] (Background on this error at: https://sqlalche.me/e/14/e3q8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.