Skip to content

Commit ff181c3

Browse files
committed
Update docs active record encryption
In the Rotating keys section, the active key was the last key instead of the first one.
1 parent cde84b8 commit ff181c3

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)