smart_proxy_container_gateway 4.0.1 → 4.0.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51be06cfca565b2e088e6f96c24d4b8eacb5818b0a8a9c8696910864302e7eaa
|
|
4
|
+
data.tar.gz: 3b166dc90aef6c94cf45f5846cebbf67a89398600043db1065dd8ea1d367b0ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 115ddb179a2f0c07e956fc104a93e2d9b09c96ff79c32cc5ce4559a6880c58ea3318b6df7e91b146d74f2bad38a26a8346a97633cb4fa4f08a5ac183b34ea71f
|
|
7
|
+
data.tar.gz: '08b1fcac07ae9a2ecc9186f70fceac3369080035775a49966638c4d4f41fdd6db2cdc2230d0de9a24690a2e1870c673baffeba30b1c73e1f23c6fc771f7ac09a'
|
|
@@ -181,11 +181,11 @@ module Proxy
|
|
|
181
181
|
get '/v2/token' do
|
|
182
182
|
response.headers['Docker-Distribution-API-Version'] = 'registry/2.0'
|
|
183
183
|
|
|
184
|
-
# Flatpak
|
|
185
|
-
#
|
|
186
|
-
#
|
|
187
|
-
#
|
|
188
|
-
if
|
|
184
|
+
# Some clients (e.g. Flatpak, Cincinnati) do not include the account
|
|
185
|
+
# query parameter in the token request. Extract the username from the
|
|
186
|
+
# Base64-encoded Basic Authorization header and use it as the account
|
|
187
|
+
# param when inserting a new token record.
|
|
188
|
+
if request.params['account'].nil? && auth_header.raw_header.present?
|
|
189
189
|
encoded_string = auth_header.raw_header&.split(' ')&.[](1)
|
|
190
190
|
decoded_string = Base64.decode64(encoded_string) if encoded_string.present?
|
|
191
191
|
username = decoded_string.split(':')[0] if decoded_string.present?
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# rubocop:disable Metrics/BlockLength
|
|
2
|
+
Sequel.migration do
|
|
3
|
+
up do
|
|
4
|
+
# SQLite's INTEGER type already supports 64-bit integers, skip for SQLite
|
|
5
|
+
# database_type returns the database adapter type (e.g., :sqlite, :postgres, :mysql)
|
|
6
|
+
unless database_type.to_s.include?('sqlite')
|
|
7
|
+
alter_table(:repositories) do
|
|
8
|
+
set_column_type :id, :bigint
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
alter_table(:users) do
|
|
12
|
+
set_column_type :id, :bigint
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
alter_table(:hosts) do
|
|
16
|
+
set_column_type :id, :bigint
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
alter_table(:authentication_tokens) do
|
|
20
|
+
set_column_type :id, :bigint
|
|
21
|
+
set_column_type :user_id, :bigint
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
alter_table(:repositories_users) do
|
|
25
|
+
set_column_type :repository_id, :bigint
|
|
26
|
+
set_column_type :user_id, :bigint
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
alter_table(:hosts_repositories) do
|
|
30
|
+
set_column_type :host_id, :bigint
|
|
31
|
+
set_column_type :repository_id, :bigint
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
down do
|
|
37
|
+
# SQLite's INTEGER type already supports 64-bit integers, skip for SQLite
|
|
38
|
+
# database_type returns the database adapter type (e.g., :sqlite, :postgres, :mysql)
|
|
39
|
+
unless database_type.to_s.include?('sqlite')
|
|
40
|
+
alter_table(:hosts_repositories) do
|
|
41
|
+
set_column_type :host_id, :integer
|
|
42
|
+
set_column_type :repository_id, :integer
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
alter_table(:repositories_users) do
|
|
46
|
+
set_column_type :repository_id, :integer
|
|
47
|
+
set_column_type :user_id, :integer
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
alter_table(:authentication_tokens) do
|
|
51
|
+
set_column_type :user_id, :integer
|
|
52
|
+
set_column_type :id, :integer
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
alter_table(:hosts) do
|
|
56
|
+
set_column_type :id, :integer
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
alter_table(:users) do
|
|
60
|
+
set_column_type :id, :integer
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
alter_table(:repositories) do
|
|
64
|
+
set_column_type :id, :integer
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_proxy_container_gateway
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ian Ballou
|
|
@@ -96,6 +96,7 @@ files:
|
|
|
96
96
|
- lib/smart_proxy_container_gateway/sequel_migrations/003_authorization_reorg.rb
|
|
97
97
|
- lib/smart_proxy_container_gateway/sequel_migrations/004_users_repositories_cascade_delete.rb
|
|
98
98
|
- lib/smart_proxy_container_gateway/sequel_migrations/005_host_repositories.rb
|
|
99
|
+
- lib/smart_proxy_container_gateway/sequel_migrations/006_bigint_ids.rb
|
|
99
100
|
- lib/smart_proxy_container_gateway/version.rb
|
|
100
101
|
- settings.d/container_gateway.yml.example
|
|
101
102
|
homepage: https://github.com/Katello/smart_proxy_container_gateway
|