Skip to content

Commit

Permalink
Fixes #32257 - use trusted hosts to authorize clients
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Apr 15, 2021
1 parent 8b4c664 commit 3999f6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/smart_proxy_openscap/openscap_api.rb
Expand Up @@ -25,6 +25,13 @@ class Api < ::Sinatra::Base
include ::Proxy::Log
helpers ::Proxy::Helpers
authorize_with_ssl_client
CLIENT_PATHS = Regexp.compile(%r{^(/arf/\d+|/policies/\d+/content/|/policies/\d+/tailoring/)})

# authorize via trusted hosts but let client paths in without such authorization
before do
pass if request.path_info =~ CLIENT_PATHS
do_authorize_with_trusted_hosts
end

post "/arf/:policy" do
# first let's verify client's certificate
Expand Down

0 comments on commit 3999f6b

Please sign in to comment.