@@ -307,14 +307,14 @@ $ restorecon -R /usr/local/pgsql/
307
307
Currently, <productname>sepgsql</productname> allows security labels to be
308
308
assigned to schemas, tables, columns, sequences, views, and functions.
309
309
When <productname>sepgsql</productname> is in use, security labels are
310
- automatically assigned to suppoted database objects at creation time.
310
+ automatically assigned to supported database objects at creation time.
311
311
This label is called as a default security label, being decided according
312
312
to the system security policy, which takes as input the creator's label
313
313
and the label assigned to the new object's parent object.
314
314
</para>
315
315
316
316
<para>
317
- A new database object basically inherits security label of the parent
317
+ A new database object basically inherits the security label of the parent
318
318
object, except when the security policy has special rules known as
319
319
type-transition rules, in which case a different label may be applied.
320
320
The meaning of the term "parent object" varies by object class, as follows.
@@ -365,7 +365,7 @@ $ restorecon -R /usr/local/pgsql/
365
365
<term>function</term>
366
366
<listitem>
367
367
<para>
368
- Its parent object is the containing schema.
368
+ The parent object is the containing schema.
369
369
</para>
370
370
</listitem>
371
371
</varlistentry>
@@ -383,18 +383,18 @@ $ restorecon -R /usr/local/pgsql/
383
383
<para>
384
384
DML statements are used to reference or modify contents within
385
385
the specified database objects; such as tables or columns.
386
- We basically checks access rights of the client on all the objects
386
+ The access rights of the client are checked on all the objects
387
387
mentioned in the given statement, and the kind of privileges checked
388
388
depend on the class of the object and the type of access.
389
389
</para>
390
390
391
391
<para>
392
392
For tables, <literal>db_table:select</>, <literal>db_table:insert</>,
393
393
<literal>db_table:update</> or <literal>db_table:delete</> is
394
- checked for all the appeared target tables depending on the sort of
394
+ checked for all the referenced target tables depending on the sort of
395
395
statement;
396
396
in addition, <literal>db_table:select</> is also checked for
397
- all the tables that containin the columns to be referenced in
397
+ all the tables that contain the columns referenced in the
398
398
<literal>WHERE</> or <literal>RETURNING</> clause, as a data source
399
399
of <literal>UPDATE</>, and so on.
400
400
</para>
@@ -404,23 +404,23 @@ $ restorecon -R /usr/local/pgsql/
404
404
UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100;
405
405
</synopsis>
406
406
407
- In this case, we must have <literal>db_table:select</>, not only
407
+ In this case, we must have <literal>db_table:select</> in addition to
408
408
<literal>db_table:update</>, because <literal>t1.a</> is referenced
409
- within <literal>WHERE</> clause. Column-level permissions will be
410
- checked as well, for each referenced column.
409
+ within the <literal>WHERE</> clause. Column-level permissions will also be
410
+ checked for each referenced column.
411
411
</para>
412
412
413
413
<para>
414
- The client must be allowed to reference all the appeared tables and
415
- columns, even if they are originated from views then expanded, because we
416
- intend to apply consistent access control rules independent from the
417
- manner in which the table contents are referenced.
414
+ The client must be allowed to access all referenced tables and
415
+ columns, even if they originated from views which were then expanded,
416
+ so that we apply consistent access control rules independent of the manner
417
+ in which the table contents are referenced.
418
418
</para>
419
419
420
420
<para>
421
421
For columns, <literal>db_column:select</> is checked on
422
422
not only the columns being read using <literal>SELECT</>, but being
423
- referenced in other DML statement .
423
+ referenced in other DML statements .
424
424
</para>
425
425
426
426
<para>
@@ -438,16 +438,15 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100;
438
438
on the <literal>t1.y</> being updated and referenced,
439
439
and <literal>db_column:select</> on the <literal>t1.z</> being only
440
440
referenced in the <literal>WHERE</> clause.
441
- Also note that <literal>db_table:{select update}</> shall be checked
442
- in the table-level granularity .
441
+ <literal>db_table:{select update}</> will also be checked
442
+ at the table level .
443
443
</para>
444
444
445
445
<para>
446
- For sequences, <literal>db_sequence:get_value</> when we reference
447
- a sequence object using <literal>SELECT</>; however, note that we
448
- cannot check permissions on execution of corresponding functions
449
- such as <literal>lastval()</> right now, although they performs same
450
- job, because here is no object access hook to acquire controls.
446
+ For sequences, <literal>db_sequence:get_value</> is checked when we
447
+ reference a sequence object using <literal>SELECT</>; however, note that we
448
+ do not currently check permissions on execution of corresponding functions
449
+ such as <literal>lastval()</>.
451
450
</para>
452
451
453
452
<para>
@@ -462,7 +461,7 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100;
462
461
</para>
463
462
464
463
<para>
465
- Here is a few more corner cases.
464
+ Here are a few more corner cases.
466
465
The default database privilege system allows database superusers to
467
466
modify system catalogs using DML commands, and reference or modify
468
467
toast tables. These operations are prohibited when
@@ -480,30 +479,24 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100;
480
479
</para>
481
480
482
481
<para>
483
- In a case when multiple label providers are installed and user tries
482
+ In the case where multiple label providers are installed and the user tries
484
483
to set a security label, but is not managed by <productname>SELinux</>,
485
484
only <literal>setattr</> should be checked here.
486
- This is currently not done due to implementation restrictions.
485
+ This is currently not checked due to implementation restrictions.
487
486
</para>
488
487
</sect3>
489
488
490
489
<sect3>
491
490
<title>Trusted Procedure</title>
492
491
<para>
493
- It is a similar idea to security definer functions or set-uid commands
494
- on operating systems. <productname>SELinux</> provides a feature to
495
- switch privilege of the client (that is a security label of the client
496
- for more correctness) during execution of certain functions; being
497
- called as trusted procedures.
498
- </para>
499
-
500
- <para>
501
- A trusted function is a function with a special security label being
502
- set up as a trusted procedure.
503
- So, we need to assign the special security label on the function that
504
- we hope it to perform as a trusted procedure, by administrative users.
505
- The default security policy also provides this special security label.
506
- See the following example.
492
+ Trusted procedures are similar to security definer functions or set-uid
493
+ commands. <productname>SELinux</> provides a feature to allow trusted
494
+ code to run using a security label different from that of the client,
495
+ generally for the purpose of providing highly controlled access to
496
+ sensitive data (e.g. rows might be omitted, or the precision of stored
497
+ values might be reduced). Whether or not a function acts as a trusted
498
+ procedure is controlled by its security label and the operating system
499
+ security policy. For example:
507
500
</para>
508
501
509
502
<screen>
@@ -527,7 +520,7 @@ SECURITY LABEL
527
520
</screen>
528
521
529
522
<para>
530
- Above operations shall be done by administrative users .
523
+ The above operations should be performed by an administrative user .
531
524
</para>
532
525
533
526
<screen>
@@ -544,14 +537,15 @@ postgres=# SELECT cid, cname, show_credit(cid) FROM customer;
544
537
<para>
545
538
In this case, a regular user cannot reference <literal>customer.credit</>
546
539
directly, but a trusted procedure <literal>show_credit</> enables us
547
- to print credit number of customers with a bit modification.
540
+ to print the credit card number of customers with some of the digits masked
541
+ out.
548
542
</para>
549
543
</sect3>
550
544
551
545
<sect3>
552
546
<title>Miscellaneous</title>
553
547
<para>
554
- In this version, we reject <xref linkend="sql-load"> command across
548
+ In this version, we reject the <xref linkend="sql-load"> command across
555
549
the board, because any module loaded could easily circumvent security
556
550
policy enforcement.
557
551
</para>
@@ -605,10 +599,12 @@ postgres=# SELECT cid, cname, show_credit(cid) FROM customer;
605
599
<listitem>
606
600
<para>
607
601
<productname>sepgsql</> never tries to hide existence of
608
- a certain object, even if user is not allowed to reference.
609
- For example, we can infer an existence of invisible object using
610
- primary-key confliction, foreign-key violation, and so on, even if
611
- we cannot reference contents of these objects.
602
+ a certain object, even if the user is not allowed to the reference.
603
+ For example, we can infer the existence of an invisible object as
604
+ a result of primary key conflicts, foreign key violations, and so on,
605
+ even if we cannot reference contents of these objects. The existence
606
+ of a top secret table cannot be hidden; we only hope to conceal its
607
+ contents.
612
608
</para>
613
609
</listitem>
614
610
</varlistentry>
@@ -623,27 +619,27 @@ postgres=# SELECT cid, cname, show_credit(cid) FROM customer;
623
619
<listitem>
624
620
<para>
625
621
This wiki page provides a brief-overview, security design, architecture,
626
- administration and upcoming feature for more details .
622
+ administration and upcoming features .
627
623
</para>
628
624
</listitem>
629
625
</varlistentry>
630
626
<varlistentry>
631
627
<term><ulink url="http://docs.fedoraproject.org/selinux-user-guide/">Fedora SELinux User Guide</ulink></term>
632
628
<listitem>
633
629
<para>
634
- This document provides wide spectrum of knowledge to administer
630
+ This document provides a wide spectrum of knowledge to administer
635
631
<productname>SELinux</> on your systems.
636
- It primary focuses on Fedora, but is not limited to Fedora.
632
+ It focuses primarily on Fedora, but is not limited to Fedora.
637
633
</para>
638
634
</listitem>
639
635
</varlistentry>
640
636
<varlistentry>
641
637
<term><ulink url="http://docs.fedoraproject.org/selinux-faq">Fedora SELinux FAQ</ulink></term>
642
638
<listitem>
643
639
<para>
644
- This document answers frequently asked questins about
640
+ This document answers frequently asked questions about
645
641
<productname>SELinux</productname>.
646
- It primary focuses on Fedora, but is not limited to Fedora.
642
+ It focuses primarily on Fedora, but is not limited to Fedora.
647
643
</para>
648
644
</listitem>
649
645
</varlistentry>
0 commit comments