Skip to content

Commit 0e1f91a

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Update mercure jwt default secret
2 parents 9a28537 + 4d11ed3 commit 0e1f91a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mercure.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ the publicly available URL (e.g. ``https://example.com/.well-known/mercure``).
107107
The clients must also bear a `JSON Web Token`_ (JWT)
108108
to the Mercure Hub to be authorized to publish updates and, sometimes, to subscribe.
109109

110-
This token must be signed with the same secret key as the one used by the Hub to verify the JWT (``!ChangeMe!`` if you use the Docker integration).
110+
This token must be signed with the same secret key as the one used by the Hub to verify the JWT (``!ChangeThisMercureHubJWTSecretKey!`` if you use the Docker integration).
111111
This secret key must be stored in the ``MERCURE_JWT_SECRET`` environment variable.
112112
MercureBundle will use it to automatically generate and sign the needed JWTs.
113113

114114
In addition to these environment variables,
115115
MercureBundle provides a more advanced configuration:
116116

117-
* ``secret``: the key to use to sign the JWT (all other options, beside ``algorithm``, ``subscribe``, and ``publish`` will be ignored)
117+
* ``secret``: the key to use to sign the JWT - A key of the same size as the hash output (for instance, 256 bits for "HS256") or larger MUST be used. (all other options, beside ``algorithm``, ``subscribe``, and ``publish`` will be ignored)
118118
* ``publish``: a list of topics to allow publishing to when generating the JWT (only usable when ``secret``, or ``factory`` are provided)
119119
* ``subscribe``: a list of topics to allow subscribing to when generating the JWT (only usable when ``secret``, or ``factory`` are provided)
120120
* ``algorithm``: The algorithm to use to sign the JWT (only usable when ``secret`` is provided)
@@ -132,7 +132,7 @@ MercureBundle provides a more advanced configuration:
132132
default:
133133
url: https://mercure-hub.example.com/.well-known/mercure
134134
jwt:
135-
secret: '!ChangeMe!'
135+
secret: '!ChangeThisMercureHubJWTSecretKey!'
136136
publish: ['foo', 'https://example.com/foo']
137137
subscribe: ['bar', 'https://example.com/bar']
138138
algorithm: 'hmac.sha256'
@@ -150,7 +150,7 @@ MercureBundle provides a more advanced configuration:
150150
url="https://mercure-hub.example.com/.well-known/mercure"
151151
>
152152
<jwt
153-
secret="!ChangeMe!"
153+
secret="!ChangeThisMercureHubJWTSecretKey!"
154154
algorithm="hmac.sha256"
155155
provider="My\Provider"
156156
factory="My\Factory"
@@ -172,7 +172,7 @@ MercureBundle provides a more advanced configuration:
172172
'default' => [
173173
'url' => 'https://mercure-hub.example.com/.well-known/mercure',
174174
'jwt' => [
175-
'secret' => '!ChangeMe!',
175+
'secret' => '!ChangeThisMercureHubJWTSecretKey!',
176176
'publish' => ['foo', 'https://example.com/foo'],
177177
'subscribe' => ['bar', 'https://example.com/bar'],
178178
'algorithm' => 'hmac.sha256',

0 commit comments

Comments
 (0)