hephaestus 0.8.15.4 → 0.8.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3b5cd0cf6fc559d74c9caa5f801a99be5f2c2615788389c180a6258c2894a0f
4
- data.tar.gz: 984ba33d4aeded9f438f67e3ab94e25bfff3f34b4a3cb591732641e9b9e2774e
3
+ metadata.gz: f141bfecf20df190360c8c07e940e02c2a9e3a9273e2b9c3a3acb3bf0cb35cd5
4
+ data.tar.gz: 44feab3fcbf8e863111293651bb1e87c75ae24af25f1563b61256b8e154141de
5
5
  SHA512:
6
- metadata.gz: 81f0d1e36d1bcf846d43f1620c21cb03a2c2d676179b3f731ab4ebc9e75e547aa785a8f30745cf7bc02d9f7a543838edc40f6e39bfe504cae52ef652d15bd4ca
7
- data.tar.gz: 898187ff9d79d17d23e5415c063721bf943f1cd92e79cec3508ce13ce65ca47c9e4a54cd7c80cba248e9135d1b99f25b4873a857ba5af26381ed7d2534b8641f
6
+ metadata.gz: ccb5ea73b4707487c46242394367680a8488dbf77180597f016771e3d4d89990b123ace277cf8414a10729d849dbe1939538310d179cd4037db190adda3d9963
7
+ data.tar.gz: dcc54b5a9195f4e4955b2450c7e1c08c930dc38ffaa7b47fa27792589a354f4a67bfcc82ddd8b2bd5b8c3d71923269a5eb857140f7e3ca37b87b964bd2292c9b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [v0.8.16] - 26-01-2025
2
+ ## What's Changed
3
+ * Point to new API url by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/105
4
+
5
+
6
+ **Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.15.5...v0.8.16
7
+ # [v0.8.15.5] - 16-01-2025
8
+ **Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.15.4...v0.8.15.5
1
9
  # [v0.8.15.4] - 16-01-2025
2
10
  **Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.15.3...v0.8.15.4
3
11
  # [v0.8.15.3] - 16-01-2025
@@ -17,7 +17,7 @@ module Hephaestus
17
17
  return bad_request unless yetto_signature.start_with?("sha256=")
18
18
 
19
19
  hmac_header = yetto_signature.split("sha256=").last
20
- body = request.env.fetch("RAW_POST_DATA", "")
20
+ body = request.raw_post
21
21
 
22
22
  calculated_hmac = OpenSSL::HMAC.hexdigest(SHA256_DIGEST, Hephaestus::YETTO_SIGNING_SECRET, body)
23
23
 
@@ -6,7 +6,7 @@ OP_INFRA_SECRETS = {}
6
6
 
7
7
  def fetch_vault_secret(label:, default: "")
8
8
  if productionish?
9
- OP_VAULT_SECRETS.delete(label) || raise("Secret `#{label}` not found in 1Password")
9
+ OP_VAULT_SECRETS.delete(label) || Rails.logger.error("Secret `#{label}` not found in 1Password")
10
10
  else
11
11
  ENV.fetch(label, default.is_a?(Pathname) ? default.read : default)
12
12
  end
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  def fetch_infra_secret(label:, default: "")
16
16
  if productionish?
17
- OP_INFRA_SECRETS.delete(label) || raise("Secret `#{label}` not found in 1Password")
17
+ OP_INFRA_SECRETS.delete(label) || Rails.logger.error("Secret `#{label}` not found in 1Password")
18
18
  else
19
19
  ENV.fetch(label, default.is_a?(Pathname) ? default.read : default)
20
20
  end
@@ -24,7 +24,7 @@ def op_load_vault_into_env(vault:, tag: nil)
24
24
  include_sudo = !Rails.env.local? ? "sudo -E " : ""
25
25
  include_tag = tag ? " --tags #{tag} " : ""
26
26
  %x(#{include_sudo}op item list --vault #{vault}#{include_tag}--format json | #{include_sudo}op item get - --reveal --format=json).tap do
27
- raise "Failed to fetch value `#{vault}` for `#{tag}` from 1Password" unless $CHILD_STATUS.success?
27
+ Rails.logger.error("Failed to fetch value `#{vault}` for `#{tag}` from 1Password") unless $CHILD_STATUS.success?
28
28
  end
29
29
  end
30
30
 
@@ -80,16 +80,28 @@ module Hephaestus
80
80
  end
81
81
 
82
82
  PROTOCOL = Rails.env.development? ? "http://" : "https://"
83
- YETTO_URL = if Rails.env.production?
84
- "web.yetto.app"
83
+
84
+ YETTO_DOMAIN = if Rails.env.production?
85
+ "yetto.app"
85
86
  elsif Rails.env.staging?
86
- "web.yetto.dev"
87
- elsif Rails.env.development?
88
- "localhost:3000"
87
+ "yetto.dev"
89
88
  elsif Rails.env.test?
90
- "web.yetto.test"
89
+ "yetto.test"
90
+ end
91
+ YETTO_URL = if Rails.env.development?
92
+ "localhost:3000"
93
+ else
94
+ "web.#{YETTO_DOMAIN}"
91
95
  end
92
96
 
97
+ YETTO_API_URL = if Rails.env.local?
98
+ "localhost:3000/api"
99
+ else
100
+ "api.#{YETTO_DOMAIN}"
101
+ end
102
+
103
+ YETTO_REDIRECT_URL = productionish? ? "#{PROTOCOL}#{YETTO_URL}" : "#{PROTOCOL}127.0.0.1:3000"
104
+
93
105
  # Every plug has secrets; to reduce the amount of API calls to 1Password,
94
106
  # we can grab one document that contains all the secrets we need
95
107
  if productionish?
@@ -114,9 +126,6 @@ module Hephaestus
114
126
  end
115
127
  end
116
128
 
117
- YETTO_API_URL = "#{YETTO_URL}/api"
118
- YETTO_REDIRECT_URL = productionish? ? "#{PROTOCOL}#{YETTO_URL}" : "#{PROTOCOL}127.0.0.1:3000"
119
-
120
129
  YETTO_PLUG_PEM = fetch_vault_secret(
121
130
  label: "YETTO_PLUG_PEM",
122
131
  default: Rails.root.join("test/fixtures/files/fake_pem_file/fake.pem"),
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Hephaestus
5
- VERSION = "0.8.15.4"
5
+ VERSION = "0.8.16"
6
6
  RAILS_VERSION = ">= 8.0"
7
7
  RUBY_VERSION = File
8
8
  .read("#{File.dirname(__FILE__)}/../../.ruby-version")
@@ -294,4 +294,4 @@ app/javascript/controllers/*.js
294
294
  !app/javascript/controllers/index.js
295
295
 
296
296
  security_results.json
297
- vendor/cache/
297
+ vendor/cache
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hephaestus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.15.4
4
+ version: 0.8.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-16 00:00:00.000000000 Z
11
+ date: 2025-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap