Traditional authentication (client) fbclient library isc_dpb_user_name isc_dpb_password ......... Environment variables isc_dpb_user_name isc_dpb_password ......... Login/password may be picked up from environment by client library ISC_USER=..
Traditional authentication (server) Network listener Database engine Validation in security database isc_dpb_user_name isc_dpb_password ......... isc_dpb_user_name isc_dpb_password Validation is performed by DB engine
Trusted Authentication (client) ......... ......... isc_dpb_user_name isc_dpb_password ......... Environment variables fbclient library Login is picked up from environmnet (backward compatibility) ISC_USER=..
Trusted Authentication (client) isc_dpb_trusted isc_dpb_trusted ......... ......... Environment variables fbclient library Adding isc_dpb_trusted by application to force trusted auth. ISC_USER=..
Trusted Authentication (server) isc_dpb_trusted Network listener .......... isc_dpb_trusted ......... DB engine Host OS validation (callback) Network listener does all work, on success puts internal tag into DPB.
Trusted Authentication (server) isc_dpb_trusted Network listener .......... isc_dpb_trusted ......... isc_dpb_trusted Host OS validation (callback) DB engine Safe - network listener removes extra isc_dpb_trusted tags from DPB
Firebird 2.5 - what's new
Fixed vulnerabilities
Attack on server using large packets with garbage
New features
User management in SQL (CREATE / ALTER / DROP USER)
System role RDB$ADMIN
Configure mapping of domain administrators to RDB$ADMIN role using SQL
New GRANTED BY clause in GRANT and REVOKE operators
Firebird 2.5 - what's new
User management in SQL
CREATE USER name PASSWORD 'pw' FIRSTNAME 'first' MIDDLENAME 'middle' LASTNAME 'last'
ALTER USER name PASSWORD 'pw' FIRSTNAME 'first' MIDDLENAME 'middle' LASTNAME 'last'
DROP USER name
Firebird 2.5 - what's new
User management in SQL
In firebird 2.5 this commands always work with common security database security2.fdb
Alter User <Current_user> is available for all users, the rest – only to SYSDBA
Firebird 2.5 - what's new
System role RDB$ADMIN
GRANT “RDB$ADMIN” TO GUEST1
When attaching to current database with role RDB$ADMIN user GUEST1 will have all rights of database administrator (SYSDBA)
REVOKE “RDB$ADMIN” FROM GUEST1
Firebird 2.5 - what's new
Configure mapping of domain administrators to RDB$ADMIN role using SQL
ALTER ROLE RDB$ADMIN SET / DROP AUTO ADMIN MAPPING
This is restricted form of a command, planned to control mapping of host OS objects to database objects in firebird 3
Firebird 2.5 - what's new
New GRANTED BY clause in GRANT and REVOKE operators
Makes it possible for SYSDBA to revoke rights, granted by other users
Firebird 2.5 - what's new
sysdba:
CREATE ROLE role1;
GRANT role1 TO user1 WITH ADMIN OPTION;
user1:
GRANT role1 TO PUBLIC;
sysdba:
REVOKE role1 FROM PUBLIC GRANTED BY user1;
Firebird 3 (plan)
Authentication architecture review when using OSRI in firebird
Choose (at configuration level) any database as security database, including target database itself
Authentication plugins
Mapping OS objects to database objects (groups, users, etc.)
OSRI (Open System Relational Interface) Engine13 Yvalve Network listener User program (isql, php, etc.) Engine8_12 Network redirector Providers Clients In FB3 we plan to have OSRI alive again. How does it affect auth?
IB, FB1, FB2 – user authentication is in engine Yvalve Network listener Engine “ rear entrance” is used to avoid recursion politically correct - InterBase 4, 5, 6 TLS – Firebird 1, 2 Authentication Engine needs a way to call itself for authentication purporses without authentication – avoiding infinite recursion
Firebird3 - user authentication in network listener Yvalve Network listener Providers Engine8_12 Engine13 Network redirector Authentication Plugins trusted zone Authenticator and plugins can easily use all our API – in-process access to it. No need in any “rare entrance”.
Firebird 3 (plan)
Choose (at configuration level) any database as security database
<database alias1>
FileName = $(root)/db/data1.fdb
Security = $(root)/db/secure.fdb
</database>
<database inside>
FileName = /raid/data.fdb
Security = self
</database>
<database *>
FileName = $(arg0)
Security = $(root)/security2.fdb
</database>
Firebird 3 (plan)
Choose any database as security database – another configuration file format, same effect
[alias1]
FileName = $(root)/db/data1.fdb
Security = $(root)/db/secure.fdb
[inside]
FileName = /raid/data.fdb
Security = self
[*]
FileName = $(arg0)
Security = $(root)/security2.fdb
Firebird 3 (plan)
Authentication plugins
Use any authentication methods
Plugin samples
Current security database
Trusted authentication from 2.1
Trusted authentication based on asymmetric keys match: public – stored on server (in database), private – stored by client
Passwords verified in LDAP, PAM, etc.
Unlimited length of password
Use CHAP to validate passwords
Firebird 3 (plan)
Mapping OS objects to database objects
Configured on per-database basis using SQL:
ALTER ROLE name ADD OS_NAME 'os_name'
ALTER USER name ADD OS_NAME 'os_name'
ALTER ROLE name DROP OS_NAME 'os_name'
ALTER USER name DROP OS_NAME 'os_name'
(syntax may be changed)
Firebird 3 (plan)
Mapping OS objects to database objects
OS object may be mapped not more then to single user and single role
ALTER USER user1 ADD OS_NAME 'guest'
ALTER USER user2 ADD OS_NAME 'guest'
Running second command throws an error
Firebird 3 (plan)
Mapping OS objects to database objects
Security plugin builds a list of OS objects, each of them is assiggned a kind of priority – lower digit means higher priority.
Priority 0 means 'use this object as current_user unconditionally'
Providers use information from this list (passed in DPB) to obtain CURRENT_USER and CURRENT_ROLE values.
Firebird 3 (plan)
Mapping OS objects to database objects
Sample 1 – authentication in security database
Security database authentication (when successful) puts single object in a list:
This presentation was made by Alex Peshkoff, Firebi more
This presentation was made by Alex Peshkoff, Firebird Core developer in 2008 at Bergamo Firebird Conference. Alex is responsible for implementing security plans in Firebird, and here he gives insights on past issues with security in InterBase, caused by Borland "workarounds", and introduces brand new approach for security in Firebird 2.5 and 3.0 less
0 comments
Post a comment