attribute transitional
Ruby on Rails 7.1.6
Since v7.1.6If true, the first two rotation option sets are swapped when building message encryptors. For example, with the following configuration, message encryptors will encrypt messages using serializer: Marshal, url_safe: true, and will able to decrypt messages that were encrypted using any of the three option sets:
encryptors = ActiveSupport::MessageEncryptors.new { ... }
encryptors.rotate(serializer: JSON, url_safe: true)
encryptors.rotate(serializer: Marshal, url_safe: true)
encryptors.rotate(serializer: Marshal, url_safe: false)
encryptors.transitional = true
This can be useful when performing a rolling deploy of an application, wherein servers that have not yet been updated must still be able to decrypt messages from updated servers. In such a scenario, first perform a rolling deploy with the new rotation (e.g. serializer: JSON, url_safe: true) as the first rotation and transitional = true. Then, after all servers have been updated, perform a second rolling deploy with transitional = false.