Skip to content

Commit ffbf04c

Browse files
committed
Fix typos
1 parent 526e6ec commit ffbf04c

File tree

2 files changed

+38
-45
lines changed

2 files changed

+38
-45
lines changed

best_practices/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ 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,
49+
You can also encrypt sensitive information like passwords, tokens, API key,
5050
secrets, etc... See :doc:`/configuration/secrets`.
5151

5252
.. caution::

configuration/secrets.rst

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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
9+
learn how to easily and saftely configure your application with sensitive
10+
information such as credentials, passwords, tokens, API keys without exposing
1111
them.
1212

1313
.. _secrets-configuration:
@@ -16,8 +16,8 @@ Configuration
1616
-------------
1717

1818
In order to use secrets you have to enable the feature in the framework's
19-
2019
configuration:
20+
2121
.. configuration-block::
2222

2323
.. code-block:: yaml
@@ -50,31 +50,24 @@ configuration:
5050
'secrets' => true,
5151
]);
5252
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-
6053
.. _secrets-generate-key:
6154

6255
Generate an Encryption Key
6356
--------------------------
6457

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``.
58+
Before creating a new **secret**, you need to create an **encryption key**.
59+
This can be done with the provided command ``secrets:generate-key``.
6760

6861
.. code-block:: terminal
6962
7063
$ APP_ENV=prod php bin/console secrets:generate-key
7164
72-
This command will generate a new ``encryption key`` in.
65+
This command generates a new **encryption key** in
7366
``%kernel.project_dir%/config/secrets/encryption_%kernel.environment%.key``
7467

7568
.. note::
7669

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

8073
Symfony generates a key with a symetrics algorithm, meaning that this key could
@@ -83,41 +76,41 @@ possess this key should be as small as possible.
8376

8477
.. caution::
8578

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.
79+
This file is sensitive and **must not** be commited nor publicly shared.
80+
Every developpers and CI don't need that key. If the **encryption key**
81+
have been exposed (ex-employee leaving for instance), you should
82+
consider regenerating a new one.
9083

9184
.. _secrets-add:
9285

9386
Create a Secret
9487
---------------
9588

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.
89+
Once the **encryption key** generated, you can add new secret with the command
90+
``secrets:add``. Symfony will ask you to enter the secret to encrypt and
91+
generate a new file containing the encrypted secret in a file stored by default
92+
in the folder ``%kernel.project_dir%/config/secrets/%kernel.environment%/``.
93+
This file should be commited along side the other project's files.
10194

10295
.. code-block:: terminal
10396
10497
$ APP_ENV=prod php bin/console secrets:add DATABASE_PASSWORD
10598
10699
.. tip::
107100

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.
101+
If the **encryption key** is compromized, you can regenerate a new key with
102+
the command ``secrets:generate-key``. Symfony will decrypt previous secrets
103+
with the old key, and re-encrypt them with the new one.
111104

112105
.. _secrets-reference:
113106

114107
Referencing Secrets in Configuration Files
115108
------------------------------------------
116109

117-
You can reference those secrets in any configuration option enclosing their
118-
names using the ``secret`` :ref:`environment variable processors <env-var-processors>`.
110+
You can reference the secrets in any configuration option enclosing their names
111+
using the **secret** :ref:`environment variable processors <env-var-processors>`.
119112
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``.
113+
container compilation and cache warmup don't need the **encryption key**.
121114

122115
.. configuration-block::
123116

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

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

168161
.. configuration-block::
169162

@@ -213,7 +206,7 @@ By defining a default plaintext secret:
213206
]);
214207
$container->setParameter('database_password', 'not a secret');
215208
216-
Then overriding it in production environement:
209+
Then overriding it in production environment:
217210

218211
.. configuration-block::
219212

@@ -251,27 +244,27 @@ Then overriding it in production environement:
251244
List existing secrets
252245
---------------------
253246

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
247+
Everybody is allowed to list the secret's name with the command ``secrets:list``.
248+
If you have the **encryption key** you can also reveal the secret value by
249+
passing the option ``--reveal`` to the command
257250

258251
.. code-block:: terminal
259252
260253
$ APP_ENV=prod php bin/console secrets:list --reveal
261254
262255
------------------- ------------------
263-
key plaintext secret
256+
key secret
264257
------------------- ------------------
265258
DATABASE_PASSWORD my-secret
266259
------------------- ------------------
267260
268261
.. _secrets-deploy
269262
270-
Deploy secret to production
271-
---------------------------
263+
Deploy secrets to production
264+
----------------------------
272265

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
266+
As the **encryption key** is not commited, during development, you'll have to
267+
manualy deploy the key (once and for all) at the path referenced in the
275268
``encryption_key`` configuration key. Default is ``%kernel.project_dir%/config/secrets/%kernel.environment%``.
276269

277270
.. _secrets-custom-storage

0 commit comments

Comments
 (0)