Commit graph

11422 commits

Author SHA1 Message Date
oleghasjanov
3bb7beba22 end-to-end problem: added account activity checker 2025-05-27 15:33:41 +03:00
Timo Võhmar
dbd8d77e6e
Update CHANGELOG.md 2025-05-02 10:19:09 +03:00
Timo Võhmar
887296ccbf
Merge pull request #2786 from internetee/fixed-lift-fd-during-contact-update
fixed lift force delete during contact update
2025-05-02 10:17:09 +03:00
oleghasjanov
ba9fc0c4ec fixed lift force delete during contact update 2025-04-29 15:42:47 +03:00
Timo Võhmar
0a06a36499
Update CHANGELOG.md 2025-04-25 09:20:09 +03:00
Timo Võhmar
f64575d2b9
Merge pull request #2756 from internetee/registrar-p12-generator
Add UserCertificate model with tests
2025-04-25 09:14:53 +03:00
Timo Võhmar
0c5c2e8944
Update CHANGELOG.md 2025-04-24 16:40:47 +03:00
Timo Võhmar
160a1bc88c
Merge pull request #2784 from internetee/2783-fix-repp-log
2783 fix repp log
2025-04-24 16:38:19 +03:00
tsoganov
537e75e162 Fixed admin contact validation and repp error 2025-04-23 17:03:26 +03:00
tsoganov
8e8fd6cead Merge branch 'master' of github.com:internetee/registry 2025-04-23 13:53:27 +03:00
oleghasjanov
1aa470727a refactoring 2025-04-22 11:18:18 +03:00
OlegPhenomenon
08e83b8987
Merge pull request #2759 from internetee/renovate/actions-download-artifact-4.x
Some checks failed
Github Testing / test (ubuntu-22.04, 3.0.3) (push) Has been cancelled
Github Testing / upload_coverage (3.0.3) (push) Has been cancelled
chore(deps): update actions/download-artifact action to v4.2.1
2025-04-17 11:22:34 +03:00
renovate[bot]
d7d2a0e7e6
chore(deps): update actions/download-artifact action to v4.2.1 2025-04-17 08:13:08 +00:00
oleghasjanov
7b290d81f8 fixed tests
Some checks failed
Github Testing / test (ubuntu-22.04, 3.0.3) (push) Has been cancelled
Github Testing / upload_coverage (3.0.3) (push) Has been cancelled
2025-04-16 12:46:17 +03:00
oleghasjanov
b1b03d572b updated gems 2025-04-16 12:31:23 +03:00
oleghasjanov
552e8f1972 added safety_assured 2025-04-16 11:47:52 +03:00
oleghasjanov
7b2f220602 changed copy data to sql approach 2025-04-16 11:47:52 +03:00
oleghasjanov
e315358860 updated migration 2025-04-16 11:47:52 +03:00
oleghasjanov
caf5729405 updated gitignore 2025-04-16 11:47:52 +03:00
oleghasjanov
ae96863b88 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
2025-04-16 11:47:52 +03:00
oleghasjanov
072f4440e2 fixed tests 2025-04-16 11:47:52 +03:00
oleghasjanov
0ba69ea848 added interface handler 2025-04-16 11:47:52 +03:00
oleghasjanov
4d33898856 added logs 2025-04-16 11:47:52 +03:00
oleghasjanov
fe90d787c2 fix: improve certificate parsing and file extensions
- Fix PKCS12 container parsing by using consistent password
- Add proper file extensions for certificate downloads (.key, .csr, .crt)
- Improve private key parsing by removing unnecessary Base64 decoding
- Add error logging for certificate parsing failures
- Clean up certificate serializer code

The main changes include:
- Using P12_PASSWORD consistently across generation and parsing
- Adding proper file extensions for different certificate types
- Fixing private key parsing to handle PEM format correctly
- Adding detailed error logging for debugging purposes
- Removing redundant code comments and improving code clarity

This commit improves the reliability of certificate handling
and provides better user experience with correct file extensions.
2025-04-16 11:47:52 +03:00
oleghasjanov
0925fa4d4b feat: Implement new certificate generation service
- Refactor certificate generation into a dedicated service object
- Add Base64 encoding for p12 binary data storage
- Implement serial number generation and storage
- Remove deprecated certificate generation code
- Simplify certificate status checks
- Update certificate controller to use new generator
- Add proper password handling for p12 containers

The main changes include:
- Moving certificate generation logic to CertificateGenerator service
- Proper handling of binary data encoding
- Implementing serial number tracking for future CRL support
- Removing old certificate generation and validation code
- Simplifying the certificate lifecycle management

