rails-auth 3.1.0 → 3.2.0
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 +4 -4
- data/.github/workflows/mri.yml +3 -0
- data/.rubocop.yml +4 -19
- data/Gemfile +7 -14
- data/lib/rails/auth/acl.rb +8 -3
- data/lib/rails/auth/rspec/matchers/acl_matchers.rb +1 -1
- data/lib/rails/auth/version.rb +1 -1
- data/lib/rails/auth/x509/filter/pem.rb +1 -1
- data/lib/rails/auth.rb +3 -0
- data/rails-auth.gemspec +4 -5
- data/spec/rails/auth/controller_methods_spec.rb +1 -1
- data/spec/rails/auth/x509/middleware_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -3
- metadata +13 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c24122c461b2ef37326ca28f26261614ef8215bd85b62bfc171b47f56aeac29
|
4
|
+
data.tar.gz: e6453804040de859e7da0cb344ebe8e75b34f846a221441f246499016e05b4ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa0db28d5b895a29f3fc8563575895cb0bf18e8917f7e816d4e6148a25a5615d9b649ba089f94369a7565c2d24a9622a93eff0f1dbb7c14d62c4926ac2333c7f
|
7
|
+
data.tar.gz: ddae5587f3da9ef4291bb0b9cea00563007e58d55d830a025375ba03a9ad2c83aa754d5b86050cf4dac0a8dbb72280c8eb93c905ef4dd5cbc3f883c09da0a52f
|
data/.github/workflows/mri.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
AllCops:
|
2
|
+
NewCops: enable
|
2
3
|
DisplayCopNames: true
|
3
|
-
TargetRubyVersion: 2.
|
4
|
+
TargetRubyVersion: 2.5
|
4
5
|
|
5
6
|
Style/StringLiterals:
|
6
7
|
EnforcedStyle: double_quotes
|
@@ -8,24 +9,8 @@ Style/StringLiterals:
|
|
8
9
|
Layout/HashAlignment:
|
9
10
|
Enabled: false
|
10
11
|
|
11
|
-
Metrics
|
12
|
-
|
13
|
-
|
14
|
-
Metrics/ParameterLists:
|
15
|
-
Max: 5
|
16
|
-
CountKeywordArgs: false
|
17
|
-
|
18
|
-
Metrics/LineLength:
|
19
|
-
Max: 128
|
20
|
-
|
21
|
-
Metrics/MethodLength:
|
22
|
-
Max: 25
|
23
|
-
|
24
|
-
Metrics/AbcSize:
|
25
|
-
Max: 25
|
26
|
-
|
27
|
-
Metrics/CyclomaticComplexity:
|
28
|
-
Max: 8
|
12
|
+
Metrics:
|
13
|
+
Enabled: false
|
29
14
|
|
30
15
|
Naming/MethodParameterName:
|
31
16
|
MinNameLength: 2
|
data/Gemfile
CHANGED
@@ -2,19 +2,12 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
gem "coveralls", require: false
|
13
|
-
# Workaround for: https://github.com/bundler/bundler/pull/4650
|
14
|
-
gem "rack", "~> 1.x"
|
15
|
-
gem "rake"
|
16
|
-
gem "rspec"
|
17
|
-
gem "rubocop", "0.77.0"
|
18
|
-
end
|
5
|
+
gem "activesupport"
|
6
|
+
gem "certificate_authority", require: false
|
7
|
+
gem "guard-rspec"
|
8
|
+
gem "pry-byebug", platform: :mri
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec"
|
11
|
+
gem "rubocop"
|
19
12
|
|
20
13
|
gemspec
|
data/lib/rails/auth/acl.rb
CHANGED
@@ -19,9 +19,14 @@ module Rails
|
|
19
19
|
# @param [String] :yaml serialized YAML to load an ACL from
|
20
20
|
def self.from_yaml(yaml, **args)
|
21
21
|
require "yaml"
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
new(
|
23
|
+
if YAML::VERSION >= "4.0"
|
24
|
+
YAML.safe_load(yaml, aliases: true)
|
25
|
+
else
|
26
|
+
YAML.safe_load(yaml, [], [], true)
|
27
|
+
end,
|
28
|
+
**args
|
29
|
+
)
|
25
30
|
end
|
26
31
|
|
27
32
|
# @param [Array<Hash>] :acl Access Control List configuration
|
@@ -6,7 +6,7 @@ RSpec::Matchers.define(:permit) do |env|
|
|
6
6
|
credentials = Rails::Auth.credentials(env)
|
7
7
|
message = "allow #{method}s by "
|
8
8
|
|
9
|
-
return message
|
9
|
+
return "#{message}unauthenticated clients" if credentials.count.zero?
|
10
10
|
|
11
11
|
message + credentials.values.map(&:inspect).join(", ")
|
12
12
|
end
|
data/lib/rails/auth/version.rb
CHANGED
@@ -11,7 +11,7 @@ module Rails
|
|
11
11
|
# certificates are normally formatted in otherwise parsing with fail
|
12
12
|
# with a 'nested asn1 error'. split(" ") handles sequential whitespace
|
13
13
|
# characters like \t, \n, and space.
|
14
|
-
OpenSSL::X509::Certificate.new(pem.split
|
14
|
+
OpenSSL::X509::Certificate.new(pem.split.instance_eval do
|
15
15
|
[[self[0], self[1]].join(" "), self[2...-2], [self[-2], self[-1]].join(" ")]
|
16
16
|
.flatten.join("\n")
|
17
17
|
end).freeze
|
data/lib/rails/auth.rb
CHANGED
data/rails-auth.gemspec
CHANGED
@@ -21,15 +21,14 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
# Only allow gem to be pushed to https://rubygems.org
|
23
23
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
24
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
24
25
|
|
25
26
|
spec.files = `git ls-files`.split("\n")
|
26
27
|
spec.bindir = "exe"
|
27
28
|
spec.require_paths = ["lib"]
|
28
29
|
|
29
|
-
spec.required_ruby_version = ">= 2.
|
30
|
+
spec.required_ruby_version = ">= 2.5.0"
|
30
31
|
|
31
|
-
spec.
|
32
|
-
|
33
|
-
spec.add_development_dependency "bundler", ">= 1.10", "< 3"
|
34
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_dependency "activesupport"
|
33
|
+
spec.add_dependency "rack"
|
35
34
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,39 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '3'
|
37
|
-
type: :development
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '3'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: rake
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '10.0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '10.0'
|
40
|
+
version: '0'
|
61
41
|
description: A plugin-based framework for supporting multiple authentication and authorization
|
62
42
|
systems in Rails/Rack apps. Supports resource-oriented route-by-route access control
|
63
43
|
lists with TLS authentication.
|
@@ -139,7 +119,8 @@ licenses:
|
|
139
119
|
- Apache-2.0
|
140
120
|
metadata:
|
141
121
|
allowed_push_host: https://rubygems.org
|
142
|
-
|
122
|
+
rubygems_mfa_required: 'true'
|
123
|
+
post_install_message:
|
143
124
|
rdoc_options: []
|
144
125
|
require_paths:
|
145
126
|
- lib
|
@@ -147,15 +128,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
128
|
requirements:
|
148
129
|
- - ">="
|
149
130
|
- !ruby/object:Gem::Version
|
150
|
-
version: 2.
|
131
|
+
version: 2.5.0
|
151
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
133
|
requirements:
|
153
134
|
- - ">="
|
154
135
|
- !ruby/object:Gem::Version
|
155
136
|
version: '0'
|
156
137
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
158
|
-
signing_key:
|
138
|
+
rubygems_version: 3.5.9
|
139
|
+
signing_key:
|
159
140
|
specification_version: 4
|
160
141
|
summary: Modular resource-oriented authentication and authorization for Rails/Rack
|
161
142
|
test_files: []
|