ruborg 0.7.3 → 0.7.4
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 +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/ruborg/passbolt.rb +26 -4
- data/lib/ruborg/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b7697818fdf4537e02f840cb2f30c71cc3cbd6bbfc8cb8b72fe4bba7908deac
|
|
4
|
+
data.tar.gz: 2c509aec3d6586f7f3ea85aa84a621516e8ea73cd191ff325f8c33f056eb5a15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 711e51216fcc8e7522d32567f4a1759dccadb2d9691599b6408eb2f46187586dca3e837b45f7a7044a15117747b3a39ff5b083254ada2fd64f8e88f1c01e9f22
|
|
7
|
+
data.tar.gz: d7d2a732e8fbf38b33a2a5b39d35a820b98f22d3515656663c4e64fc8b589ca7ad5f49441e00f0b117118b04fe13c6ca036c28bcc6109b387a67275b5b8e7d1d
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.4] - 2025-10-09
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Passbolt Error Reporting**: Enhanced error handling for Passbolt CLI failures
|
|
14
|
+
- Now captures and logs stderr from Passbolt CLI commands
|
|
15
|
+
- Error messages include actual Passbolt CLI output for easier debugging
|
|
16
|
+
- Improved error logging with detailed failure context
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **Passbolt Environment Variables**: Passbolt env vars now explicitly passed to subprocess
|
|
20
|
+
- Preserves `PASSBOLT_SERVER_ADDRESS`, `PASSBOLT_USER_PRIVATE_KEY_FILE`, `PASSBOLT_USER_PASSWORD`
|
|
21
|
+
- Also preserves `PASSBOLT_GPG_HOME` and `PASSBOLT_CONFIG`
|
|
22
|
+
- Ensures Passbolt CLI has access to required configuration when run by Ruborg
|
|
23
|
+
|
|
10
24
|
## [0.7.3] - 2025-10-09
|
|
11
25
|
|
|
12
26
|
### Changed
|
data/lib/ruborg/passbolt.rb
CHANGED
|
@@ -17,11 +17,12 @@ module Ruborg
|
|
|
17
17
|
@logger&.info("Retrieving password from Passbolt (resource_id: #{@resource_id})")
|
|
18
18
|
|
|
19
19
|
cmd = ["passbolt", "get", "resource", "--id", @resource_id, "--json"]
|
|
20
|
-
output, status = execute_command(cmd)
|
|
20
|
+
output, status, error_msg = execute_command(cmd)
|
|
21
21
|
|
|
22
22
|
unless status
|
|
23
23
|
@logger&.error("Failed to retrieve password from Passbolt for resource #{@resource_id}")
|
|
24
|
-
|
|
24
|
+
error_detail = error_msg ? ": #{error_msg}" : ""
|
|
25
|
+
raise PassboltError, "Failed to retrieve password from Passbolt#{error_detail}"
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
@logger&.info("Successfully retrieved password from Passbolt")
|
|
@@ -38,8 +39,29 @@ module Ruborg
|
|
|
38
39
|
|
|
39
40
|
def execute_command(cmd)
|
|
40
41
|
require "open3"
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
# Preserve Passbolt environment variables
|
|
44
|
+
env = {}
|
|
45
|
+
%w[
|
|
46
|
+
PASSBOLT_SERVER_ADDRESS
|
|
47
|
+
PASSBOLT_USER_PRIVATE_KEY_FILE
|
|
48
|
+
PASSBOLT_USER_PASSWORD
|
|
49
|
+
PASSBOLT_GPG_HOME
|
|
50
|
+
PASSBOLT_CONFIG
|
|
51
|
+
].each do |var|
|
|
52
|
+
env[var] = ENV[var] if ENV[var]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
stdout, stderr, status = Open3.capture3(env, *cmd)
|
|
56
|
+
|
|
57
|
+
# Log stderr if command failed
|
|
58
|
+
error_msg = nil
|
|
59
|
+
if !status.success? && !stderr.strip.empty?
|
|
60
|
+
error_msg = stderr.strip
|
|
61
|
+
@logger&.error("Passbolt CLI error: #{error_msg}")
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
[stdout, status.success?, error_msg]
|
|
43
65
|
end
|
|
44
66
|
|
|
45
67
|
def parse_password(json_output)
|
data/lib/ruborg/version.rb
CHANGED