digicert 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.hound.yml +3 -0
  4. data/.rspec +0 -1
  5. data/.rubocop.yml +629 -0
  6. data/.sample.env +4 -0
  7. data/.sample.pryrc +3 -0
  8. data/.travis.yml +5 -2
  9. data/LICENSE.txt +21 -0
  10. data/README.md +812 -9
  11. data/bin/console +2 -5
  12. data/bin/rspec +17 -0
  13. data/digicert.gemspec +7 -14
  14. data/lib/digicert.rb +40 -2
  15. data/lib/digicert/actions.rb +9 -0
  16. data/lib/digicert/actions/all.rb +27 -0
  17. data/lib/digicert/actions/base.rb +11 -0
  18. data/lib/digicert/actions/create.rb +25 -0
  19. data/lib/digicert/actions/fetch.rb +21 -0
  20. data/lib/digicert/actions/update.rb +25 -0
  21. data/lib/digicert/base.rb +35 -0
  22. data/lib/digicert/base_order.rb +39 -0
  23. data/lib/digicert/certificate.rb +43 -0
  24. data/lib/digicert/certificate_downloader.rb +137 -0
  25. data/lib/digicert/certificate_request.rb +19 -0
  26. data/lib/digicert/client_certificate/base.rb +17 -0
  27. data/lib/digicert/client_certificate/digital_signature_plus.rb +13 -0
  28. data/lib/digicert/client_certificate/email_security_plus.rb +13 -0
  29. data/lib/digicert/client_certificate/premium.rb +17 -0
  30. data/lib/digicert/config.rb +21 -0
  31. data/lib/digicert/configuration.rb +26 -0
  32. data/lib/digicert/container.rb +35 -0
  33. data/lib/digicert/container_template.rb +32 -0
  34. data/lib/digicert/csr_generator.rb +43 -0
  35. data/lib/digicert/debugger.rb +34 -0
  36. data/lib/digicert/domain.rb +59 -0
  37. data/lib/digicert/duplicate_certificate.rb +21 -0
  38. data/lib/digicert/duplicate_certificate_finder.rb +42 -0
  39. data/lib/digicert/email_validation.rb +35 -0
  40. data/lib/digicert/errors.rb +30 -0
  41. data/lib/digicert/errors/forbidden.rb +9 -0
  42. data/lib/digicert/errors/request_error.rb +37 -0
  43. data/lib/digicert/errors/server_error.rb +9 -0
  44. data/lib/digicert/errors/unauthorized.rb +9 -0
  45. data/lib/digicert/expiring_order.rb +21 -0
  46. data/lib/digicert/findable.rb +33 -0
  47. data/lib/digicert/order.rb +81 -0
  48. data/lib/digicert/order_cancellation.rb +25 -0
  49. data/lib/digicert/order_duplicator.rb +11 -0
  50. data/lib/digicert/order_manager.rb +39 -0
  51. data/lib/digicert/order_reissuer.rb +11 -0
  52. data/lib/digicert/organization.rb +43 -0
  53. data/lib/digicert/product.rb +14 -0
  54. data/lib/digicert/request.rb +123 -0
  55. data/lib/digicert/response.rb +30 -0
  56. data/lib/digicert/ssl_certificate/base.rb +9 -0
  57. data/lib/digicert/ssl_certificate/ssl_ev_plus.rb +13 -0
  58. data/lib/digicert/ssl_certificate/ssl_plus.rb +13 -0
  59. data/lib/digicert/ssl_certificate/ssl_wildcard.rb +13 -0
  60. data/lib/digicert/version.rb +23 -1
  61. data/spec/acceptance/certificate_download_spec.rb +68 -0
  62. data/spec/acceptance/duplicating_certificate_spec.rb +86 -0
  63. data/spec/acceptance/reissuing_certificate_spec.rb +104 -0
  64. data/spec/digicert/actions/all_spec.rb +26 -0
  65. data/spec/digicert/actions/create_spec.rb +47 -0
  66. data/spec/digicert/actions/fetch_spec.rb +28 -0
  67. data/spec/digicert/actions/update_spec.rb +39 -0
  68. data/spec/digicert/certificate_downloader_spec.rb +89 -0
  69. data/spec/digicert/certificate_request_spec.rb +49 -0
  70. data/spec/digicert/certificate_spec.rb +93 -0
  71. data/spec/digicert/client_certificate/digital_signature_plus_spec.rb +32 -0
  72. data/spec/digicert/client_certificate/email_security_plus_spec.rb +36 -0
  73. data/spec/digicert/client_certificate/premium_spec.rb +34 -0
  74. data/spec/digicert/config_spec.rb +39 -0
  75. data/spec/digicert/container_spec.rb +44 -0
  76. data/spec/digicert/container_template_spec.rb +32 -0
  77. data/spec/digicert/csr_generator_spec.rb +31 -0
  78. data/spec/digicert/domain_spec.rb +89 -0
  79. data/spec/digicert/duplicate_certificate_finder_spec.rb +27 -0
  80. data/spec/digicert/duplicate_certificate_spec.rb +15 -0
  81. data/spec/digicert/email_validation_spec.rb +26 -0
  82. data/spec/digicert/expiring_order_spec.rb +16 -0
  83. data/spec/digicert/findable_spec.rb +19 -0
  84. data/spec/digicert/order_cancellation_spec.rb +24 -0
  85. data/spec/digicert/order_duplicator_spec.rb +35 -0
  86. data/spec/digicert/order_reissuer_spec.rb +35 -0
  87. data/spec/digicert/order_spec.rb +134 -0
  88. data/spec/digicert/organization_spec.rb +61 -0
  89. data/spec/digicert/product_spec.rb +28 -0
  90. data/spec/digicert/request_spec.rb +47 -0
  91. data/spec/digicert/ssl_certificate/ssl_ev_plus_spec.rb +35 -0
  92. data/spec/digicert/ssl_certificate/ssl_plus_spec.rb +36 -0
  93. data/spec/digicert/ssl_certificate/ssl_wildcard_spec.rb +35 -0
  94. data/spec/fixtures/certificate.pem +79 -0
  95. data/spec/fixtures/certificate.zip +0 -0
  96. data/spec/fixtures/certificate_request.json +116 -0
  97. data/spec/fixtures/certificate_requests.json +59 -0
  98. data/spec/fixtures/certificate_revoked.json +13 -0
  99. data/spec/fixtures/container.json +15 -0
  100. data/spec/fixtures/container_created.json +3 -0
  101. data/spec/fixtures/container_template.json +15 -0
  102. data/spec/fixtures/container_templates.json +14 -0
  103. data/spec/fixtures/containers.json +14 -0
  104. data/spec/fixtures/domain.json +71 -0
  105. data/spec/fixtures/domain_created.json +3 -0
  106. data/spec/fixtures/domains.json +49 -0
  107. data/spec/fixtures/email_validations.json +17 -0
  108. data/spec/fixtures/empty.json +0 -0
  109. data/spec/fixtures/errors.json +6 -0
  110. data/spec/fixtures/expiring_orders.json +20 -0
  111. data/spec/fixtures/order.json +107 -0
  112. data/spec/fixtures/order_created.json +9 -0
  113. data/spec/fixtures/order_duplicated.json +8 -0
  114. data/spec/fixtures/order_duplications.json +57 -0
  115. data/spec/fixtures/order_reissued.json +8 -0
  116. data/spec/fixtures/orders.json +93 -0
  117. data/spec/fixtures/organization.json +35 -0
  118. data/spec/fixtures/organization_created.json +3 -0
  119. data/spec/fixtures/organizations.json +84 -0
  120. data/spec/fixtures/ping.json +3 -0
  121. data/spec/fixtures/product.json +71 -0
  122. data/spec/fixtures/products.json +100 -0
  123. data/spec/fixtures/rsa4096.key +51 -0
  124. data/spec/requests/certificate_duplication_spec.rb +41 -0
  125. data/spec/requests/certificate_generation_spec.rb +93 -0
  126. data/spec/requests/certificate_reissuing_spec.rb +38 -0
  127. data/spec/requests/container_management_spec.rb +36 -0
  128. data/spec/requests/domain_management_spec.rb +64 -0
  129. data/spec/requests/order_client_email_security_plus_spec.rb +38 -0
  130. data/spec/requests/order_management_spec.rb +24 -0
  131. data/spec/requests/order_ssl_ev_plus_spec.rb +57 -0
  132. data/spec/requests/order_ssl_wildcard_spec.rb +57 -0
  133. data/spec/requests/organization_management_spec.rb +22 -0
  134. data/spec/requests/product_management_spec.rb +24 -0
  135. data/spec/requests/request_management_spec.rb +24 -0
  136. data/spec/spec_helper.rb +35 -0
  137. data/spec/support/fake_digicert_api.rb +324 -0
  138. metadata +162 -5
