Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Unreleased

* [#68](https://github.com/square/rails-auth/pull/68)
Remove `ca_file` and `require_cert` options to the config builder as we no
longer verify the certificate chain.
([@drcapulet])

* [#67](https://github.com/square/rails-auth/pull/67)
Remove `ca_file`, `require_cert`, and `truststore` options to X509 middleware
as we no longer verify the certificate chain.
Expand Down
7 changes: 0 additions & 7 deletions lib/rails/auth/config_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,15 @@ def test(config)
def production(
config,
cert_filters: nil,
require_cert: false,
ca_file: nil,
error_page: Rails.root.join("public/403.html"),
monitor: nil
)
raise ArgumentError, "no cert_filters given but require_cert is true" if require_cert && !cert_filters
raise ArgumentError, "no ca_file given but cert_filters were set" if cert_filters && !ca_file

error_page_middleware(config, error_page)

if cert_filters
config.middleware.insert_before Rails::Auth::ACL::Middleware,
Rails::Auth::X509::Middleware,
require_cert: require_cert,
cert_filters: cert_filters,
ca_file: ca_file,
logger: Rails.logger
end

Expand Down