4
:program:`auth_schema` is an authentication plugin that authenticates
5
connections using a MySQL-like table with SHA1 password hashes. Unlike
6
MySQL, the auth table is not built-in and there are no default or anonymous
7
users. Since a user must authenticate to create the auth table but no
8
users can authenticate until the auth table is created, this circular
9
dependency is resolved by temporarily using another authentication plugin.
10
See the :ref:`auth_schema_examples`.
12
.. note:: Unload the :doc:`/plugins/auth_all/index` plugin before using this plugin.
13
.. seealso:: :doc:`/administration/authentication`
15
.. _auth_schema_loading:
20
To load this plugin, start :program:`drizzled` with::
22
--plugin-add=auth_schema
24
Loading the plugin may not enable or configure it. See the plugin's
25
:ref:`auth_schema_configuration` and :ref:`auth_schema_variables`.
27
.. seealso:: :doc:`/options` for more information about adding and removing plugins.
29
.. _auth_schema_configuration:
34
These command line options configure the plugin when :program:`drizzled`
35
is started. See :doc:`/configuration` for more information about specifying
40
.. option:: --auth-schema.table ARG
42
:Default: ``auth.users``
43
:Variable: :ref:`auth_schema_table <auth_schema_table>`
45
Schema-qualified table with ``user`` and ``password`` columns. Quoting the auth table
46
in backticks is optional. The auth table name can only contain one period between the
47
schema name and the table name.
49
.. _auth_schema_variables:
54
These variables show the running configuration of the plugin.
55
See `variables` for more information about querying and setting variables.
57
.. _auth_schema_enabled:
59
* ``auth_schema_enabled``
65
If :program:`auth_schema` is enabled or disabled. If the plugin is
66
disabled, all authentication is denied.
68
.. _auth_schema_table:
70
* ``auth_schema_table``
74
:Option: :option:`--auth-schema.table`
76
Schema-qualified table with ``user`` and ``password`` columns.
78
.. _auth_schema_examples:
83
Start Drizzle with the default :doc:`/plugins/auth_all/index` plugin and
84
create the initial auth schema and table:
91
user VARCHAR(255) NOT NULL,
93
UNIQUE INDEX user_idx (user)
96
Create a user account called ``susan`` with password ``herpass``:
100
INSERT INTO auth.users (user, password) VALUES ('susan', MYSQL_PASSWORD('herpass'));
102
Restart Drizzle with just the :program:`auth_schema` plugin:
106
bin/drizzled --shutdown
108
--plugin-remove=auth_all \
109
--plugin-add=auth_schema
116
ERROR 1045 (28000): Access denied for user 'daniel' (using password: NO)
118
$ drizzle --user susan
119
ERROR 1045 (28000): Access denied for user 'susan' (using password: NO)
121
$ drizzle --user susan --password=wrongpass
122
ERROR 1045 (28000): Access denied for user 'susan' (using password: YES)
124
$ drizzle --user=susan --password=herpass
125
Welcome to the Drizzle client.. Commands end with ; or \g.
128
.. _auth_schema_authors:
135
.. _auth_schema_version:
140
This documentation applies to **auth_schema 1.0**.
142
To see which version of the plugin a Drizzle server is running, execute:
144
.. code-block:: mysql
146
SELECT MODULE_VERSION FROM DATA_DICTIONARY.MODULES WHERE MODULE_NAME='auth_schema'