certbot 0.0.1.pre.1 → 0.0.1.pre.2

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
  SHA1:
3
- metadata.gz: 4625c1babb34c16f249d33f925a78b0f24576cff
4
- data.tar.gz: 84180a7c52837d05ba2e33231988936400a86415
3
+ metadata.gz: ffea510708e98db7b405b9bfbf8e545a22c4677e
4
+ data.tar.gz: 4c600b80462e4ee71b95a0ce84bfda86196417df
5
5
  SHA512:
6
- metadata.gz: 90a7956bdfc433db6921573739ae8341b220e7a1c5c9358382c2b5b7e50d6b41afff79abfb653b87a2377ba53b44283581dfaefe8ed7d0c31e4be804c59a18aa
7
- data.tar.gz: 67e2bcb03c7be73ac4c10981ddddc51abcfeb8d5ae3c63688e7f6ef37515d156582f0227170a4974f7323bcc341902b68c23ece0c6c12b459b42ee4b482abc09
6
+ metadata.gz: c7d27a37e005752550aaa571552b76fdcf75f2951e977bd85fced953c07d0a30c8e013af08c8cbd7d35a90f315948613ac98f3f0ecc295d61471ba8e1d0a8a50
7
+ data.tar.gz: bcc8efbcb798cdf7fce28957b18a05f6d2bd85f1c21376e46ddd34dd0df72d933f7eaae2422a74abf14b9c0cf0e69b9064cb3fee3646d1cdb2c0d50095dd5024
data/README.md CHANGED
@@ -1,5 +1,15 @@
1
+ ## Overview
2
+ This gem is an implementation of the [certbot http-01
3
+ challenge](https://tools.ietf.org/html/draft-ietf-acme-acme-01#page-38)
4
+ for use in Rails applications.
5
+
1
6
  ## Installation
2
7
 
8
+ ```ruby
9
+ # Gemfile
10
+ gem 'certbot'
11
+ ```
12
+
3
13
  NOTE: the certbot challenge/response *must* be served over HTTP without
4
14
  SSL. This means that your Rails application can not have the `force_ssl` flag
5
15
  set in your `config/application.rb`.
@@ -11,14 +21,14 @@ http://guides.rubyonrails.org/action_controller_overview.html#force-https-protoc
11
21
 
12
22
  By default, this library is configured via ENV variables.
13
23
  ```
14
- CERTBOT_CHALLENGE = Certbot challenge code
15
- CERTBOT_TOKEN = Certbot response token
24
+ CERTBOT_TOKEN = Certbot challenge token
25
+ CERTBOT_KEY_AUTHORIZATION = Certbot key authorization for valid request
16
26
  ```
17
27
 
18
28
  The challenge and token can also be configured via Ruby API.
19
29
  ```ruby
20
30
  Certbot.configure do |config|
21
- config.challenge = 'my_challenge_code'
22
- config.token = 'my_response_token'
31
+ config.token = 'my_challenge_token'
32
+ config.key_authorization = 'my_key_authorization'
23
33
  end
24
34
  ```
@@ -1,8 +1,7 @@
1
1
  class CertbotController < Certbot::ApplicationController
2
2
  def show
3
- challenge = params[:challenge]
4
- if challenge == certbot_config.challenge
5
- render text: certbot_config.token
3
+ if params[:token] == certbot_config.token
4
+ render text: certbot_config.key_authorization
6
5
  else
7
6
  render nothing: true, status: 404
8
7
  end
@@ -1,3 +1,3 @@
1
1
  Rails.application.routes.draw do
2
- get '/.well-known/acme-challenge/:challenge' => 'certbot#show', constraints: { protocol: 'http://' }
2
+ get '/.well-known/acme-challenge/:token' => 'certbot#show', constraints: { protocol: 'http://' }
3
3
  end
@@ -1,13 +1,13 @@
1
1
  module Certbot
2
2
  class Configuration
3
- # Default: ENV['CERTBOT_CHALLENGE']
4
- attr_accessor :challenge
5
3
  # Default: ENV['CERTBOT_TOKEN']
6
4
  attr_accessor :token
5
+ # Default: ENV['CERTBOT_KEY_AUTHORIZATION']
6
+ attr_accessor :key_authorization
7
7
 
8
8
  def initialize
9
- @challenge = ENV['CERTBOT_CHALLENGE']
10
9
  @token = ENV['CERTBOT_TOKEN']
10
+ @key_authorization = ENV['CERTBOT_KEY_AUTHORIZATION']
11
11
  end
12
12
  end
13
13
  end
@@ -6,5 +6,8 @@ module Certbot
6
6
  initializer 'certbot.config.force_ssl_assertion' do |app|
7
7
  raise InvalidConfigurationError, 'force_ssl can not be enabled globally. see http://guides.rubyonrails.org/action_controller_overview.html#force-https-protocol' if app.config.force_ssl
8
8
  end
9
+ # initializer 'certbot.config.filter_parameters' do |app|
10
+ # app.config.filter_parameters << 'challenge'
11
+ # end
9
12
  end
10
13
  end
@@ -1,3 +1,3 @@
1
1
  module Certbot
2
- VERSION = "0.0.1.pre.1"
2
+ VERSION = "0.0.1.pre.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: certbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.1
4
+ version: 0.0.1.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BetterUp Developers