63 Commits

Author SHA1 Message Date
Markus Mäkelä
ec045b7ab6 MXS-1354: Add creation of basic user via MaxAdmin
MaxAdmin can now create basic users for both network and UNIX domain
socket use. Currently the basic and admin types have the same permissions
in maxadmin but for the REST API, only admin accounts can modify MaxScale.
2017-08-18 10:28:21 +03:00
Markus Mäkelä
2708942762 MXS-1354: Store users in a new format
The users are now stored as an array of JSON objects. Legacy users are
automatically upgraded once they are loaded and a backup of the original
users file is created.

Removed the password parameter from the `remove user` maxadmin command as
well as all of the relevant functions. Requiring that an administrator
knows the password of the account to be deleted is not a sound requirement
now that, at least in theory, two types of accounts can be created.
2017-08-18 10:28:20 +03:00
Markus Mäkelä
253d6d211f MXS-1354: Allow creation of basic users
The type of the user being created is defined at creation time. This
allows the creation of basic users.

Although the users can be created internally, they cannot yet be created
via maxadmin or the REST API.
2017-08-18 10:28:20 +03:00
Markus Mäkelä
a48758a9d8 MXS-1354: Take REST API authorization into use
GET requests are allowed for all users while POST, PATCH, DELETE and PUT
requests are reserved for administrative users.
2017-08-18 10:28:20 +03:00
Markus Mäkelä
f0c2843195 MXS-1354: Fix diagnostic output
The tests failed due to changes in the diagnostic output.
2017-08-18 10:28:20 +03:00
Markus Mäkelä
af4e852649 MXS-1354: Take refactored users into use
The refactored interface is now in use. The only module that used it
directly was the CDC protocol module. This should probably be changed so
that it uses the adminusers interface instead of the users interface
directly.
2017-08-18 10:28:20 +03:00
Markus Mäkelä
92bc3f046e Fix build failures on CentOS 6
Removed superfluous thread_local storage specifier from adminusers.cc and
fixed signed to unsigned integer comparisons in qc_sqlite.cc.
2017-08-02 15:44:45 +03:00
Markus Mäkelä
854c4a1ed3 Add support for non-glibc systems
MaxScale can now be built on systems that use an alternative libc
implementation e.g. musl.
2017-08-02 11:51:55 +03:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Markus Mäkelä
1067fd352c MXS-1220: Add creation and deletion of admin users
Admin users can now be created via the REST API. This allows remote
management of the administrative interface itself.
2017-05-24 15:05:11 +03:00
Markus Mäkelä
ead9059eeb MXS-1220: Add /users/ resource
The /users/ resource shows all user accounts that can be used with
MaxScale. This resource is further split into two resource collections,
/users/inet and /users/unix, which contain the network users and Linux
accounts respectively.
2017-05-24 15:05:10 +03:00
Markus Mäkelä
52e0cc8e16 MXS-1220: Add HTTP BA authentication
The admin interface now supports Basic Access authentication. This is not
a secure method of authentication and it should not be used without
unencrypted connections.

Made the admin interface port, authentication, username and password
configurable.
2017-05-04 09:12:15 +03:00
Johan Wikman
f82232eac6 Compile adminusers.c as C++ 2017-03-24 09:21:20 +02:00