bullion 0.10.3 → 0.11.0
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/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +42 -42
- data/README.md +1 -1
- data/Rakefile +1 -0
- data/bullion.gemspec +1 -1
- data/db/migrate/20210104000000_create_accounts.rb +1 -1
- data/db/migrate/20250823073342_add_public_key_hash_to_accounts.rb +25 -0
- data/db/schema.rb +13 -12
- data/lib/bullion/models/account.rb +8 -1
- data/lib/bullion/version.rb +1 -1
- data/lib/bullion.rb +1 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95d9b8437f39397499aaa73d1b9abf932930ab46a29ac5f08d5ab2533b0c0b83
|
4
|
+
data.tar.gz: 78ca06dc463ffffd5e274bee516196d8cbaefe759b413fa5670fedc247c7c9a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '02358422a89125d538c4eb8b5c16d875121525658c11988209cc3bd8581c4cf8a7782d37a70ae2498a3d24e4e28015320d65e2d17285e14dce9f94ea09d69063'
|
7
|
+
data.tar.gz: 6d927f92fdd653b044bff00f9683f57a026e1cbd504867dd89b1061cbe92219f0da11612af700d6044c90d99accb588ba19e517875547fe039173683245517e8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.11.0](https://github.com/jgnagy/bullion/compare/bullion/v0.10.3...bullion/v0.11.0) (2025-08-23)
|
4
|
+
|
5
|
+
|
6
|
+
### ⚠ BREAKING CHANGES
|
7
|
+
|
8
|
+
* **db:** switch to Trilogy, update db indexes
|
9
|
+
|
10
|
+
### Features
|
11
|
+
|
12
|
+
* **db:** switch to Trilogy, update db indexes ([42b90b5](https://github.com/jgnagy/bullion/commit/42b90b5977cd497b46654ecf17085715fa6db080))
|
13
|
+
|
3
14
|
## [0.10.3](https://github.com/jgnagy/bullion/compare/bullion/v0.10.2...bullion/v0.10.3) (2025-08-23)
|
4
15
|
|
5
16
|
|
data/Gemfile.lock
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bullion (0.
|
4
|
+
bullion (0.11.0)
|
5
5
|
benchmark (~> 0.4)
|
6
6
|
dry-configurable (~> 1.1)
|
7
7
|
httparty (~> 0.21)
|
8
8
|
itsi (~> 0.2)
|
9
9
|
json (~> 2.6)
|
10
10
|
jwt (~> 2.7)
|
11
|
-
mysql2 (~> 0.5)
|
12
11
|
openssl (~> 3.0)
|
13
12
|
prometheus-client (~> 4.2)
|
14
13
|
sinatra (~> 3.1)
|
15
14
|
sinatra-activerecord (~> 2.0)
|
16
15
|
sinatra-contrib (~> 3.1)
|
17
16
|
sqlite3 (~> 2.7)
|
17
|
+
trilogy (~> 2.9)
|
18
18
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
acme-client (2.0.
|
22
|
+
acme-client (2.0.25)
|
23
23
|
base64 (~> 0.2)
|
24
24
|
faraday (>= 1.0, < 3.0.0)
|
25
25
|
faraday-retry (>= 1.0, < 3.0.0)
|
@@ -61,7 +61,7 @@ GEM
|
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
logger
|
63
63
|
zeitwerk (~> 2.6)
|
64
|
-
faraday (2.13.
|
64
|
+
faraday (2.13.4)
|
65
65
|
faraday-net_http (>= 2.0, < 3.5)
|
66
66
|
json
|
67
67
|
logger
|
@@ -75,18 +75,18 @@ GEM
|
|
75
75
|
multi_xml (>= 0.5.2)
|
76
76
|
i18n (1.14.7)
|
77
77
|
concurrent-ruby (~> 1.0)
|
78
|
-
itsi (0.2.
|
79
|
-
itsi-scheduler (~> 0.2.
|
80
|
-
itsi-server (~> 0.2.
|
81
|
-
itsi-scheduler (0.2.
|
78
|
+
itsi (0.2.19)
|
79
|
+
itsi-scheduler (~> 0.2.19)
|
80
|
+
itsi-server (~> 0.2.19)
|
81
|
+
itsi-scheduler (0.2.19)
|
82
82
|
rb_sys (~> 0.9.91)
|
83
|
-
itsi-server (0.2.
|
83
|
+
itsi-server (0.2.19)
|
84
84
|
json (~> 2)
|
85
85
|
prism (~> 1.4)
|
86
86
|
rack (>= 1.6)
|
87
87
|
rb_sys (~> 0.9.91)
|
88
88
|
jaro_winkler (1.6.1)
|
89
|
-
json (2.
|
89
|
+
json (2.13.2)
|
90
90
|
jwt (2.10.2)
|
91
91
|
base64
|
92
92
|
kramdown (2.5.1)
|
@@ -98,39 +98,38 @@ GEM
|
|
98
98
|
logger (1.7.0)
|
99
99
|
mini_mime (1.1.5)
|
100
100
|
minitest (5.25.5)
|
101
|
-
multi_json (1.
|
101
|
+
multi_json (1.17.0)
|
102
102
|
multi_xml (0.7.2)
|
103
103
|
bigdecimal (~> 3.1)
|
104
|
-
mustermann (3.0.
|
104
|
+
mustermann (3.0.4)
|
105
105
|
ruby2_keywords (~> 0.0.1)
|
106
|
-
mysql2 (0.5.6)
|
107
106
|
net-http (0.6.0)
|
108
107
|
uri
|
109
|
-
nokogiri (1.18.
|
108
|
+
nokogiri (1.18.9-aarch64-linux-gnu)
|
110
109
|
racc (~> 1.4)
|
111
|
-
nokogiri (1.18.
|
110
|
+
nokogiri (1.18.9-aarch64-linux-musl)
|
112
111
|
racc (~> 1.4)
|
113
|
-
nokogiri (1.18.
|
112
|
+
nokogiri (1.18.9-arm-linux-gnu)
|
114
113
|
racc (~> 1.4)
|
115
|
-
nokogiri (1.18.
|
114
|
+
nokogiri (1.18.9-arm-linux-musl)
|
116
115
|
racc (~> 1.4)
|
117
|
-
nokogiri (1.18.
|
116
|
+
nokogiri (1.18.9-arm64-darwin)
|
118
117
|
racc (~> 1.4)
|
119
|
-
nokogiri (1.18.
|
118
|
+
nokogiri (1.18.9-x86_64-darwin)
|
120
119
|
racc (~> 1.4)
|
121
|
-
nokogiri (1.18.
|
120
|
+
nokogiri (1.18.9-x86_64-linux-gnu)
|
122
121
|
racc (~> 1.4)
|
123
|
-
nokogiri (1.18.
|
122
|
+
nokogiri (1.18.9-x86_64-linux-musl)
|
124
123
|
racc (~> 1.4)
|
125
124
|
observer (0.1.2)
|
126
125
|
openssl (3.3.0)
|
127
|
-
ostruct (0.6.
|
126
|
+
ostruct (0.6.3)
|
128
127
|
parallel (1.27.0)
|
129
|
-
parser (3.3.
|
128
|
+
parser (3.3.9.0)
|
130
129
|
ast (~> 2.4.1)
|
131
130
|
racc
|
132
131
|
prism (1.4.0)
|
133
|
-
prometheus-client (4.2.
|
132
|
+
prometheus-client (4.2.5)
|
134
133
|
base64
|
135
134
|
racc (1.8.1)
|
136
135
|
rack (2.2.17)
|
@@ -142,11 +141,11 @@ GEM
|
|
142
141
|
rainbow (3.1.1)
|
143
142
|
rake (13.3.0)
|
144
143
|
rake-compiler-dock (1.9.1)
|
145
|
-
rb_sys (0.9.
|
144
|
+
rb_sys (0.9.117)
|
146
145
|
rake-compiler-dock (= 1.9.1)
|
147
146
|
rbs (3.9.4)
|
148
147
|
logger
|
149
|
-
regexp_parser (2.
|
148
|
+
regexp_parser (2.11.2)
|
150
149
|
reverse_markdown (3.0.0)
|
151
150
|
nokogiri
|
152
151
|
rexml (3.4.1)
|
@@ -162,8 +161,8 @@ GEM
|
|
162
161
|
rspec-mocks (3.13.5)
|
163
162
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
163
|
rspec-support (~> 3.13.0)
|
165
|
-
rspec-support (3.13.
|
166
|
-
rubocop (1.
|
164
|
+
rspec-support (3.13.5)
|
165
|
+
rubocop (1.80.0)
|
167
166
|
json (~> 2.3)
|
168
167
|
language_server-protocol (~> 3.17.0.2)
|
169
168
|
lint_roller (~> 1.1.0)
|
@@ -171,10 +170,10 @@ GEM
|
|
171
170
|
parser (>= 3.3.0.2)
|
172
171
|
rainbow (>= 2.2.2, < 4.0)
|
173
172
|
regexp_parser (>= 2.9.3, < 3.0)
|
174
|
-
rubocop-ast (>= 1.
|
173
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
175
174
|
ruby-progressbar (~> 1.7)
|
176
175
|
unicode-display_width (>= 2.4.0, < 4.0)
|
177
|
-
rubocop-ast (1.
|
176
|
+
rubocop-ast (1.46.0)
|
178
177
|
parser (>= 3.3.7.2)
|
179
178
|
prism (~> 1.4)
|
180
179
|
rubocop-rake (0.7.1)
|
@@ -193,7 +192,7 @@ GEM
|
|
193
192
|
simplecov-cobertura (2.1.0)
|
194
193
|
rexml
|
195
194
|
simplecov (~> 0.19)
|
196
|
-
simplecov-html (0.13.
|
195
|
+
simplecov-html (0.13.2)
|
197
196
|
simplecov_json_formatter (0.1.4)
|
198
197
|
sinatra (3.2.0)
|
199
198
|
mustermann (~> 3.0)
|
@@ -229,20 +228,21 @@ GEM
|
|
229
228
|
tilt (~> 2.0)
|
230
229
|
yard (~> 0.9, >= 0.9.24)
|
231
230
|
yard-solargraph (~> 0.1)
|
232
|
-
sqlite3 (2.7.
|
233
|
-
sqlite3 (2.7.
|
234
|
-
sqlite3 (2.7.
|
235
|
-
sqlite3 (2.7.
|
236
|
-
sqlite3 (2.7.
|
237
|
-
sqlite3 (2.7.
|
238
|
-
sqlite3 (2.7.
|
239
|
-
sqlite3 (2.7.
|
240
|
-
thor (1.
|
241
|
-
tilt (2.6.
|
231
|
+
sqlite3 (2.7.3-aarch64-linux-gnu)
|
232
|
+
sqlite3 (2.7.3-aarch64-linux-musl)
|
233
|
+
sqlite3 (2.7.3-arm-linux-gnu)
|
234
|
+
sqlite3 (2.7.3-arm-linux-musl)
|
235
|
+
sqlite3 (2.7.3-arm64-darwin)
|
236
|
+
sqlite3 (2.7.3-x86_64-darwin)
|
237
|
+
sqlite3 (2.7.3-x86_64-linux-gnu)
|
238
|
+
sqlite3 (2.7.3-x86_64-linux-musl)
|
239
|
+
thor (1.4.0)
|
240
|
+
tilt (2.6.1)
|
242
241
|
timeout (0.4.3)
|
242
|
+
trilogy (2.9.0)
|
243
243
|
tzinfo (2.0.6)
|
244
244
|
concurrent-ruby (~> 1.0)
|
245
|
-
unicode-display_width (3.1.
|
245
|
+
unicode-display_width (3.1.5)
|
246
246
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
247
247
|
unicode-emoji (4.0.4)
|
248
248
|
uri (1.0.3)
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ Whether run locally or via Docker, the following environment variables configure
|
|
36
36
|
| `CA_CERT_PATH` | `$CA_DIR/tls.crt` | Public cert for Bullion. If Bullion is an intermediate CA, you'll want to include the root CA's public cert in this file as well the signed cert for Bullion. |
|
37
37
|
| `CA_DOMAINS` | `example.com` | A comma-delimited list of domains for which Bullion will sign certificate requests. Subdomains are automatically allowed. Certificates containing other domains will be rejected. |
|
38
38
|
| `CERT_VALIDITY_DURATION` | `7776000` | How long should issued certs be valid (in seconds)? Default is 90 days. |
|
39
|
-
| `DATABASE_URL` | _None_ | **(Required)** A shorthand for telling Bullion how to connect to a database. Acceptable URLs will either begin with `sqlite3:` or [`
|
39
|
+
| `DATABASE_URL` | _None_ | **(Required)** A shorthand for telling Bullion how to connect to a database. Acceptable URLs will either begin with `sqlite3:` or [`trilogy://`](https://github.com/trilogy-libraries/trilogy/tree/main/contrib/ruby). |
|
40
40
|
| `DNS01_NAMESERVERS` | _None_ | A comma-delimited list of nameservers to use for resolving [DNS-01](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge) challenges. Usually you'll want this to be set to your _internal_ nameservers so internal names resolve correctly. When not set, it'll use the host's DNS. |
|
41
41
|
| `LOG_LEVEL` | `warn` | Log level for Bullion. Supported levels (starting with the noisiest) are debug, info, warn, error, and fatal. |
|
42
42
|
| `BULLION_PORT` | `9292` | TCP port Bullion will listen on. |
|
data/Rakefile
CHANGED
data/bullion.gemspec
CHANGED
@@ -32,13 +32,13 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_dependency "itsi", "~> 0.2"
|
33
33
|
spec.add_dependency "json", "~> 2.6"
|
34
34
|
spec.add_dependency "jwt", "~> 2.7"
|
35
|
-
spec.add_dependency "mysql2", "~> 0.5"
|
36
35
|
spec.add_dependency "openssl", "~> 3.0"
|
37
36
|
spec.add_dependency "prometheus-client", "~> 4.2"
|
38
37
|
spec.add_dependency "sinatra", "~> 3.1"
|
39
38
|
spec.add_dependency "sinatra-activerecord", "~> 2.0"
|
40
39
|
spec.add_dependency "sinatra-contrib", "~> 3.1"
|
41
40
|
spec.add_dependency "sqlite3", "~> 2.7"
|
41
|
+
spec.add_dependency "trilogy", "~> 2.9"
|
42
42
|
|
43
43
|
spec.add_development_dependency "acme-client", "~> 2.0"
|
44
44
|
spec.add_development_dependency "bundler", "~> 2.4"
|
@@ -5,7 +5,7 @@ class CreateAccounts < ActiveRecord::Migration[6.1]
|
|
5
5
|
def change
|
6
6
|
create_table :accounts do |t|
|
7
7
|
t.boolean :tos_agreed, null: false, default: true, index: true
|
8
|
-
t.text :public_key, null: false
|
8
|
+
t.text :public_key, null: false
|
9
9
|
t.text :contacts, null: false
|
10
10
|
|
11
11
|
t.timestamps
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bullion/models/account"
|
4
|
+
|
5
|
+
# Adds a public_key_hash column to the accounts table, ensuring uniqueness
|
6
|
+
class AddPublicKeyHashToAccounts < ActiveRecord::Migration[8.0]
|
7
|
+
def change
|
8
|
+
add_column :accounts, :public_key_hash, :string, null: false, limit: 44
|
9
|
+
add_index :accounts, :public_key_hash, unique: true
|
10
|
+
|
11
|
+
reversible do |dir|
|
12
|
+
dir.up do
|
13
|
+
say_with_time "Generating public_key_hash for existing accounts" do
|
14
|
+
require "digest"
|
15
|
+
|
16
|
+
Bullion::Models::Account.reset_column_information
|
17
|
+
Bullion::Models::Account.find_each do |account|
|
18
|
+
digest = Digest::SHA256.base64digest(account.public_key.to_json)
|
19
|
+
account.update_column(:public_key_hash, digest)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/db/schema.rb
CHANGED
@@ -10,22 +10,23 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema[8.0].define(version:
|
13
|
+
ActiveRecord::Schema[8.0].define(version: 2025_08_23_073342) do
|
14
14
|
create_table "accounts", force: :cascade do |t|
|
15
15
|
t.boolean "tos_agreed", default: true, null: false
|
16
16
|
t.text "public_key", null: false
|
17
17
|
t.text "contacts", null: false
|
18
18
|
t.datetime "created_at", null: false
|
19
19
|
t.datetime "updated_at", null: false
|
20
|
-
t.
|
20
|
+
t.string "public_key_hash", limit: 44, null: false
|
21
|
+
t.index ["public_key_hash"], name: "index_accounts_on_public_key_hash", unique: true
|
21
22
|
t.index ["tos_agreed"], name: "index_accounts_on_tos_agreed"
|
22
23
|
end
|
23
24
|
|
24
25
|
create_table "authorizations", force: :cascade do |t|
|
25
26
|
t.string "status", default: "pending", null: false
|
26
|
-
t.datetime "expires",
|
27
|
+
t.datetime "expires", null: false
|
27
28
|
t.text "identifier", null: false
|
28
|
-
t.
|
29
|
+
t.bigint "order_id"
|
29
30
|
t.datetime "created_at", null: false
|
30
31
|
t.datetime "updated_at", null: false
|
31
32
|
t.index ["expires"], name: "index_authorizations_on_expires"
|
@@ -52,10 +53,10 @@ ActiveRecord::Schema[8.0].define(version: 2021_01_06_060335) do
|
|
52
53
|
create_table "challenges", force: :cascade do |t|
|
53
54
|
t.string "acme_type", null: false
|
54
55
|
t.string "status", default: "pending", null: false
|
55
|
-
t.datetime "expires",
|
56
|
+
t.datetime "expires", null: false
|
56
57
|
t.string "token", null: false
|
57
|
-
t.datetime "validated"
|
58
|
-
t.
|
58
|
+
t.datetime "validated"
|
59
|
+
t.bigint "authorization_id"
|
59
60
|
t.datetime "created_at", null: false
|
60
61
|
t.datetime "updated_at", null: false
|
61
62
|
t.index ["acme_type"], name: "index_challenges_on_acme_type"
|
@@ -73,12 +74,12 @@ ActiveRecord::Schema[8.0].define(version: 2021_01_06_060335) do
|
|
73
74
|
|
74
75
|
create_table "orders", force: :cascade do |t|
|
75
76
|
t.string "status", default: "pending", null: false
|
76
|
-
t.datetime "expires",
|
77
|
+
t.datetime "expires", null: false
|
77
78
|
t.text "identifiers", null: false
|
78
|
-
t.datetime "not_before",
|
79
|
-
t.datetime "not_after",
|
80
|
-
t.
|
81
|
-
t.
|
79
|
+
t.datetime "not_before", null: false
|
80
|
+
t.datetime "not_after", null: false
|
81
|
+
t.bigint "certificate_id"
|
82
|
+
t.bigint "account_id"
|
82
83
|
t.datetime "created_at", null: false
|
83
84
|
t.datetime "updated_at", null: false
|
84
85
|
t.index ["account_id"], name: "index_orders_on_account_id"
|
@@ -7,10 +7,17 @@ module Bullion
|
|
7
7
|
serialize :contacts, coder: JSON
|
8
8
|
serialize :public_key, coder: JSON
|
9
9
|
|
10
|
-
validates_uniqueness_of :
|
10
|
+
validates_uniqueness_of :public_key_hash
|
11
11
|
|
12
12
|
has_many :orders
|
13
13
|
|
14
|
+
before_save :generate_public_key_hash
|
15
|
+
|
16
|
+
def generate_public_key_hash
|
17
|
+
digest = Digest::SHA256.base64digest(public_key.to_json)
|
18
|
+
self.public_key_hash = digest
|
19
|
+
end
|
20
|
+
|
14
21
|
def kid
|
15
22
|
id
|
16
23
|
end
|
data/lib/bullion/version.rb
CHANGED
data/lib/bullion.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Gnagy
|
@@ -93,20 +93,6 @@ dependencies:
|
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '2.7'
|
96
|
-
- !ruby/object:Gem::Dependency
|
97
|
-
name: mysql2
|
98
|
-
requirement: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0.5'
|
103
|
-
type: :runtime
|
104
|
-
prerelease: false
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0.5'
|
110
96
|
- !ruby/object:Gem::Dependency
|
111
97
|
name: openssl
|
112
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,6 +177,20 @@ dependencies:
|
|
191
177
|
- - "~>"
|
192
178
|
- !ruby/object:Gem::Version
|
193
179
|
version: '2.7'
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: trilogy
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - "~>"
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '2.9'
|
187
|
+
type: :runtime
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '2.9'
|
194
194
|
- !ruby/object:Gem::Dependency
|
195
195
|
name: acme-client
|
196
196
|
requirement: !ruby/object:Gem::Requirement
|
@@ -406,6 +406,7 @@ files:
|
|
406
406
|
- db/migrate/20210106052306_create_authorizations.rb
|
407
407
|
- db/migrate/20210106055421_create_challenges.rb
|
408
408
|
- db/migrate/20210106060335_create_nonces.rb
|
409
|
+
- db/migrate/20250823073342_add_public_key_hash_to_accounts.rb
|
409
410
|
- db/schema.rb
|
410
411
|
- lib/bullion.rb
|
411
412
|
- lib/bullion/acme/error.rb
|