Skip to content

Commit 9b93074

Browse files
committed
Fix typos
1 parent 526e6ec commit 9b93074

File tree

3 files changed

+41
-49
lines changed

3 files changed

+41
-49
lines changed

best_practices/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ To override these variables with machine-specific or sensitive values, create a
4646

4747
.. seealso::
4848

49-
You can also encrypt sensitive informations like passwords, tokens, api key,
50-
secrets, etc... See :doc:`/configuration/secrets`.
49+
You can also encrypt sensitive information like passwords, tokens, API key,
50+
secrets, etc. See :doc:`/configuration/secrets`.
5151

5252
.. caution::
5353

configuration/secrets.rst

Lines changed: 38 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
.. index::
22
single: Secrets
33

4-
How to Keep Sensitive Informations Secret
5-
=========================================
4+
How to Keep Sensitive Information Secret
5+
========================================
66

77
In :doc:`/configuration` and :doc:`/configuration/environment_variables`, you
88
learned how to manage your application configuration. In this article you'll
9-
learn how to easily anbd saftly configure your application with sensitive
10-
information such as credentials, passwords, tokens, api keys without exposing
11-
them.
9+
learn how to safely configure your application with sensitive information such
10+
as credentials, passwords, tokens, API keys without exposing them.
1211

1312
.. _secrets-configuration:
1413

1514
Configuration
1615
-------------
1716

1817
In order to use secrets you have to enable the feature in the framework's
19-
2018
configuration:
19+
2120
.. configuration-block::
2221

2322
.. code-block:: yaml
@@ -50,74 +49,67 @@ configuration:
5049
'secrets' => true,
5150
]);
5251
53-
.. tip::
54-
55-
the ``encryption_key`` configuration parameter accept both a path to an
56-
encription key or the content of the itself. It allows you, for instance,
57-
to store the content of the key in an environement variable and refer it
58-
with ``%env(PRIVATE_KEY)%``.
59-
6052
.. _secrets-generate-key:
6153

6254
Generate an Encryption Key
6355
--------------------------
6456

65-
Before creating a new ``secret``, you need to create ann ``encryption key``.
66-
This can be done with the provided commande ``secrets:generate-key``.
57+
Before creating a new **secret**, you need to create an **encryption key**.
58+
This can be done with the provided command ``secrets:generate-key``.
6759

6860
.. code-block:: terminal
6961
7062
$ APP_ENV=prod php bin/console secrets:generate-key
7163
72-
This command will generate a new ``encryption key`` in.
64+
This command generates a new **encryption key** in
7365
``%kernel.project_dir%/config/secrets/encryption_%kernel.environment%.key``
7466

7567
.. note::
7668

77-
In order to use Symfony's built-in Secret storage, you will need the
69+
In order to use Symfony's built-in secret storage, you will need the
7870
`libsodium`_ PHP extension or use the `sodium_compat`_ package.
7971

80-
Symfony generates a key with a symetrics algorithm, meaning that this key could
72+
Symfony generates a key with a symmetric algorithm, meaning that this key could
8173
be used to both encrypt **and** decrypt secrets. The number of people who
8274
possess this key should be as small as possible.
8375

8476
.. caution::
8577

86-
This file is sensitive and **must not** be commited nor publicly shared. Every
87-
developpers and CI don't need that key. If the encryption key have been
88-
exposed (ex-employee leaving for instance)you should consider regenerating a
89-
new one.
78+
This file is sensitive and **must not** be committed nor publicly shared.
79+
Your team developers and Continuous Integration services don't need that
80+
key. If the **encryption key** have been exposed (ex-employee leaving for
81+
instance), you need to generate a new one.
9082

9183
.. _secrets-add:
9284

9385
Create a Secret
9486
---------------
9587

96-
Once the ``encryption key`` generated, you can add new secret with the command
97-
``secrets:add``. Symfony'll ask you to enter the text to encrypt and generate
98-
a new file contains the ciphered text in a file stored by default in the folder
99-
%kernel.project_dir%/config/secrets/%kernel.environment%/. This file should be
100-
commited allongside the other project's files.
88+
Once the **encryption key** generated, you can add new secret with the command
89+
``secrets:add``. Symfony will ask you to enter the secret in order to encrypt
90+
and generate a new file containing the encrypted secret. This file is stored by
91+
default in the folder ``%kernel.project_dir%/config/secrets/%kernel.environment%/``.
92+
This file should be committed along side the other project's files.
10193

