Hi Cornelius,
ok, here we go:
I added the SQL resolver on the commandline. The mapping is done
automatically, i think.
cd /opt/privacyidea/
source bin/activate
./bin/pi-manage resolver create_internal myfirstresolver
Inside MariaDB it looks like this:
[root@server ~]# echo “select * from resolver;” | mysql -u privacyID3A -p
privacyidea
id name rtype
6 myfirstresolver sqlresolver
[root@server ~]# echo “select * from resolverconfig where resolver_id = 6;”
| mysql -u privacyID3A -p privacyidea
id resolver_id Key Value Type Description
38 6 Database privacyidea string
39 6 Driver mysql string
40 6 Editable 1 int
42 6 Limit 500 int
37 6 Map {“userid”: “id”, “username”: “username”,
“email”:“email”, “password”: “password”, “phone”:“phone”,
“mobile”:“mobile”, “surname”:“surname”, “givenname”:“givenname”,
“description”: “description”} string
45 6 Password ******************************
password
41 6 Server localhost string
44 6 Table users_myfirstresolver string
43 6 User privacyID3A string
Here’s my pi.cfg
[root@server ~]# cat /etc/privacyidea/pi.cfg
The realm, where users are allowed to login as administrators
SUPERUSER_REALM = [‘super’, ‘administrators’]
Your database
SQLALCHEMY_DATABASE_URI =
‘mysql://privacyID3A:****************@localhost/privacyidea’
This is used to encrypt the auth_token
SECRET_KEY = ‘*************’
This is used to encrypt the admin passwords
PI_PEPPER = “***************”
This is used to encrypt the token data and token passwords
PI_ENCFILE = ‘/etc/privacyidea/enckey’
This is used to sign the audit log
PI_AUDIT_KEY_PRIVATE = '/etc/privacyidea/private.pem’
PI_AUDIT_KEY_PUBLIC = '/etc/privacyidea/public.pem’
PI_LOGFILE = '/var/log/privacyidea/privacyidea.log’
PI_LOGLEVEL = 50
PI_INIT_CHECK_HOOK = ‘your.module.function’
If i add a new user, all attributes are saved correctly to the database and
i can log in, enroll and use tokens.
Do you need anything else?
Best regards from Hamburg,
Sönke