aptible-auth 1.2.3 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41cc5579815eeb97458ce8ec7331660f45d72a4060048253561dc35f9e2d915f
4
- data.tar.gz: 792e65542c8a8d367ae7c50217b19bc60fa37696f39c265bed0acb4b513e8f31
3
+ metadata.gz: f20bf9836f3cdf1ce3c0aa0db201eb8df10381f5e61537f10ab6d1a9d630a6a9
4
+ data.tar.gz: ac31487e6645012ea38e884de2105fbd0c75d928e04f44be92e905131aba17d3
5
5
  SHA512:
6
- metadata.gz: ecadb75dec853d60d059c4d75202da98187e343482d93629c2919ee8cd4289d018f20f6ca58dc4cf99d3f5abf62fc565e1ee2f5d95882d3cf1a7b09d0ab2dff5
7
- data.tar.gz: 967e56ed114a1580dba1affaeb12d55a1d7cb34e3535c19f775ab6c6793494a378f19f552d2b2ab339dab4b6b0e39a6c20a26d49da498ed431f4c3e82d890985
6
+ metadata.gz: 1b0e0e9d03317a6e0916ac45f411fcae5156d00bf26b9484b7143780c4fe44d542c235989997ff967a250102c9c51c7402645abb449649cf18f1f6961101c380
7
+ data.tar.gz: 52fa36acfb54ddb2c79b2b0fa35b49e29ac2f6992b7843dbf7bd4ec4ca32dd2f0ac12c9ddb83d49eb6266e9c7844a4aba18150992ca685537ca66ea3c956d303
data/SECURITY.md ADDED
@@ -0,0 +1,23 @@
1
+ # Aptible Open Source Security Policies and Procedures
2
+
3
+ This document outlines security procedures and general policies for the Aptible open source projects as found on https://github.com/aptible.
4
+
5
+ * [Reporting a Vulnerability](#reporting-a-vulnerability)
6
+ * [Responsible Disclosure Policy](#responsible-disclosure-policy)
7
+
8
+ ## Reporting a Vulnerability
9
+
10
+ The Aptible team and community take all security vulnerabilities
11
+ seriously. Thank you for improving the security of our open source software. We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
12
+
13
+ Report security vulnerabilities by emailing the Aptible security team at:
14
+
15
+ security@aptible.com
16
+
17
+ Security researchers can also privately report security vulnerabilities to repository maintainers using the GitHub "Report a Vulnerability" feature. [See how-to here](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability).
18
+
19
+ The Aptible team will acknowledge your email within 24 business hours and send a detailed response within 48 business hours indicating the next steps in handling your report. The Aptible security team will keep you informed of the progress and may ask for additional information or guidance.
20
+
21
+ ## Responsible Disclosure Policy
22
+
23
+ Please see Aptible's Responsible Disclosure Policy here: https://www.aptible.com/legal/responsible-disclosure/
data/aptible-auth.gemspec CHANGED
@@ -22,7 +22,8 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency 'aptible-resource', '~> 1.0'
24
24
  spec.add_dependency 'gem_config'
25
- spec.add_dependency 'oauth2', '~> 1.4'
25
+ spec.add_dependency 'multipart-post', '2.1.1'
26
+ spec.add_dependency 'oauth2', '1.4.7'
26
27
 
27
28
  spec.add_development_dependency 'aptible-tasks', '>= 0.6.0'
28
29
  spec.add_development_dependency 'pry'
@@ -26,3 +26,4 @@ require 'aptible/auth/ssh_key'
26
26
  require 'aptible/auth/saml_configuration'
27
27
  require 'aptible/auth/whitelist_membership'
28
28
  require 'aptible/auth/reauthenticate_organization'
29
+ require 'aptible/auth/ssh_key_pre_authorization'
@@ -0,0 +1,11 @@
1
+ module Aptible
2
+ module Auth
3
+ class SshKeyPreAuthorization < Resource
4
+ belongs_to :ssh_key
5
+ belongs_to :owner
6
+
7
+ field :created_at, type: Time
8
+ field :updated_at, type: Time
9
+ end
10
+ end
11
+ end
@@ -106,6 +106,12 @@ module Aptible
106
106
  authenticate_impersonate(
107
107
  token_as_string(user_token), 'aptible:token', options
108
108
  )
109
+ elsif (href = options.delete(:ssh_key_pre_authorization_href))
110
+ authenticate_impersonate(
111
+ href,
112
+ 'aptible:ssh_key_pre_authorization:href',
113
+ options
114
+ )
109
115
  else
110
116
  raise 'Unrecognized options'
111
117
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Auth
3
- VERSION = '1.2.3'.freeze
3
+ VERSION = '1.2.5'.freeze
4
4
  end
5
5
  end
@@ -67,6 +67,16 @@ describe Aptible::Auth::Token do
67
67
  described_class.create(user_token: 'tok tok tok')
68
68
  end
69
69
 
70
+ it(
71
+ 'should #authenticate_impersonate if passed ' \
72
+ 'ssh_key_pre_authorization_href'
73
+ ) do
74
+ Aptible::Auth::Token.any_instance.should_receive(
75
+ :authenticate_impersonate
76
+ ).with('foo.href', 'aptible:ssh_key_pre_authorization:href', {})
77
+ described_class.create(ssh_key_pre_authorization_href: 'foo.href')
78
+ end
79
+
70
80
  it 'should not alter the hash it receives' do
71
81
  options = { email: 'some email' }
72
82
  options_before = options.dup
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-29 00:00:00.000000000 Z
11
+ date: 2023-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-resource
@@ -38,20 +38,34 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: multipart-post
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 2.1.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 2.1.1
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: oauth2
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - '='
46
60
  - !ruby/object:Gem::Version
47
- version: '1.4'
61
+ version: 1.4.7
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - '='
53
67
  - !ruby/object:Gem::Version
54
- version: '1.4'
68
+ version: 1.4.7
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: aptible-tasks
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -152,6 +166,7 @@ files:
152
166
  - Procfile
153
167
  - README.md
154
168
  - Rakefile
169
+ - SECURITY.md
155
170
  - aptible-auth.gemspec
156
171
  - lib/aptible/auth.rb
157
172
  - lib/aptible/auth/agent.rb
@@ -165,6 +180,7 @@ files:
165
180
  - lib/aptible/auth/saml_configuration.rb
166
181
  - lib/aptible/auth/session.rb
167
182
  - lib/aptible/auth/ssh_key.rb
183
+ - lib/aptible/auth/ssh_key_pre_authorization.rb
168
184
  - lib/aptible/auth/token.rb
169
185
  - lib/aptible/auth/user.rb
170
186
  - lib/aptible/auth/version.rb
@@ -199,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
215
  - !ruby/object:Gem::Version
200
216
  version: '0'
201
217
  requirements: []
202
- rubygems_version: 3.0.3
218
+ rubygems_version: 3.1.6
203
219
  signing_key:
204
220
  specification_version: 4
205
221
  summary: Ruby client for auth.aptible.com