Projects
home:rottame:vhosts-ng
rubygem-nginx-controller
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
rubygem-nginx-controller.spec
Changed
@@ -1,7 +1,7 @@ %define mod_name nginx-controller %define mod_full_name %{mod_name}-%{version} Name: rubygem-nginx-controller -Version: 2.0.0 +Version: 2.0.1 Release: 0 Summary: vhng nginx controller License: Apache-2.0
View file
nginx-controller-2.0.0.gem/checksums.yaml.gz -> nginx-controller-2.0.1.gem/checksums.yaml.gz
Changed
@@ -1,7 +1,7 @@ --- SHA256: - metadata.gz: d01032467e484f99e08c566e8a3c355bfc2235be379a111943cea521990ae67d - data.tar.gz: a35e3ac5da06137b3bb968a5748d0a4317c69e8e783a938d7f27b0e3e161f0c8 + metadata.gz: 79a6a2bdf682f31940399b2efbf183f1ee6af96a0344f6f26f9df778ea506506 + data.tar.gz: 7a43b0c75b09b75fdd32c9daef9fa910b736d55f8b4e04eeb004ec530e3426c0 SHA512: - metadata.gz: 11f7e3a22919bf68688a140e8508df40b4dc04a5ceeea8f703f6a79c6bf4ce271a1412b1019ba01f8d5cc0aeecf582123a7ec12ae79db17da600e2d3a23bd9e7 - data.tar.gz: 1f8d8d79a99d99bc26175beca9189350083bcfda6a2f2b23e274452adcd447fad9775af9eff7dd7e361cf83ba1498ebbb8f9dfb5853de00a16e536ba2b8da0a4 + metadata.gz: 9761a18224d167a2227426d90fd6a7f3e3168c5ac7f46310794d274eacc549ecd16c84b5ac4bd51aa97d977230eda55250d9fdc5f416ef773ab9ad664220f900 + data.tar.gz: b5ce10fd50812ae1f2b071e778d375eca9b4daa2ad7479db508608bbb08fdf5d24daa21d356cd8e449c7f665425fdbd07c5182855e6f4497ddb89f2189f5c16e
View file
nginx-controller-2.0.0.gem/data/lib/nginx_controller.rb -> nginx-controller-2.0.1.gem/data/lib/nginx_controller.rb
Changed
@@ -16,6 +16,10 @@ ENV'SSL_CERTS_ROOT'.presence || File.join(ssl_root, 'certs') end + def self.htpasswd_path + ENV'HTPASSWD_ROOT'.presence || '/etc/nginx/htpasswd' + end + class Controller def initialize @services =
View file
nginx-controller-2.0.0.gem/data/lib/nginx_controller/docker/service.rb -> nginx-controller-2.0.1.gem/data/lib/nginx_controller/docker/service.rb
Changed
@@ -198,12 +198,28 @@ end def auth_basic - locs = labels.select{|l| l =~ /vhosts-ng\/auth\/basic/}.map { | k, v | - loc = k.gsub(/vhosts-ng\/auth\/basic/, '') - secret, realm = v.split(',', 2) - loc, {location: loc, secret: secret, realm: realm || 'Pretected area'} - } - locs = Hashlocs + @auth_basic ||= begin + count = 1 + auths = labels.select{|l| l =~ /vhosts-ng\/auth\/basic/}.map { | k, v | + loc = k.gsub(/vhosts-ng\/auth\/basic/, '') + secret, realm = v.split(',', 2) + secret = File::expand_path(secret, '/') # sanitize.... + secret = File.join(NginxController.htpasswd_path, service_name, secret) + unless File.exists?(secret) + # generate a dummy htpasswd with a random username/password + secret = File.join(NginxController.htpasswd_path, "dummy", service_name, "htpasswd.#{count}") + FileUtils.mkdir_p(File.dirname(secret)) + File.open(secret, 'wb+') do | f | + f.write "%s:%s" % + SecureRandom.alphanumeric(8), + SecureRandom.alphanumeric(16).crypt("$5$#{SecureRandom.alphanumeric(8)}$"), + + end + end + loc, {location: loc, secret: secret, realm: realm || 'Pretected area'} + } + auths = Hashauths + end end def le_validation_host @@ -305,7 +321,7 @@ id = File::basename(id) # LAZY but works names = d.split(',').map(&:strip).compact - if matches.any? && File::exists?(File.join(NginxController.certs_path, service_name, "#{id}.pem")) + if names.any? && File::exists?(File.join(NginxController.certs_path, service_name, "#{id}.pem")) list << OpenStruct.new({ names: names, cert: File.join(NginxController.certs_path, service_name, "#{id}.pem"),
View file
nginx-controller-2.0.0.gem/metadata.gz -> nginx-controller-2.0.1.gem/metadata.gz
Changed
@@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: nginx-controller version: !ruby/object:Gem::Version - version: 2.0.0 + version: 2.0.1 platform: ruby authors: - Angelo Grossini autorequire: bindir: bin cert_chain: -date: 2023-02-22 00:00:00.000000000 Z +date: 2023-02-27 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: eventmachine
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.