10294
.. code-block:: terminal
10395
10496
$ APP_ENV=prod php bin/console secrets:add DATABASE_PASSWORD
10597
10698
.. tip::
10799

108-
If the ``encryption key`` is compromized, you can regenerate a new key with
109-
the command ``secrets:generate-key``. Symfony will decrypt the previous
110-
secret with the old key, adn re-encrypt theme with the new one.
100+
If the **encryption key** is compromized, you can regenerate a new key with
101+
the command ``secrets:generate-key``. Symfony will decrypt previous secrets
102+
with the old key, and re-encrypt them with the new one.
111103

112104
.. _secrets-reference:
113105

114106
Referencing Secrets in Configuration Files
115107
------------------------------------------
116108

117-
You can reference those secrets in any configuration option enclosing their
118-
names using the ``secret`` :ref:`environment variable processors <env-var-processors>`.
109+
You can reference the secrets in any configuration option enclosing their names
110+
using the **secret** :ref:`environment variable processors <env-var-processors>`.
119111
Their actual values will be resolved at runtime (once per request), so that
120-
container compilation and cache warmup don't need the ``encryption key``.
112+
container compilation and cache warmup don't need the **encryption key**.
121113

122114
.. configuration-block::
123115

@@ -159,11 +151,11 @@ container compilation and cache warmup don't need the ``encryption key``.
159151
]
160152
]);
161153
162-
This bellow configuration requires that every environment use secrets. each
163-
environment would have it own ``encryption key`` and encŷpted secrets.
154+
This configuration requires that all environments uses secrets. Each
155+
environment would have its own **encryption key** and encrypted secrets.
164156

165-
You can also use parameters to configure diffrent strategy per environnement:
166-
By defining a default plaintext secret:
157+
You can also use parameters to configure different strategies per environnement:
158+
By defining a default plain text secret:
167159

168160
.. configuration-block::
169161

@@ -213,7 +205,7 @@ By defining a default plaintext secret:
213205
]);
214206
$container->setParameter('database_password', 'not a secret');
215207
216-
Then overriding it in production environement:
208+
Then overriding it in production environment:
217209

218210
.. configuration-block::
219211

@@ -251,27 +243,27 @@ Then overriding it in production environement:
251243
List existing secrets
252244
---------------------
253245

254-
Every body is allowed to list the secret's name with the command ``secrets:list``.
255-
If you have the ``encryption key`` you can also reveal the plain text value by
256-
passing the optoin ``--reveal`` to the command
246+
Everybody is allowed to list the secret's name with the command ``secrets:list``.
247+
If you have the **encryption key** you can also reveal the secret value by
248+
passing the option ``--reveal`` to the command
257249

258250
.. code-block:: terminal
259251
260252
$ APP_ENV=prod php bin/console secrets:list --reveal
261253
262254
------------------- ------------------
263-
key plaintext secret
255+
key secret
264256
------------------- ------------------
265257
DATABASE_PASSWORD my-secret
266258
------------------- ------------------
267259
268260
.. _secrets-deploy
269261
270-
Deploy secret to production
271-
---------------------------
262+
Deploy secrets to production
263+
----------------------------
272264

273-
As the ``encryption key`` is not commited, during development, you'll have to
274-
manualy deploy the key (once for a will) at the path referenced in the
265+
As the **encryption key** is not committed, during development, you'll have to
266+
manualy deploy the key (once and for all) at the path referenced in the
275267
``encryption_key`` configuration key. Default is ``%kernel.project_dir%/config/secrets/%kernel.environment%``.
276268

277269
.. _secrets-custom-storage

doctrine/pdo_session_storage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To use it, first register a new handler service:
7070

7171
Configure the database credentials
7272
:doc:`using environment variables in the config file </configuration/environment_variables>`
73-
or :doc:`using secrets in the config file </configuration/secrets>`to make
73+
or :doc:`using secrets in the config file </configuration/secrets>` to make
7474
your application more secure.
7575

7676
Next, tell Symfony to use your service as the session handler:

0 commit comments

Comments
 (0)