mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
feat: Implement P12 certificate generation improvements
- 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
This commit is contained in:
parent
072f4440e2
commit
ae96863b88
13 changed files with 157 additions and 64 deletions
|
@ -13,8 +13,8 @@ module Repp
|
|||
api_user_id = p12_params[:api_user_id]
|
||||
render_error(I18n.t('errors.messages.not_found'), :not_found) and return if api_user_id.blank?
|
||||
|
||||
certificate = ::Certificates::CertificateGenerator.new(api_user_id: api_user_id, interface: 'registrar').execute
|
||||
render_success(data: { certificate: certificate })
|
||||
P12GeneratorJob.perform_later(api_user_id)
|
||||
render_success(message: 'P12 certificate generation started. Please refresh the page in a few seconds.')
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue