@@ -48,29 +48,16 @@ Then you need to copy config-templates/module_webauthn.php to your config direct
4848Using storage
4949-------------
5050
51- You first need to setup the database.
51+ The database schema sets itself up on first use automatically. The schema can be
52+ found in the sources at src/WebAuthN/Store/Database.php (__ construct).
5253
53- Here is the initialization SQL script:
54+ If you want to trim down permissions for the database user, here is the minimal
55+ set of required permissions:
5456
5557``` sql
56- CREATE TABLE credentials (
57- creation_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
58- user_id VARCHAR (80 ) NOT NULL ,
59- credentialId VARCHAR (500 ) NOT NULL ,
60- credential MEDIUMBLOB NOT NULL ,
61- algo INT DEFAULT NULL ,
62- signCounter INT NOT NULL ,
63- friendlyName VARCHAR (100 ) DEFAULT " Unnamed Token" ,
64- UNIQUE (user_id,credentialId)
65- );
6658
6759GRANT SELECT ,INSERT,UPDATE ,DELETE ON ...credentials TO ' ...dbuser' @' 1.2.3.4' IDENTIFIED BY ' ...dbpass' ;
6860
69- CREATE TABLE userstatus (
70- user_id VARCHAR (80 ) NOT NULL ,
71- fido2Status ENUM(" FIDO2Disabled" ," FIDO2Enabled" ) NOT NULL DEFAULT " FIDO2Disabled" ,
72- UNIQUE (user_id)
73- );
7461
7562GRANT SELECT ON ...userstatus TO ' ...dbuser' @' 1.2.3.4' IDENTIFIED BY ' ...dbpass' ;
7663```
0 commit comments