aptible-auth 1.2.4 → 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: e3882d6be5ba4b7d248e84a3e6eced0eba7cd6701108ccbc3bd609eddb4cb0bd
4
- data.tar.gz: 733da04d17bb312b812988ed832426c72f784b6d97a7734f12f1f9cdd0872242
3
+ metadata.gz: f20bf9836f3cdf1ce3c0aa0db201eb8df10381f5e61537f10ab6d1a9d630a6a9
4
+ data.tar.gz: ac31487e6645012ea38e884de2105fbd0c75d928e04f44be92e905131aba17d3
5
5
  SHA512:
6
- metadata.gz: aa34d5cc0b4f99db2820f52d224b3092732dc93474bb85ec87798572662eefd4c8d4293cd21330a59d32eac560c15547799cce61f18011f0db78615172e8215f
7
- data.tar.gz: 5bdbbe7bd497e426d9c7535354ed8aa0748e3d64309eb357aacff5d8ff96a9d814933f39ec3353127e8e47d943af7a51d3343e1854ecfa49f47ee3681780e458
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,6 +22,7 @@ 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 'multipart-post', '2.1.1'
25
26
  spec.add_dependency 'oauth2', '1.4.7'
26
27
 
27
28
  spec.add_development_dependency 'aptible-tasks', '>= 0.6.0'
@@ -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.4'.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.4
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: 2022-02-18 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,6 +38,20 @@ 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
@@ -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