Skip to content

Commit 3a6ae85

Browse files
committed
Fix formatting in /security/ docs
1 parent 8068e36 commit 3a6ae85

File tree

4 files changed

+75
-75
lines changed

4 files changed

+75
-75
lines changed

presto-docs/src/main/sphinx/security/authorization.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ roles defined in Presto:
2424
Enabling Authorization
2525
----------------------
2626

27-
The following steps need to be taken in order to enable authorization:
27+
The following steps must be taken to enable authorization:
2828

29-
1. :ref:`enable_authentication`
30-
2. :ref:`configure_authorizer`
31-
3. :ref:`configure_authorization_settings`
29+
1. :ref:`enable_authentication`
30+
2. :ref:`configure_authorizer`
31+
3. :ref:`configure_authorization_settings`
3232

3333
.. _enable_authentication:
3434

@@ -38,20 +38,20 @@ Enable Authentication
3838
Presto authorization requires authentication to get the accessor's principal,
3939
so make sure you have authentication enabled.
4040

41-
- If TLS/SSL is configured properly, we can just use the certificate to
42-
identify the accessor.
41+
- If TLS/SSL is configured properly, use the certificate to
42+
identify the accessor.
4343

44-
.. code-block:: none
44+
.. code-block:: none
4545
46-
http-server.authentication.type=CERTIFICATE
46+
http-server.authentication.type=CERTIFICATE
4747
48-
- It is also possible to specify other authentication types such as
49-
``KERBEROS``, ``PASSWORD`` and ``JWT``. Additional configuration may be
50-
needed.
48+
- It is also possible to specify other authentication types such as
49+
``KERBEROS``, ``PASSWORD`` and ``JWT``. Additional configuration may be
50+
needed.
5151

52-
.. code-block:: none
52+
.. code-block:: none
5353
54-
node.internal-address=<authentication type>
54+
node.internal-address=<authentication type>
5555
5656
.. _configure_authorizer:
5757

@@ -75,17 +75,17 @@ Configuration-based authorizer:
7575

7676
1. Create a role to identity regex mapping and store it in a file.
7777

78-
.. code-block:: none
78+
.. code-block:: none
7979
80-
user=.*
81-
internal=coordinator
82-
admin=su.*
80+
user=.*
81+
internal=coordinator
82+
admin=su.*
8383
8484
2. Specify the path to the mapping file in ``config.properties`` file:
8585

86-
.. code-block:: none
86+
.. code-block:: none
8787
88-
configuration-based-authorizer.role-regex-map.file-path=<path to mapping file>
88+
configuration-based-authorizer.role-regex-map.file-path=<path to mapping file>
8989
9090
3. Install the Guice module
9191
``com.facebook.airlift.http.server.ConfigurationBasedAuthorizerModule``.
@@ -95,7 +95,7 @@ Configuration-based authorizer:
9595
Configure Authorization Settings
9696
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9797

98-
Authorization settings is configured in the ``config.properties`` file. The
98+
Authorization settings are configured in the ``config.properties`` file. The
9999
authorization on the worker and coordinator nodes are configured using the same
100100
set of properties.
101101

presto-docs/src/main/sphinx/security/internal-communication.rst

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ To enable SSL/TLS for Presto internal communication, do the following:
1818

1919
1. Disable HTTP endpoint.
2020

21-
.. code-block:: none
21+
.. code-block:: none
2222
23-
http-server.http.enabled=false
23+
http-server.http.enabled=false
2424
25-
.. warning::
25+
.. warning::
2626

27-
You can enable HTTPS while leaving HTTP enabled. In most cases this is a
28-
security hole. If you are certain you want to use this configuration, you
29-
should consider using an firewall to limit access to the HTTP endpoint to
30-
only those hosts that should be allowed to use it.
27+
You can enable HTTPS while leaving HTTP enabled. In most cases this is a
28+
security hole. If you are certain you want to use this configuration, you
29+
should consider using an firewall to limit access to the HTTP endpoint to
30+
only those hosts that should be allowed to use it.
3131

