@@ -192,9 +192,9 @@ sepgsql-regtest 1.04
192
192
193
193
<para>
194
194
Third, turn on <literal>sepgsql_regression_test_mode</>.
195
- We don't enable all the rules in <filename>sepgsql-regtest</>
196
- by default, for your system's safety.
197
- The <literal>sepgsql_regression_test_mode</literal> parameter enables
195
+ For security reasons, the rules in <filename>sepgsql-regtest</>
196
+ are not enabled by default;
197
+ the <literal>sepgsql_regression_test_mode</literal> parameter enables
198
198
the rules needed to launch the regression tests.
199
199
It can be turned on using the <command>setsebool</> command:
200
200
</para>
@@ -415,43 +415,38 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100;
415
415
<title>DDL Permissions</title>
416
416
<para>
417
417
<productname>SELinux</> defines several permissions to control common
418
- operations for each object types ; such as creation, alter, drop and
419
- relabel of security label. In addition, several object types has its
420
- special permissions to control its characteristic operations; such as
421
- addition or deletion of name entries underlying a particular schema.
418
+ operations for each object type ; such as creation, alter, drop and
419
+ relabel of security label. In addition, several object types have
420
+ special permissions to control their characteristic operations; such as
421
+ addition or deletion of name entries within a particular schema.
422
422
</para>
423
423
<para>
424
- When <literal>CREATE</> command is executed, <literal>create</> will
424
+ When a <literal>CREATE</> command is executed, <literal>create</> will
425
425
be checked on the object being constructed for each object types.
426
- A default security label shall be assigned on the new database object,
427
- and the <literal>create</> permission needs to be allowed on the pair
426
+ A default security label will be assigned to the new database object,
427
+ and the <literal>create</> permission will be checked on the pair
428
428
of security label of the client and the new object itself.
429
- We consider <xref linkend="sql-createtable"> construct a table and
430
- underlying columns at the same time, so it requires users permission
431
- to create both of table and columns.
429
+ We consider <xref linkend="sql-createtable"> to construct a table and
430
+ underlying columns at the same time, so it requires the users to have
431
+ permission to create both the table and its columns.
432
432
</para>
433
433
<para>
434
434
A few additional checks are applied depending on object types.
435
435
On <xref linkend="sql-createdatabase">, <literal>getattr</> permission
436
- shall be checked on the source or template database of the new database,
436
+ will be checked on the source or template database of the new database,
437
437
not only <literal>create</> on the new database.
438
- On creation of objects underlying a particula schema (tables, views,
439
- sequences and procedures), <literal>add_name</> shall be also chechked
438
+ On creation of objects within a particula schema (tables, views,
439
+ sequences and procedures), <literal>add_name</> will be also chechked
440
440
on the schema, not only <literal>create</> on the new object itself.
441
441
</para>
442
442
443
443
<para>
444
444
When <literal>DROP</> command is executed, <literal>drop</> will be
445
- checked on the object being removed for each object types.
446
- Please note that it shall not be checked on the objects removed by
447
- cascaded deletion according to the standard manner in SQL.
448
- </para>
449
- <para>
450
- A few additional checks are applied depending on object types.
451
- On deletion of objects underlying a particula schema (tables, views,
452
- sequences and procedures), <literal>remove_name</> shall be also checked
453
- on the schema, not only <literal>drop</> on the object being removed
454
- itself.
445
+ checked on the object being removed for each object types. Permissions
446
+ will not be checked for objects dropped indirectly via <literal>CASCADE</>.
447
+ Deletion of objects contained within a particular schema (tables, views,
448
+ sequences and procedures) additionally requires
449
+ <literal>remove_name</> on the schema.
455
450
</para>
456
451
457
452
<para>
@@ -526,22 +521,22 @@ postgres=# SELECT cid, cname, show_credit(cid) FROM customer;
526
521
</sect3>
527
522
528
523
<sect3>
529
- <title>Dynamic domain transitions </title>
524
+ <title>Dynamic Domain Transitions </title>
530
525
<para>
531
526
It is possible to use SELinux's dynamic domain transition feature
532
527
to switch the security label of the client process, the client domain,
533
528
to a new context, if that is allowed by the security policy.
534
- The client domain needs the ' setcurrent' permission and also
535
- ' dyntransaction' from the old to the new domain.
529
+ The client domain needs the <literal> setcurrent</> permission and also
530
+ <literal> dyntransaction</> from the old to the new domain.
536
531
</para>
537
532
<para>
538
- Dynamic domain transitions should be considered carefully, because it
539
- means we allows users to switch their label (also peforms a set of
540
- privileges in SELinux model) in arbitrary way, unlike regular
541
- mandatory way such as trusted procedures .
542
- Thus, The dyntransition permission is only considered safe when used
543
- to switch to a domain with a smaller set of privileges than the
544
- original one, for example:
533
+ Dynamic domain transitions should be considered carefully, because they
534
+ allow users to switch their label, and therefore their privileges, in
535
+ at their option, rather than (as in the case of a trusted procedure)
536
+ as mandated by the system .
537
+ Thus, the <literal> dyntransition</literal> permission is only considered
538
+ safe when used to switch to a domain with a smaller set of privileges than
539
+ the original one. For example:
545
540
</para>
546
541
<screen>
547
542
regression=# select sepgsql_getcon();
@@ -561,29 +556,29 @@ ERROR: SELinux: security policy violation
561
556
</screen>
562
557
<para>
563
558
In this example above we were allowed to switch from the larger MCS
564
- range c1.c1023 to the smaller range c1.c4, but switching back was
565
- denied.
559
+ range <literal> c1.c1023</> to the smaller range <literal> c1.c4</> , but
560
+ switching back was denied.
566
561
</para>
567
562
<para>
568
563
A combination of dynamic domain transition and trusted procedure
569
- enables an interesting use case that fits typical process life-
564
+ enables an interesting use case that fits the typical process life-
570
565
cycle of connection pooling software.
571
566
Even if your connection pooling software is not allowed to run most
572
- of SQL commands, it shall be available to switch the security label
573
- of the client using <literal>sepgsql_setcon()</literal> function
574
- to be invoked inside of the trusted procedure; that should take some
567
+ of SQL commands, you can allow it to switch the security label
568
+ of the client using the <literal>sepgsql_setcon()</literal> function
569
+ from within a trusted procedure; that should take some
575
570
credential to authorize the request to switch the client label.
576
- After that, this session performs with privileges of the user being
577
- switched, but it shall be unavailable to reference database objects
578
- labeled as other user's one.
579
- Then, it can revert the security label alsp using
580
- <literal>sepgsql_setcon() </literal> with <literal>NULL</literal>
581
- argument, unless the security policy prevent it .
582
- The points of this use case are the trusted procedure is only way
583
- for the connection pooling software to switch security label of
584
- the clinet, and the trusted procedure does not work without
585
- appropriate credentials. In addition, it is also a point that the
586
- table to store credentials is only visible from trusted procedure .
571
+ After that, this session will have the privileges of the target user,
572
+ rather than the connection pooler.
573
+ The connection pooler can later revert the security label change by
574
+ again using <literal>sepgsql_setcon()</literal> with
575
+ <literal>NULL </literal> argument, again invoked from within a trusted
576
+ procedure with appropriate permissions checks .
577
+ The point here is that only the trusted procedure actually has permission
578
+ to change the effective security label, and only does so when given proper
579
+ credentials. Of course, for secure operation, the credential store must
580
+ (table, procedure definition, or whatever) must be protected from
581
+ unauthorized access .
587
582
</para>
588
583
</sect3>
589
584
@@ -618,8 +613,8 @@ ERROR: SELinux: security policy violation
618
613
<entry>
619
614
Switches the client domain of the current session to the new domain,
620
615
if allowed by the security policy.
621
- It also accepts <literal>NULL</literal> input, and it shall be
622
- considered as a transition to the original one .
616
+ It also accepts <literal>NULL</literal> input as a request to transition
617
+ to the client's original domain .
623
618
</entry>
624
619
</row>
625
620
<row>
@@ -655,8 +650,8 @@ ERROR: SELinux: security policy violation
655
650
<term>Data Definition Language (DDL) Permissions</term>
656
651
<listitem>
657
652
<para>
658
- Due to implementation restrictions, some of DDL permissions are not
659
- checked .
653
+ Due to implementation restrictions, some DDL operations do not
654
+ check permissions .
660
655
</para>
661
656
</listitem>
662
657
</varlistentry>
@@ -665,7 +660,8 @@ ERROR: SELinux: security policy violation
665
660
<term>Data Control Language (DCL) Permissions</term>
666
661
<listitem>
667
662
<para>
668
- Due to implementation restrictions, DCL permissions are not checked.
663
+ Due to implementation restrictions, DCL operations do not check
664
+ permissions.
669
665
</para>
670
666
</listitem>
671
667
</varlistentry>
0 commit comments