1
.. _auth_schema_plugin:
6
:program:`auth_schema` is an authentication plugin that authenticates
7
connections using a MySQL-like table with SHA1 password hashes. Unlike
8
MySQL, the auth table is not built-in and there are no default or anonymous
9
users. Since a user must authenticate to create the auth table but no
10
users can authenticate until the auth table is created, this circular
11
dependency is resolved by temporarily using another authentication plugin.
12
See the :ref:`auth_schema_examples`.
16
Unload the :doc:`/plugins/auth_all/index` plugin before using this plugin.
18
.. seealso:: :doc:`/administration/authentication`
20
.. _auth_schema_loading:
25
To load this plugin, start :program:`drizzled` with::
27
--plugin-add=auth_schema
29
Loading the plugin may not enable or configure it. See the plugin's
30
:ref:`auth_schema_configuration` and :ref:`auth_schema_variables`.
32
.. seealso:: :ref:`drizzled_plugin_options` for more information about adding and removing plugins.
34
.. _auth_schema_configuration:
39
These command line options configure the plugin when :program:`drizzled`
40
is started. See :ref:`command_line_options` for more information about specifying
45
.. option:: --auth-schema.table ARG
47
:Default: ``auth.users``
48
:Variable: :ref:`auth_schema_table <auth_schema_table>`
50
Schema-qualified table with ``user`` and ``password`` columns. Quoting the auth table
51
in backticks is optional. The auth table name can only contain one period between the
52
schema name and the table name.
54
.. _auth_schema_variables:
59
These variables show the running configuration of the plugin.
60
See `variables` for more information about querying and setting variables.
62
.. _auth_schema_enabled:
64
* ``auth_schema_enabled``
70
If :program:`auth_schema` is enabled or disabled. If the plugin is
71
disabled, all authentication is denied.
73
.. _auth_schema_table:
75
* ``auth_schema_table``
79
:Option: :option:`--auth-schema.table`
81
Schema-qualified table with ``user`` and ``password`` columns.
83
.. _auth_schema_examples:
88
Start Drizzle with the default :doc:`/plugins/auth_all/index` plugin and
89
create the initial auth schema and table:
96
user VARCHAR(255) NOT NULL,
98
UNIQUE INDEX user_idx (user)
101
Create a user account called ``susan`` with password ``herpass``:
103
.. code-block:: mysql
105
INSERT INTO auth.users (user, password) VALUES ('susan', MYSQL_PASSWORD('herpass'));
107
Restart Drizzle with just the :program:`auth_schema` plugin:
111
bin/drizzled --shutdown
113
--plugin-remove=auth_all \
114
--plugin-add=auth_schema
121
ERROR 1045 (28000): Access denied for user 'daniel' (using password: NO)
123
$ drizzle --user susan
124
ERROR 1045 (28000): Access denied for user 'susan' (using password: NO)
126
$ drizzle --user susan --password=wrongpass
127
ERROR 1045 (28000): Access denied for user 'susan' (using password: YES)
129
$ drizzle --user=susan --password=herpass
130
Welcome to the Drizzle client.. Commands end with ; or \g.
133
.. _auth_schema_authors:
140
.. _auth_schema_version:
145
This documentation applies to **auth_schema 1.0**.
147
To see which version of the plugin a Drizzle server is running, execute:
149
.. code-block:: mysql
151
SELECT MODULE_VERSION FROM DATA_DICTIONARY.MODULES WHERE MODULE_NAME='auth_schema'