3232
2. Configure the cluster to communicate using the fully qualified domain name (fqdn)
3333
of the cluster nodes. This can be done in either of the following ways:
@@ -57,62 +57,62 @@ To enable SSL/TLS for Presto internal communication, do the following:
5757
and specify it for the client (see step #8 below). In most cases it will be
5858
simpler to use a wildcard in the certificate as shown below.
5959

60-
.. code-block:: none
61-
62-
keytool -genkeypair -alias example.com -keyalg RSA -keystore keystore.jks
63-
Enter keystore password:
64-
Re-enter new password:
65-
What is your first and last name?
66-
[Unknown]: *.example.com
67-
What is the name of your organizational unit?
68-
[Unknown]:
69-
What is the name of your organization?
70-
[Unknown]:
71-
What is the name of your City or Locality?
72-
[Unknown]:
73-
What is the name of your State or Province?
74-
[Unknown]:
75-
What is the two-letter country code for this unit?
76-
[Unknown]:
77-
Is CN=*.example.com, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
78-
[no]: yes
79-
80-
Enter key password for <presto>
81-
(RETURN if same as keystore password):
82-
83-
.. Note: Replace `example.com` with the appropriate domain.
60+
.. code-block:: none
61+
62+
keytool -genkeypair -alias example.com -keyalg RSA -keystore keystore.jks
63+
Enter keystore password:
64+
Re-enter new password:
65+
What is your first and last name?
66+
[Unknown]: *.example.com
67+
What is the name of your organizational unit?
68+
[Unknown]:
69+
What is the name of your organization?
70+
[Unknown]:
71+
What is the name of your City or Locality?
72+
[Unknown]:
73+
What is the name of your State or Province?
74+
[Unknown]:
75+
What is the two-letter country code for this unit?
76+
[Unknown]:
77+
Is CN=*.example.com, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
78+
[no]: yes
79+
80+
Enter key password for <presto>
81+
(RETURN if same as keystore password):
82+
83+
.. Note: Replace `example.com` with the appropriate domain.
8484
8585
4. Distribute the Java Keystore File across the Presto cluster.
8686

8787
5. Enable the HTTPS endpoint.
8888

89-
.. code-block:: none
89+
.. code-block:: none
9090
91-
http-server.https.enabled=true
92-
http-server.https.port=<https port>
93-
http-server.https.keystore.path=<keystore path>
94-
http-server.https.keystore.key=<keystore password>
91+
http-server.https.enabled=true
92+
http-server.https.port=<https port>
93+
http-server.https.keystore.path=<keystore path>
94+
http-server.https.keystore.key=<keystore password>
9595
96-
Note: setting the ``http-server.https.port`` to ``0`` results in the use of an ephemeral port.
96+
Note: setting the ``http-server.https.port`` to ``0`` results in the use of an ephemeral port.
9797

9898
6. Change the discovery uri to HTTPS.
9999

100-
.. code-block:: none
100+
.. code-block:: none
101101
102-
discovery.uri=https://<coordinator fqdn>:<https port>
102+
discovery.uri=https://<coordinator fqdn>:<https port>
103103
104104
7. Configure the internal communication to require HTTPS.
105105

106-
.. code-block:: none
106+
.. code-block:: none
107107
108-
internal-communication.https.required=true
108+
internal-communication.https.required=true
109109
110110
8. Configure the internal communication to use the Java keystore file.
111111

112-
.. code-block:: none
112+
.. code-block:: none
113113
114-
internal-communication.https.keystore.path=<keystore path>
115-
internal-communication.https.keystore.key=<keystore password>
114+
internal-communication.https.keystore.path=<keystore path>
115+
internal-communication.https.keystore.key=<keystore password>
116116
117117
Internal Authentication
118118
-----------------------
@@ -125,7 +125,7 @@ It is
125125
between clients and the coordinator
126126
* Mandatory when configuring both the above i.e internal TLS along with external authentication.
127127

128-
There are multiple ways to enable internal authentication described in below sections
128+
There are multiple ways to enable internal authentication:
129129

130130
1. JWT
131131
~~~~~~
@@ -166,9 +166,9 @@ will be used for certificate authentication.
166166
If :doc:`Kerberos</security/server>` authentication is enabled, specify valid Kerberos
167167
credentials for the internal communication, in addition to the SSL/TLS properties.
168168

169-
.. code-block:: none
169+
.. code-block:: none
170170
171-
internal-communication.kerberos.enabled=true
171+
internal-communication.kerberos.enabled=true
172172
173173
.. note::
174174

@@ -208,15 +208,15 @@ to switch the random number generator algorithm to ``SHA1PRNG``, by setting it v
208208
``http-server.https.secure-random-algorithm`` property in ``config.properties`` on the coordinator
209209
and all of the workers:
210210

211-
.. code-block:: none
211+
.. code-block:: none
212212
213-
http-server.https.secure-random-algorithm=SHA1PRNG
213+
http-server.https.secure-random-algorithm=SHA1PRNG
214214
215215
Be aware that this algorithm takes the initial seed from
216216
the blocking ``/dev/random`` device. For environments that do not have enough entropy to seed
217217
the ``SHAPRNG`` algorithm, the source can be changed to ``/dev/urandom``
218218
by adding the ``java.security.egd`` property to ``jvm.config``:
219219

220-
.. code-block:: none
220+
.. code-block:: none
221221
222-
-Djava.security.egd=file:/dev/urandom
222+
-Djava.security.egd=file:/dev/urandom

presto-docs/src/main/sphinx/security/jce-policy.fragment

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ strength of the cryptographic keys that can be used. Kerberos, by default, uses
66
keys that are larger than those supported by the included policy files. There
77
are two possible solutions to the problem:
88

9-
* Update the :abbr:`JCE (Java Cryptography Extension)` policy files.
10-
* Configure Kerberos to use reduced-strength keys.
9+
* Update the :abbr:`JCE (Java Cryptography Extension)` policy files.
10+
* Configure Kerberos to use reduced-strength keys.
1111

1212
Of the two options, updating the JCE policy files is recommended. The JCE
1313
policy files can be downloaded from Oracle. Note that the JCE policy files vary

presto-docs/src/main/sphinx/security/ldap.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Presto Coordinator Node Configuration
5151
You must make the following changes to the environment prior to configuring the
5252
Presto coordinator to use LDAP authentication and HTTPS.
5353

54-
* :ref:`ldap_server`
55-
* :ref:`server_java_keystore`
54+
* :ref:`ldap_server`
55+
* :ref:`server_java_keystore`
5656

5757
You also need to make changes to the Presto configuration files.
5858
LDAP authentication is configured on the coordinator in two parts.

0 commit comments

Comments
 (0)