This commit provides a more maintainable and robust certificate
generation system while preparing for future CRL implementation.
2025-04-16 11:47:52 +03:00
oleghasjanov
d0f247c61c added rails logger 2025-04-16 11:47:52 +03:00
oleghasjanov
99b8650ccb added currect user as log 2025-04-16 11:47:52 +03:00
oleghasjanov
45caaded60 fix 2025-04-16 11:47:52 +03:00
oleghasjanov
6d388c52bd more logs 2025-04-16 11:47:52 +03:00
oleghasjanov
03a2d2c68d asd 2025-04-16 11:47:52 +03:00
oleghasjanov
b892242764 more logs 2025-04-16 11:47:52 +03:00
oleghasjanov
8cb976516c added more logs 2025-04-16 11:47:52 +03:00
oleghasjanov
4a06d00b9b added files to gitignore 2025-04-16 11:47:52 +03:00
oleghasjanov
4343c9f207 change to standard algorithm 2025-04-16 11:47:52 +03:00
oleghasjanov
1d853b5da9 add logs 2025-04-16 11:47:52 +03:00
oleghasjanov
d85b93b8f2 fixed password field in p12 container 2025-04-16 11:47:52 +03:00
oleghasjanov
36968f363e fixed tests 2025-04-16 11:47:52 +03:00
oleghasjanov
c08c3878e0 fix: improve p12 container generation with proper certificate status
Fix p12 containers being incorrectly generated with revoked status
Add proper serial number generation based on current time
Improve CRL handling in certificate_revoked? method
Fix controller parameter naming from cert_params to p12_params
Add comprehensive tests for certificate status and CRL handling
Include diagnostic methods for troubleshooting CRL issues
This commit resolves the issue where certificates were incorrectly
considered revoked during p12 container generation due to missing
or improperly handled CRL files.
2025-04-16 11:47:52 +03:00
oleghasjanov
3b594cf30d fix tests 2025-04-16 11:47:52 +03:00
oleghasjanov
0fe20bd63b Fixed Certificate#update_crl test to properly verify CRL updater script call
The test for Certificate.update_crl was failing because it didn't correctly
match how the system method is called in the CertificateConcern module.
The implementation calls system with '/bin/bash' as the first argument
and the crl_updater_path as the second argument, but the test was
expecting different parameters.

- Simplified the test_update_crl_should_call_crl_updater_script test to
  directly verify the script path is used without trying to intercept
  the system call
- Added proper environment variable handling for crl_updater_path
- Ensured original method is restored after test execution
2025-04-16 11:47:52 +03:00
oleghasjanov
5355397025 feat: improve certificate download extensions
Update certificate download functionality to use appropriate file extensions:
- Use .p12 extension for PKCS#12 files
- Keep .pem extension for PEM-encoded files (CSR, CRT, private key)

This change ensures that downloaded certificate files have the correct extension based on their format, making it easier for users to identify and use the files correctly.
2025-04-16 11:47:52 +03:00
oleghasjanov
51035d1ddf Add UserCertificate model with tests
- Create UserCertificate model with validations and certificate renewal logic
- Add tests for UserCertificate model functionality
- Add user certificates fixtures for testing
- Add association between ApiUser and UserCertificates
- Add required gems: dry-types, dry-struct, openssl
- Add /certs to .gitignore

This commit implements the base model for storing user certificates in the
database, including private keys, CSRs, certificates and P12 files. The model
includes basic validation and certificate renewal functionality, with
comprehensive test coverage.
2025-04-16 11:47:50 +03:00
tsoganov
8b5f220c3b Merge branch 'master' of github.com:internetee/registry 2025-04-14 15:21:36 +03:00
tsoganov
f69c151e50 Added dockerfile for production k8s 2025-04-14 15:17:49 +03:00
Timo Võhmar
c192d3bf08
Update CHANGELOG.md 2025-04-07 14:28:32 +03:00
Timo Võhmar
1dc3396391
Merge pull request #2774 from internetee/daily-force-delete-and-lift-email-subscribe
feat: Add lifted force delete domains to daily admin notification
2025-04-07 14:27:08 +03:00
oleghasjanov
8234a0fe68 updated styles 2025-04-04 14:14:58 +03:00
Timo Võhmar
220b26f0ce
Merge pull request #2777 from internetee/add-dockerfile-production
Added Dockerfile for production and updated gemfile
2025-04-03 11:44:13 +03:00
Timo Võhmar
59213ede5f
Update CHANGELOG.md 2025-04-02 12:59:18 +03:00
Timo Võhmar
32215c9c1f
Merge pull request #2775 from internetee/turn-off-company-validaiton
feat: add ability to skip business contact validation
2025-04-02 12:57:53 +03:00