mirror of
https://github.com/internetee/registry.git
synced 2025-08-19 07:53:51 +02:00
- Replace hardcoded P12 password with randomly generated one - Add p12_password column to certificates table - Update certificate serializer to include p12 password in response - Remove deprecated certificate revocation logic - Add tests for certificate revocation functionality - Implement async P12 generation via Sidekiq job - Add job uniqueness to prevent parallel certificate generation Migration changes: - Replace p12_password_digest with p12_password column - Add safety measures for column removal
17 lines
342 B
Ruby
17 lines
342 B
Ruby
class P12GeneratorJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
sidekiq_options(
|
|
unique: :until_executed,
|
|
lock_timeout: 1.hour
|
|
)
|
|
|
|
def perform(api_user_id)
|
|
api_user = ApiUser.find(api_user_id)
|
|
|
|
Certificates::CertificateGenerator.new(
|
|
api_user_id: api_user_id,
|
|
interface: 'registrar'
|
|
).execute
|
|
end
|
|
end
|