Commit graph

248 commits

Author SHA1 Message Date
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
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
oleghasjanov
f2978599b4 feat: add admin contact ident type validation
- Add new setting for allowed admin contact ident types
- Add validation for admin contact ident types on domain create/update
- Add UI controls for managing allowed ident types
- Add tests for new validation rules
- Update domain model to respect new settings

The changes allow configuring which identification types (private person,
organization, birthday) are allowed for administrative contacts. This is
enforced when creating new domains or adding new admin contacts.
2025-02-03 13:59:03 +02:00
Sergei Tsoganov
31fac9eadf Fixed fixture 2023-12-21 17:35:38 +02:00
Sergei Tsoganov
c67a21c7ba Improved stats query 2023-12-21 17:26:01 +02:00
Sergei Tsoganov
7db8b5d970 Removed date_from attribute 2023-12-19 09:38:00 +02:00
Sergei Tsoganov
639da20cc6 Updated fixtures 2023-12-14 15:46:37 +02:00
Sergei Tsoganov
e73faae879 Refactored statistics caclulation 2023-12-14 13:26:31 +02:00
Sergei Tsoganov
9486e37e39 Updated fixtures 2023-06-02 10:43:38 +03:00
Sergei Tsoganov
a4d28a0ee2 Covered with tests api users and white ips 2023-06-01 16:27:34 +03:00
Sergei Tsoganov
21a3024e81 Updated setting_entries fixture 2023-05-31 15:11:48 +03:00
Sergei Tsoganov
0f16ec77f5 Added csv export to registrar api_users and white_ips 2023-05-15 14:11:46 +03:00
Sergei Tsoganov
b71a8ccf9f Modified csv export file for admin domains 2023-04-14 10:56:12 +03:00
Sergei Tsoganov
cc4d4d0e1f Corrected tests 2023-04-06 21:24:55 +03:00
Sergei Tsõganov
dc4c3cf616 Added market share growth rate data endpoint 2022-09-16 21:35:26 +03:00
olegphenomenon
e3cf0ff3d6 test for the auction view 2022-05-09 11:06:33 +03:00
Timo Võhmar
95780ec84a
Merge pull request #2315 from internetee/2307-bulk-change-poll-messages
Fixed notifications about automatic contact name update
2022-04-05 18:56:47 +03:00
Thiago Youssef
c240aef717 Improve csv tests 2022-04-05 12:06:53 +03:00
Sergei Tsõganov
216048463d Moved notifications about automatic contact name update to bulk change poll message 2022-03-25 18:08:55 +02:00
Thiago Youssef
1fac9d9618 Fix admin accounts CSV output 2022-03-14 12:12:22 +02:00
Thiago Youssef
7d79e6528d Fix admin invoices CSV output 2022-03-14 12:09:13 +02:00
Thiago Youssef
f44bdd1930 Fix admin contacts CSV output 2022-03-14 09:22:03 +02:00
Thiago Youssef
6263ded68f Fix admin domains CSV output 2022-03-11 14:37:46 +02:00
Thiago Youssef
807419bc3a Tests for domains csv download at admin 2022-03-09 15:37:30 +02:00
Thiago Youssef
71001ce056 Add file fixture to download history tests 2022-03-08 17:31:00 +02:00
dinsmol
7c7213c337 Fix tests 2022-01-15 23:09:31 +03:00
Sergei Tsõganov
abf1da8202 Added missing integration/system tests for account_activities 2021-12-28 11:01:28 +02:00
dinsmol
f0ee59bf46 fixed CSV headers, added tests 2021-09-23 12:51:21 +03:00
Timo Võhmar
22351c9053
Merge pull request #1814 from internetee/add-guard-clause-to-mass-nameserver-change
Bulk NS change: Verify CSV integrity
2021-06-25 14:43:00 +03:00
Timo Võhmar
2a9692cb03
Merge pull request #2039 from internetee/2306-csync-trim-whitespaces
2306-csync-trim-whitespaces
2021-06-21 14:51:42 +03:00
Timo Võhmar
e606db8200
Merge pull request #2043 from internetee/2030-support-multiple-schema-file-versions
fixed bag, added test
2021-06-18 16:06:18 +03:00
Oleg Hasjanov
285eb28ac6 refactoring, added webclient for system tests 2021-06-18 13:54:28 +03:00
Oleg Hasjanov
7c8c9120b5 added test 2021-06-17 16:02:40 +03:00
Alex Sherman
62312beb3a Add stripping of whitespaces existing dnskeys private key 2021-06-16 17:05:08 +05:00
Timo Võhmar
90b1bfca34
Merge pull request #1997 from internetee/1976-autoload-schema-versions
Load latest version of an xsd schema by prefix
2021-05-27 16:51:10 +03:00
Alex Sherman
d887bcd734 Add creation of csync inputs based on name_puny 2021-05-27 12:43:50 +05:00
Alex Sherman
45dfa57529 Move class to lib, add sugar, add tests 2021-05-20 17:13:26 +05:00
Alex Sherman
838522b81a Add support for PG interval field 2021-05-06 12:15:15 +05:00
Oleg Hasjanov
6f08360d41 added system test for invalid csv file 2021-04-30 17:45:14 +03:00
Alex Sherman
56565d66d8 Get rid of unused fixture 2021-03-30 16:26:53 +05:00
Karl Erik Õunapuu
88e1bc3727 parent 64e3bc885a2cb8b46a1aaa4bf4f121ee7f5d44a6
author Karl Erik Õunapuu <karlerik@kreative.ee> 1591359032 +0300
committer Alex Sherman <yul.golem@gmail.com> 1617029320 +0500

CsyncJob: Don't respect IPv6 if nessecary
2021-03-30 14:22:45 +05:00
Alex Sherman
b708cebbfd Add update endpoint for ContactRequests 2021-02-03 15:14:40 +05:00
Timo Võhmar
18790071c9
Merge pull request #1749 from internetee/1739-ns-bulk-change-test-and-whois-update
Registrar: Update WHOIS after bulk nameserver change
2021-01-06 20:14:58 +02:00
Karl Erik Õunapuu
c1aa286e90
Merge remote-tracking branch 'origin/master' into 1739-ns-bulk-change-test-and-whois-update 2020-12-28 16:22:19 +02:00
Karl Erik Õunapuu
38cefe7255
Allow explicit reason for force delete mail template 2020-12-28 12:57:06 +02:00
Karl Erik Õunapuu
8a046b59bf
Fix merge conflicts 2020-12-28 11:39:13 +02:00
Karl Erik Õunapuu
4adc240b0b
Merge branch 'master' into log-bounced-emails 2020-12-04 13:46:48 +02:00