Closed ZILosoft closed 2 weeks ago
@ZILosoft can you please share the result of the SELECT * FROM encrypted_configs
query ? Looks like the table was emptied
[
{
"id": 7,
"account_id": 1,
"key": "app_url",
"value": "{\"p\":\"**hiddenbase64data**\",\"h\":{\"iv\":\"**hiddenbase64data**\"}}",
"created_at": "2024-06-30 09:54:50.086245",
"updated_at": "2024-06-30 09:54:52.603825"
},
{
"id": 5,
"account_id": 1,
"key": "active_storage",
"value": "{\"p\":\"**hiddenbase64data**\",\"h\":{\"iv\":\"**hiddenbase64data**\",\"c\":true}}",
"created_at": "2024-06-25 19:09:01.171717",
"updated_at": "2024-07-13 22:04:41.146233"
},
{
"id": 6,
"account_id": 1,
"key": "action_mailer_smtp",
"value": "{\"p\":\"**hiddenbase64data**\",\"h\":{\"iv\":\"**hiddenbase64data**\",\"at\":\"**hiddenbase64data**\",\"c\":true}}",
"created_at": "2024-06-25 19:12:52.960296",
"updated_at": "2024-07-13 22:13:46.436751"
}
]
i replace base64 data with hiddenbase64data
@ZILosoft signing certificate table row is missing in this result - that's why it causes an error when signing documents. did you manually remove certain rows from the table?
You table contains rows with ID 5,6,7 - but rows with ID 1,2,3,4 are missing - so looks like some manual data manipulation took place here
thanks! ok, how can we regenerate these lines, and "regenerate the document" re-sign the documents" ?
i found this key from backup INSERT INTO public.encrypted_configs (id, account_id, key, value, created_at, updated_at) VALUES (2, 1, 'esign_certs', '{"p":"hiddedbase64","h":{"iv":"hiddedbase64","at":"hiddedbase64","c":true}}', '2024-05-08 00:12:04.453223', '2024-05-08 00:12:04.453223');
but now error cant decrypt
I, [2024-07-30T19:09:59.810493 #1] INFO -- : [7e57b3b8abf48f49a35fb2825774f163] {"method":"GET","path":"/submitters/EoZd8BJjvpr4zL/download","format":"*/*","controller":"SubmissionsDownloadController","action":"index","status":500,"allocations":45252,"duration":1077.71,"view":0.0,"db":140.32,"fwd":"172.70.246.171"}
E, [2024-07-30T19:09:59.818313 #1] ERROR -- : [7e57b3b8abf48f49a35fb2825774f163]
[7e57b3b8abf48f49a35fb2825774f163] ActiveRecord::Encryption::Errors::Decryption (ActiveRecord::Encryption::Errors::Decryption):
[7e57b3b8abf48f49a35fb2825774f163]
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encryptor.rb:58:in `rescue in decrypt'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encryptor.rb:52:in `decrypt'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:90:in `block in decrypt'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/scheme.rb:69:in `with_context'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:15:in `with_context'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:85:in `decrypt'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:36:in `deserialize'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:104:in `block in try_to_deserialize_with_previous_encrypted_types'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:103:in `each'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:103:in `with_index'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:103:in `try_to_deserialize_with_previous_encrypted_types'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:98:in `rescue in decrypt'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:84:in `decrypt'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/encryption/encrypted_attribute_type.rb:36:in `deserialize'
[7e57b3b8abf48f49a35fb2825774f163] /usr/local/lib/ruby/3.3.0/delegate.rb:349:in `block in delegating_block'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/type/serialized.rb:22:in `deserialize'
[7e57b3b8abf48f49a35fb2825774f163] activemodel (7.1.3.2) lib/active_model/attribute_set/builder.rb:52:in `block in fetch_value'
[7e57b3b8abf48f49a35fb2825774f163] activemodel (7.1.3.2) lib/active_model/attribute_set/builder.rb:46:in `fetch'
[7e57b3b8abf48f49a35fb2825774f163] activemodel (7.1.3.2) lib/active_model/attribute_set/builder.rb:46:in `fetch_value'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/attribute_methods/read.rb:51:in `_read_attribute'
[7e57b3b8abf48f49a35fb2825774f163] activemodel (7.1.3.2) lib/active_model/attribute_methods.rb:286:in `value'
[7e57b3b8abf48f49a35fb2825774f163] lib/accounts.rb:114:in `load_signing_pkcs'
[7e57b3b8abf48f49a35fb2825774f163] lib/submissions/generate_result_attachments.rb:49:in `call'
[7e57b3b8abf48f49a35fb2825774f163] lib/submissions/ensure_result_generated.rb:27:in `call'
[7e57b3b8abf48f49a35fb2825774f163] app/controllers/submissions_download_controller.rb:22:in `index'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/abstract_controller/base.rb:224:in `process_action'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal/rendering.rb:165:in `process_action'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/abstract_controller/callbacks.rb:259:in `block in process_action'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
[7e57b3b8abf48f49a35fb2825774f163] turbo-rails (2.0.5) lib/turbo-rails.rb:24:in `with_request_id'
[7e57b3b8abf48f49a35fb2825774f163] turbo-rails (2.0.5) app/controllers/concerns/turbo/request_id_tracking.rb:10:in `turbo_tracking_request_id'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/callbacks.rb:141:in `run_callbacks'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/abstract_controller/callbacks.rb:258:in `process_action'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal/rescue.rb:25:in `process_action'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal/instrumentation.rb:74:in `block in process_action'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/notifications.rb:206:in `block in instrument'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/notifications.rb:206:in `instrument'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal/instrumentation.rb:73:in `process_action'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal/params_wrapper.rb:261:in `process_action'
[7e57b3b8abf48f49a35fb2825774f163] activerecord (7.1.3.2) lib/active_record/railties/controller_runtime.rb:32:in `process_action'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/abstract_controller/base.rb:160:in `process'
[7e57b3b8abf48f49a35fb2825774f163] actionview (7.1.3.2) lib/action_view/rendering.rb:40:in `process'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal.rb:227:in `dispatch'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_controller/metal.rb:309:in `dispatch'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/routing/route_set.rb:32:in `serve'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:51:in `block in serve'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:131:in `block in find_routes'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:124:in `each'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:124:in `find_routes'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/routing/route_set.rb:882:in `call'
[7e57b3b8abf48f49a35fb2825774f163] warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
[7e57b3b8abf48f49a35fb2825774f163] warden (1.2.9) lib/warden/manager.rb:34:in `catch'
[7e57b3b8abf48f49a35fb2825774f163] warden (1.2.9) lib/warden/manager.rb:34:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/tempfile_reaper.rb:20:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/etag.rb:29:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/conditional_get.rb:31:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/head.rb:15:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/http/permissions_policy.rb:36:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/http/content_security_policy.rb:33:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack-session (2.0.0) lib/rack/session/abstract/id.rb:272:in `context'
[7e57b3b8abf48f49a35fb2825774f163] rack-session (2.0.0) lib/rack/session/abstract/id.rb:266:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/cookies.rb:689:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/callbacks.rb:101:in `run_callbacks'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
[7e57b3b8abf48f49a35fb2825774f163] lograge (0.14.0) lib/lograge/rails_ext/rack/logger.rb:18:in `call_app'
[7e57b3b8abf48f49a35fb2825774f163] railties (7.1.3.2) lib/rails/rack/logger.rb:24:in `block in call'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/tagged_logging.rb:135:in `block in tagged'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/tagged_logging.rb:39:in `tagged'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/tagged_logging.rb:135:in `tagged'
[7e57b3b8abf48f49a35fb2825774f163] activesupport (7.1.3.2) lib/active_support/broadcast_logger.rb:240:in `method_missing'
[7e57b3b8abf48f49a35fb2825774f163] railties (7.1.3.2) lib/rails/rack/logger.rb:24:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/remote_ip.rb:92:in `call'
[7e57b3b8abf48f49a35fb2825774f163] request_store (1.6.0) lib/request_store/middleware.rb:19:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/request_id.rb:28:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/method_override.rb:28:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/runtime.rb:24:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
[7e57b3b8abf48f49a35fb2825774f163] actionpack (7.1.3.2) lib/action_dispatch/middleware/static.rb:25:in `call'
[7e57b3b8abf48f49a35fb2825774f163] lib/api_path_consider_json_middleware.rb:15:in `call'
[7e57b3b8abf48f49a35fb2825774f163] lib/normalize_client_ip_middleware.rb:14:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/deflater.rb:47:in `call'
[7e57b3b8abf48f49a35fb2825774f163] rack (3.0.11) lib/rack/sendfile.rb:114:in `call'
[7e57b3b8abf48f49a35fb2825774f163] railties (7.1.3.2) lib/rails/engine.rb:536:in `call'
[7e57b3b8abf48f49a35fb2825774f163] puma (6.4.2) lib/puma/configuration.rb:272:in `call'
[7e57b3b8abf48f49a35fb2825774f163] puma (6.4.2) lib/puma/request.rb:100:in `block in handle_request'
[7e57b3b8abf48f49a35fb2825774f163] puma (6.4.2) lib/puma/thread_pool.rb:378:in `with_force_shutdown'
[7e57b3b8abf48f49a35fb2825774f163] puma (6.4.2) lib/puma/request.rb:99:in `handle_request'
[7e57b3b8abf48f49a35fb2825774f163] puma (6.4.2) lib/puma/server.rb:464:in `process_client'
[7e57b3b8abf48f49a35fb2825774f163] puma (6.4.2) lib/puma/server.rb:245:in `block in run'
[7e57b3b8abf48f49a35fb2825774f163] puma (6.4.2) lib/puma/thread_pool.rb:155:in `block in spawn_thread'
I, [2024-07-30T19:09:59.832763 #1] INFO -- : [7e57b3b8abf48f49a35fb2825774f163] {"method":"GET","path":"/500","format":"*/*","controller":"ErrorsController","action":"show","status":500,"allocations":5431,"duration":7.24,"view":0.13,"db":0.0,"fwd":"172.70.246.171"}
I'm getting the same error logs as @ZILosoft. After I sign a bunch of files one after another, the application just starts degrading until I only get "500" code
By degrading I mean, some pages start to return "500", while others still work, until eventually everything just stop working
The logs doesn't tell much, so I'm unable to debug it by myself 😢
hi. we have problem with download documents