Class: RailsMasterKeyKmsDecrypter::KmsEncryptedConfiguration
- Inherits:
-
ActiveSupport::EncryptedConfiguration
- Object
- ActiveSupport::EncryptedConfiguration
- RailsMasterKeyKmsDecrypter::KmsEncryptedConfiguration
- Defined in:
- lib/rails_master_key_kms_decrypter/kms_encrypted_configuration.rb
Instance Attribute Summary collapse
-
#encrypted_env_key ⇒ Object
readonly
Returns the value of attribute encrypted_env_key.
-
#encrypted_key_path ⇒ Object
readonly
Returns the value of attribute encrypted_key_path.
Instance Method Summary collapse
-
#initialize ⇒ KmsEncryptedConfiguration
constructor
def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:).
- #key ⇒ Object
Constructor Details
#initialize ⇒ KmsEncryptedConfiguration
def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:)
8 9 10 11 12 13 |
# File 'lib/rails_master_key_kms_decrypter/kms_encrypted_configuration.rb', line 8 def initialize(*) super @encrypted_env_key = "ENCRYPTED_#{env_key}" @encrypted_key_path = "#{key_path}.enc" end |
Instance Attribute Details
#encrypted_env_key ⇒ Object (readonly)
Returns the value of attribute encrypted_env_key.
5 6 7 |
# File 'lib/rails_master_key_kms_decrypter/kms_encrypted_configuration.rb', line 5 def encrypted_env_key @encrypted_env_key end |
#encrypted_key_path ⇒ Object (readonly)
Returns the value of attribute encrypted_key_path.
5 6 7 |
# File 'lib/rails_master_key_kms_decrypter/kms_encrypted_configuration.rb', line 5 def encrypted_key_path @encrypted_key_path end |
Instance Method Details
#key ⇒ Object
15 16 17 |
# File 'lib/rails_master_key_kms_decrypter/kms_encrypted_configuration.rb', line 15 def key read_encrypted_env_key || read_encrypted_key_file || super end |