mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:03:02 +01:00
Documentation changes for CORE-4607: Add support for having >1 UserManager in firebird.conf and use them from SQL
This commit is contained in:
parent
df0ecdac9a
commit
23c9e7e7fe
@ -13,7 +13,7 @@ Syntax is:
|
|||||||
ALTER USER name SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
ALTER USER name SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||||
ALTER CURRENT USER SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
ALTER CURRENT USER SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||||
CREATE OR ALTER USER name SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
CREATE OR ALTER USER name SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||||
DROP USER name;
|
DROP USER name [USING PLUGIN name];
|
||||||
|
|
||||||
where OPTIONS is a (probably empty) list of following options:
|
where OPTIONS is a (probably empty) list of following options:
|
||||||
- FIRSTNAME 'firstname'
|
- FIRSTNAME 'firstname'
|
||||||
@ -21,6 +21,7 @@ where OPTIONS is a (probably empty) list of following options:
|
|||||||
- LASTNAME 'lastname'
|
- LASTNAME 'lastname'
|
||||||
- ACTIVE
|
- ACTIVE
|
||||||
- INACTIVE
|
- INACTIVE
|
||||||
|
- USING PLUGIN name
|
||||||
|
|
||||||
and each TAG may have one of two forms:
|
and each TAG may have one of two forms:
|
||||||
name = 'string value'
|
name = 'string value'
|
||||||
@ -46,7 +47,10 @@ in ALTER USER statement. Also notice that PASSWORD clause is required when creat
|
|||||||
|
|
||||||
PASSWORD clause is enough self-descripting. Clauses FIRSTNAME, MIDDLENAME and LASTNAME too, but may
|
PASSWORD clause is enough self-descripting. Clauses FIRSTNAME, MIDDLENAME and LASTNAME too, but may
|
||||||
be also used to store any short information about user. Clauses INACTIVE/ACTIVE are used to disable
|
be also used to store any short information about user. Clauses INACTIVE/ACTIVE are used to disable
|
||||||
user's login to server not dropping it from the list and restoring that ability.
|
user's login to server not dropping it from the list and restoring that ability. USING PLUGIN clause
|
||||||
|
makes it possible to work with users not only with default management plugin (first listed in
|
||||||
|
UserManager parameter in firebird.conf) but also with others. gsec utility and services API do not
|
||||||
|
support multiple user management plugins - default one is always used.
|
||||||
|
|
||||||
TAGS is a list of end-user defined attributes. Length of the value should not exceed 255 bytes.
|
TAGS is a list of end-user defined attributes. Length of the value should not exceed 255 bytes.
|
||||||
Assigning name some value sets new or modifies existing tag. To remove the tag use DROP option.
|
Assigning name some value sets new or modifies existing tag. To remove the tag use DROP option.
|
||||||
@ -56,14 +60,14 @@ Notice - UID/GID, entered by deprecated gsec, are treated as tags in SQL interfa
|
|||||||
To access list of users please select from virtual tables SEC$USERS and SEC$USER_ATTRIBUTES.
|
To access list of users please select from virtual tables SEC$USERS and SEC$USER_ATTRIBUTES.
|
||||||
|
|
||||||
|
|
||||||
Samples:
|
Samples (suppose UserManager=Srp,Legacy_UserManager in firebird.conf):
|
||||||
|
|
||||||
Generic:
|
Generic:
|
||||||
CREATE USER alex PASSWORD 'test';
|
CREATE USER alex PASSWORD 'test';
|
||||||
ALTER USER alex SET FIRSTNAME 'Alex' LASTNAME 'Peshkoff';
|
ALTER USER alex SET FIRSTNAME 'Alex' LASTNAME 'Peshkoff';
|
||||||
CREATE OR ALTER USER alex SET PASSWORD 'IdQfA';
|
CREATE OR ALTER USER alex SET PASSWORD 'IdQfA';
|
||||||
DROP USER alex;
|
DROP USER alex;
|
||||||
ALTER CURRENT USER SET PASSWORD 'SomethingLongEnough';
|
ALTER CURRENT USER SET PASSWORD 'SomethingLongEnough' USING PLUGIN srp;
|
||||||
|
|
||||||
Working with tags:
|
Working with tags:
|
||||||
ALTER USER alex SET TAGS (a='a', b='b');
|
ALTER USER alex SET TAGS (a='a', b='b');
|
||||||
@ -88,16 +92,17 @@ Samples:
|
|||||||
Displaying users' list:
|
Displaying users' list:
|
||||||
SELECT CAST(U.SEC$USER_NAME AS CHAR(20)) LOGIN,
|
SELECT CAST(U.SEC$USER_NAME AS CHAR(20)) LOGIN,
|
||||||
CAST(A.SEC$KEY AS CHAR(10)) TAG,
|
CAST(A.SEC$KEY AS CHAR(10)) TAG,
|
||||||
CAST(A.SEC$VALUE AS CHAR(20)) "VALUE"
|
CAST(A.SEC$VALUE AS CHAR(20)) "VALUE",
|
||||||
|
SEC$PLUGIN "PLUGIN"
|
||||||
FROM SEC$USERS U LEFT JOIN SEC$USER_ATTRIBUTES A
|
FROM SEC$USERS U LEFT JOIN SEC$USER_ATTRIBUTES A
|
||||||
ON U.SEC$USER_NAME = A.SEC$USER_NAME;
|
ON U.SEC$USER_NAME = A.SEC$USER_NAME;
|
||||||
|
|
||||||
LOGIN TAG VALUE
|
LOGIN TAG VALUE PLUGIN
|
||||||
==================== ========== ====================
|
==================== ========== ==================== ===============================
|
||||||
SYSDBA <null> <null>
|
SYSDBA <null> <null> Srp
|
||||||
ALEX B x
|
ALEX B x Srp
|
||||||
ALEX C sample
|
ALEX C sample Srp
|
||||||
|
SYSDBA <null> <null> Legacy_UserManager
|
||||||
|
|
||||||
Notice!
|
Notice!
|
||||||
This feature highly depends upon user management plugin. Take into an account that some options
|
This feature highly depends upon user management plugin. Take into an account that some options
|
||||||
|
Loading…
Reference in New Issue
Block a user