@@ -0,0 +1,61 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Digicert::Organization do
4
+ describe ".all" do
5
+ it "retrieves the list of organizations" do
6
+ stub_digicert_organization_list_api
7
+ organizations = Digicert::Organization.all
8
+
9
+ expect(organizations.first.id).not_to be_nil
10
+ expect(organizations.first.name).not_to be_nil
11
+ expect(organizations.first.is_active).to eq(true)
12
+ expect(organizations.first.container.id).not_to be_nil
13
+ end
14
+ end
15
+
16
+ describe ".create" do
17
+ it "creates a new organization" do
18
+ stub_digicert_organization_create_api(organization_attributes)
19
+ organization = Digicert::Organization.create(organization_attributes)
20
+
21
+ expect(organization.id).not_to be_nil
22
+ end
23
+ end
24
+
25
+ describe ".fetch" do
26
+ it "retrieves the specified organization details" do
27
+ organization_id = 123_456_789
28
+
29
+ stub_digicert_organization_fetch_api(organization_id)
30
+ organization = Digicert::Organization.fetch(organization_id)
31
+
32
+ expect(organization.id).not_to be_nil
33
+ expect(organization.name).not_to be_nil
34
+ expect(organization.container.id).not_to be_nil
35
+ end
36
+ end
37
+
38
+ def organization_attributes
39
+ {
40
+ name: "digicert, inc.",
41
+ address: "333 s 520 w",
42
+ zip: 84042,
43
+ city: "lindon",
44
+ state: "utah",
45
+ country: "us",
46
+ telephone: 8015551212,
47
+ container: { id: 17 },
48
+
49
+ organization_contact: {
50
+ first_name: "Some",
51
+ last_name: "Guy",
52
+ email: "someguy@digicert.com",
53
+ telephone: 8015551212,
54
+ },
55
+
56
+ # Optional attributes
57
+ assumed_name: "DigiCert",
58
+ address2: "Suite 500",
59
+ }
60
+ end
61
+ end
@@ -0,0 +1,28 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Digicert::Product do
4
+ describe ".all" do
5
+ it "retrieves all of the products" do
6
+ stub_digicert_product_list_api
7
+ products = Digicert::Product.all
8
+
9
+ expect(products.count).to eq(16)
10
+ expect(products.first.name).not_to be_nil
11
+ expect(products.first.type).not_to be_nil
12
+ expect(products.first.name_id).not_to be_nil
13
+ end
14
+ end
15
+
16
+ describe ".fetch" do
17
+ it "retrieves the specified product" do
18
+ product_name_id = "ssl_plus"
19
+
20
+ stub_digicert_product_fetch_api(product_name_id)
21
+ product = Digicert::Product.fetch(product_name_id)
22
+
23
+ expect(product.name).to eq("SSL Plus")
24
+ expect(product.type).to eq("ssl_certificate")
25
+ expect(product.server_platforms.first.name).to eq("Apache")
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,47 @@
1
+ require "spec_helper"
2
+ require "digicert/request"
3
+
4
+ RSpec.describe Digicert::Request do
5
+ describe "#run" do
6
+ context "with 2xx response" do
7
+ it "retrieves a resource via a specified http verb" do
8
+ stub_ping_request_via_get
9
+ response = Digicert::Request.new(:get, "ping").run
10
+
11
+ expect(response.code.to_i).to eq(200)
12
+ expect(response.class).to eq(Net::HTTPOK)
13
+ end
14
+ end
15
+
16
+ context "with 4xx, 5xx responses" do
17
+ it "raises the proper response error" do
18
+ stub_invalid_ping_request_via_get
19
+ request = Digicert::Request.new(:get, "ping")
20
+
21
+ expect{ request.run }.to raise_error(/not_found\|route/)
22
+ end
23
+ end
24
+ end
25
+
26
+ describe "#parse" do
27
+ it "retrives and parse the resource to object" do
28
+ stub_ping_request_via_get
29
+ response = Digicert::Request.new(:get, "ping").parse
30
+
31
+ expect(response.data).to eq("Pong!")
32
+ end
33
+ end
34
+
35
+ def stub_ping_request_via_get
36
+ # This helper method is defined in `spec/support/fake_digicert_api`
37
+ # all it does it verify the request verb, end_point and and data along
38
+ # with the digicert request headers, and once satisfied then it will
39
+ # reponse with an identical json file that can be found in `fixtures`
40
+ #
41
+ stub_api_response(:get, "ping", filename: "ping")
42
+ end
43
+
44
+ def stub_invalid_ping_request_via_get
45
+ stub_api_response(:get, "ping", filename: "errors", status: 404)
46
+ end
47
+ end
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Digicert::SSLCertificate::SSLEVPlus do
4
+ describe ".create" do
5
+ it "creates a new order for a SSL EV Plus certificate" do
6
+ stub_digicert_order_create_api("ssl_ev_plus", order_attributes)
7
+ order = Digicert::SSLCertificate::SSLEVPlus.create(order_attributes)
8
+
9
+ expect(order.id).not_to be_nil
10
+ expect(order.requests.first.id).not_to be_nil
11
+ expect(order.requests.first.status).to eq("pending")
12
+ end
13
+ end
14
+
15
+ def order_attributes
16
+ {
17
+ certificate: {
18
+ organization_units: ["Developer Operations"],
19
+ server_platform: { id: 45 },
20
+ profile_option: "some_ssl_profile",
21
+
22
+ # Required for certificate
23
+ csr: "------ [CSR HERE] ------",
24
+ common_name: "digicert.com",
25
+ signature_hash: "sha256",
26
+ },
27
+ organization: { id: 117483 },
28
+ validity_years: 3,
29
+ custom_expiration_date: "2017-05-18",
30
+ comments: "Comments for the the approver",
31
+ disable_renewal_notifications: false,
32
+ renewal_of_order_id: 314152,
33
+ }
34
+ end
35
+ end
@@ -0,0 +1,36 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Digicert::SSLCertificate::SSLPlus do
4
+ describe ".create" do
5
+ it "creates a new order for ssl plus certificate" do
6
+ stub_digicert_order_create_api("ssl_plus", order_attributes)
7
+ order = Digicert::SSLCertificate::SSLPlus.create(order_attributes)
8
+
9
+ expect(order.id).not_to be_nil
10
+ expect(order.requests.first.id).not_to be_nil
11
+ expect(order.requests.first.status).not_to be_nil
12
+ end
13
+ end
14
+
15
+ def order_attributes
16
+ {
17
+ certificate: {
18
+ organization_units: ["Developer Operations"],
19
+ server_platform: { id: 45 },
20
+ profile_option: "some_ssl_profile",
21
+
22
+ # Required for certificate
23
+ csr: "------ [CSR HERE] ------",
24
+ common_name: "digicert.com",
25
+ signature_hash: "sha256",
26
+ },
27
+ organization: { id: 117483 },
28
+ validity_years: 3,
29
+ custom_expiration_date: "2017-05-18",
30
+ comments: "Comments for the the approver",
31
+ disable_renewal_notifications: false,
32
+ renewal_of_order_id: 314152,
33
+ payment_method: "balance",
34
+ }
35
+ end
36
+ end
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Digicert::SSLCertificate::SSLWildcard do
4
+ describe ".create" do
5
+ it "creates a new order for a ssl wildcard certificate" do
6
+ stub_digicert_order_create_api("ssl_wildcard", order_attributes)
7
+ order = Digicert::SSLCertificate::SSLWildcard.create(order_attributes)
8
+
9
+ expect(order.id).not_to be_nil
10
+ expect(order.requests.first.id).not_to be_nil
11
+ expect(order.requests.first.status).to eq("pending")
12
+ end
13
+ end
14
+
15
+ def order_attributes
16
+ {
17
+ certificate: {
18
+ organization_units: ["Developer Operations"],
19
+ server_platform: { id: 45 },
20
+ profile_option: "some_ssl_profile",
21
+
22
+ # Required for certificate
23
+ csr: "------ [CSR HERE] ------",
24
+ common_name: "digicert.com",
25
+ signature_hash: "sha256",
26
+ },
27
+ organization: { id: 117483 },
28
+ validity_years: 3,
29
+ custom_expiration_date: "2017-05-18",
30
+ comments: "Comments for the the approver",
31
+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TTo1eqUKKPC3eQyaKl7hLOllsB
66
+ CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
67
+ nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
68
+ 43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P
69
+ T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4
70
+ gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO
71
+ BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR
72
+ TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw
73
+ DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr
74
+ hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
75
+ 06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
76
+ PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
77
+ YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
78
+ CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
79
+ -----END CERTIFICATE-----
Binary file
@@ -0,0 +1,116 @@
1
+ {
2
+ "id": 123456789,
3
+ "date": "2014-08-19T18:16:07+00:00",
4
+ "type": "new_request",
5
+ "status": "pending",
6
+ "date_processed": "2014-08-19T18:17:07+00:00",
7
+ "requester": {
8
+ "id": 151435,
9
+ "first_name": "Clive",
10
+ "last_name": "Collegedean",
11
+ "email": "clivecollegedean@digicert.com"
12
+ },
13
+ "processor": {
14
+ "id": 154478,
15
+ "first_name": "John",
16
+ "last_name": "Smith",
17
+ "email": "john.smith@digicert.com"
18
+ },
19
+ "order": {
20
+ "id": 542757,
21
+ "certificate": {
22
+ "common_name": "www.example.com",
23
+ "dns_names": [
24
+ "www.example.com"
25
+ ],
26
+ "date_created": "2014-12-04T20:32:59+00:00",
27
+ "csr": "------ [CSR HERE] ------",
28
+ "organization": {
29
+ "id": 123456,
30
+ "name": "DigiCert Inc",
31
+ "city": "Lehi",
32
+ "state": "Utah",
33
+ "country": "US"
34
+ },
35
+ "server_platform": {
36
+ "id": 31,
37
+ "name": "nginx",
38
+ "install_url": "https:\/\/www.digicert.com\/ssl-certificate-installation-nginx.htm",
39
+ "csr_url": "https:\/\/www.digicert.com\/csr-creation-nginx.htm"
40
+ },
41
+ "signature_hash": "sha256",
42
+ "key_size": 2048,
43
+ "ca_cert": {
44
+ "id": "1E2F5A55FEA1A",
45
+ "name": "DigiCert High Assurance SHA2"
46
+ }
47
+ },
48
+ "status": "issued",
49
+ "is_renewal": true,
50
+ "date_created": "2014-04-10T19:32:59+00:00",
51
+ "organization": {
52
+ "id": 123456,
53
+ "name": "DigiCert Inc",
54
+ "city": "Lehi",
55
+ "state": "Utah",
56
+ "country": "US"
57
+ },
58
+ "validity_years": 2,
59
+ "disable_renewal_notifications": false,
60
+ "auto_renew": 0,
61
+ "container": {
62
+ "id": 5,
63
+ "name": "College of Science"
64
+ },
65
+ "product": {
66
+ "name_id": "ssl_plus",
67
+ "name": "SSL Plus",
68
+ "type": "ssl_certificate",
69
+ "validation_type": "code_signing_certificate",
70
+ "validation_name": "EV CS",
71
+ "validation_description": "Code Signing Organization Extended Validation (EV CS)"
72
+ },
73
+ "organization_contact": {
74
+ "first_name": "Jay",
75
+ "last_name": "Smith",
76
+ "email": "Jay.Smith@digicert.com",
77
+ "job_title": "VP",
78
+ "telephone": "8015555555"
79
+ },
80
+ "technical_contact": {
81
+ "first_name": "Jay",
82
+ "last_name": "Smith",
83
+ "email": "Jay.Smith@digicert.com",
84
+ "job_title": "VP",
85
+ "telephone": "8015555555"
86
+ },
87
+ "user": {
88
+ "id": 4564312,
89
+ "first_name": "first",
90
+ "last_name": "name",
91
+ "email": "first.name@digicert.com"
92
+ },
93
+ "requests": [
94
+ {
95
+ "id": 4321,
96
+ "date": "2014-04-10T19:32:59+00:00",
97
+ "type": "new request",
98
+ "status": "pending",
99
+ "comments": "request comments"
100
+ }
101
+ ],
102
+ "cs_provisioning_method": "ship_token",
103
+ "ship_info": {
104
+ "name": "Some Guy",
105
+ "addr1": "333 S 520 W",
106
+ "addr2": "Suite 500",
107
+ "city": "Lindon",
108
+ "state": "Utah",
109
+ "zip": 84042,
110
+ "country": "US",
111
+ "method": "STANDARD"
112
+ }
113
+ },
114
+ "comments": "Comments for the approver",
115
+ "processor_comment": "Comment left by the person who approved\/rejected the request."
116
+ }