Skip to content

Commit 799d263

Browse files
authored
Merge pull request rails#42542 from philiplambok/update-docs-active-record-encryption
Update docs active record encryption (in Rotating keys section)
2 parents c39364f + ff181c3 commit 799d263

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

guides/source/active_record_encryption.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ As with other built-in key providers, you can provide a list of primary keys in
291291

292292
### Custom key providers
293293

294-
For more advanced key-management schemes, you can configure a custom key provider in a initializer:
294+
For more advanced key-management schemes, you can configure a custom key provider in an initializer:
295295

296296
```ruby
297297
ActiveRecord::Encryption.key_provider = MyKeyProvider.new
@@ -340,17 +340,17 @@ The key will be used internally to derive the key used to encrypt and decrypt th
340340

341341
### Rotating keys
342342

343-
`active_record.encryption` can work with lists of keys, to support implementing key-rotation schemes:
343+
`active_record.encryption` can work with lists of keys to support implementing key-rotation schemes:
344344

345-
- The **first key** will be used for encrypting new content.
346-
- All the keys will be tried when decrypting content, until one works.
345+
- The **last key** will be used for encrypting new content.
346+
- All the keys will be tried when decrypting content until one works.
347347

348348
```yml
349349
active_record
350350
encryption:
351351
primary_key:
352-
- bc17e7b413fd4720716a7633027f8cc4 # Active, encrypts new content
353352
- a1cc4d7b9f420e40a337b9e68c5ecec6 # Previous keys can still decrypt existing content
353+
- bc17e7b413fd4720716a7633027f8cc4 # Active, encrypts new content
354354
key_derivation_salt: a3226b97b3b2f8372d1fc6d497a0c0d3
355355
```
356356

0 commit comments

Comments
 (0)