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

Implement sanity check for malformed pi.cfg #78

Open
fredreichbier opened this issue May 20, 2019 · 0 comments
Open

Implement sanity check for malformed pi.cfg #78

fredreichbier opened this issue May 20, 2019 · 0 comments

Comments

@fredreichbier
Copy link
Contributor

Appliance versions < 3.0 have the issue already mentioned in #60: If the pi-appliance tool reads and writes /etc/privacyidea/pi.cfg, some of the resulting values are malformed, e.g.:

import logging
PI_PEPPER = 'YKroh9ZXchPh2DUVRexdnrnr'
SQLALCHEMY_DATABASE_URI = 'mysql://pi:0MY3mjw6Tw8R@localhost/pi'
PI_AUDIT_SQL_TRUNCATE = 'True'
PI_ENCFILE = '/etc/privacyidea/enckey'
PI_AUDIT_KEY_PUBLIC = '/etc/privacyidea/public.pem'
PI_LOGLEVEL = logging.INFO
PI_LOGFILE = '/var/log/privacyidea/privacyidea.log'
PI_ENGINE_REGISTRY_CLASS = '"shared"'
PI_AUDIT_POOL_SIZE = '20'
PI_AUDIT_KEY_PRIVATE = '/etc/privacyidea/private.pem'
SECRET_KEY = 'tR2HbnXb7Tk8C1cwxTWE8yEG'
SUPERUSER_REALM = ['super']

Note that privacyIDEA still works because the malformed values are handled as follows:

Currently, the user has to edit the config file manually to restore the correct config values.

In the version of the pi-appliance tool, we could add a sanity check that detects the malformed pi.cfg above, and offers to fix the values automatically.

@fredreichbier fredreichbier added this to the 3.1 milestone May 20, 2019
@cornelinux cornelinux modified the milestones: 3.1, 3.2 Nov 19, 2019
@cornelinux cornelinux removed this from the 3.2 milestone May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants