26 Commits

Author SHA1 Message Date
Esa Korhonen
0996b9217a MXS-2544 Check roles in PAM authenticator
Also re-adds anonymous user support.
2019-07-16 11:36:11 +03:00
Esa Korhonen
d0e18b165a MXS-2544 Use separate sqlite tables for user authentication data
The data is now split into three tables similar to the server.
2019-07-16 10:59:15 +03:00
Esa Korhonen
f752f139ba MXS-2544 Add utility class for handling SQLite
Preparation and cleanup for adding more data to handle user roles in PAM
authenticator.
2019-07-16 10:58:47 +03:00
Esa Korhonen
166d26ff13 Avoid using SQLITE_OPEN_URI
Centos6 uses a very old version of SQLite without support for URI filenames.
PAM authenticator must use a file-based database.

Commit cherry-picked to 2.4.0 from 2.3.
2019-06-27 15:18:49 +03:00
Johan Wikman
2ab9aa9a94 Update 2.4.0 Change Date 2019-06-25 09:19:55 +03:00
Marko
004e8e638f MXS-2480 Fix creating of the in memory sqlite3 databases in PAMAuth
SQLITE_OPEN_URI flag was missing causing the databases to be created in
disk instead of in memory. Also added info level log message from created
database in clustrixmonitor.
2019-05-20 09:11:58 +03:00
Markus Mäkelä
6625c1296b
Format authenticator and protocol modules 2019-05-10 10:31:12 +03:00
Esa Korhonen
afe41c38ed Merge branch '2.3' into develop 2019-02-20 10:33:14 +02:00
Esa Korhonen
48a6ab503e MXS-2292 PAM authenticator detects anonymous users with defined hosts
This allows anonymous user mapping from well-defined hosts.
2019-02-19 10:40:23 +02:00
Johan Wikman
1fed465fdb MXS-2246 Remove duplicate info in SERVICE and Service
Both of them contained fields for the service and router names.
Now the names are in SERVICE and they must be accessed via member
function.
2019-02-14 15:24:10 +02:00
Esa Korhonen
40485d746c MXS-2220 Change server name to constant string 2019-01-03 12:13:15 +02:00
Johan Wikman
c0c9a9858d MXS-2197 Rename maxscale/log.h to maxscale/log.hh
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
Esa Korhonen
3e5818fcb6 MXS-2205 Convert mysql_utils.h to .hh 2018-12-03 14:05:21 +02:00
Markus Mäkelä
75ea1b6ea1
Fix formatting of new(std::nothrow)
The code previously formatted everything as `new( std::nothrow)`.
2018-10-04 21:50:44 +03:00
Markus Mäkelä
71ffef5708
Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
Niclas Antti
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
Johan Wikman
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
Johan Wikman
cf0aeed516 MXS-2014 Rename log_manager.h to log.h
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
Markus Mäkelä
b20decfe1c
MXS-1929: Output const strings from serviceGetUser
The values aren't meant to be modified by the caller.
2018-08-06 21:20:29 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Esa Korhonen
5d010ff712 Cleanup SERVER struct
Removed one unused field. Rearranged others, clarified comments.
2018-04-27 10:48:56 +03:00
Esa Korhonen
cb0ac44e1f MXS-1758 Support anonymous user with proxy grant for PAM
This allows using user group mapping with PAM authenticator.
2018-04-24 15:22:01 +03:00
Esa Korhonen
aa260cf6cf MXS-1716 Reduce the amount of duplicate elements in users db for PAM
The database-level query now only takes rows with either a global
select privileges or non-null database privileges. The table-level
query only accepts non-null databases and no global privileges,
as users with global select are added by the previous section.
2018-03-19 15:09:36 +02:00
Esa Korhonen
04666b4b31 MXS-1716 Add diagnostic functions to PAM Authenticator
The functions print the user information. Normal version just prints
user@host, the json-version prints the whole array.
2018-03-19 11:02:14 +02:00
Markus Mäkelä
f6f34ad7e5 Fix debug build failure on CentOS 6
The build failed due to a comparison between signed and unsigned integers.
2018-01-15 16:14:50 +02:00
Esa Korhonen
7488129afc PAM code cleanup & refactor
Divided functionality into classes, fixed comments +
various other cleanup. BackenAuth no longer increments
sequence on sending password. SQLite busy timeout shortened
to 1 second.
2017-08-07 12:22:59 +03:00