bosh-director 1.2891.0 → 1.2902.0

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
  SHA1:
3
- metadata.gz: bce58a7ad9105fa3fa2c197b1a822204c5fe6654
4
- data.tar.gz: 0ef7f63294249b3a0335b54f9ac11aed8e429fd3
3
+ metadata.gz: 60c7f4699f782e4660c8f494fb1446e38880ee9d
4
+ data.tar.gz: 556098bfd183db712975efaa813b3774f8fbcc0e
5
5
  SHA512:
6
- metadata.gz: 27453ac7b587f14779b67bceba8f071061e7e1e9de3e8714574fbbc1f713858c6960275db824394331b48b7ae4ca5ae680aa0b1e7418888bb84107d59be9219f
7
- data.tar.gz: e2fec4060ec15f7aa157dfdf4d16af8b81a625f34c77747aefc85e95551c49130b8cec8bfc198f3ebc5e06305c3ab4aee026024c0e339c8382ed0de39288eaf8
6
+ metadata.gz: cc9fbbf39842eea2625d6997cb593e96078661a5056a3471bd31da1615d355e2c44795a9141be0027c1316878a7bde9c5efd6d995da957305483f60b3cf3df30
7
+ data.tar.gz: dd3b2d3a38bc10b951a0b4b5861f0781ed0c30f556a99efd68e8d2dcc2d0825f605de21d50bf3db62d4d92fde5f9a5460c485ae48425159e413124f3f7a30576
@@ -51,14 +51,17 @@ module Bosh::Director
51
51
  request.env.has_key?(key)
52
52
  end
53
53
 
54
- if auth_provided || requires_authentication?
54
+ if auth_provided
55
55
  begin
56
56
  @user = @identity_provider.corroborate_user(request.env)
57
- rescue AuthenticationError => e
58
- response['WWW-Authenticate'] = 'Basic realm="BOSH Director"'
59
- throw(:halt, [401, "Not authorized\n"])
57
+ rescue AuthenticationError
60
58
  end
61
59
  end
60
+
61
+ if requires_authentication? && @user.nil?
62
+ response['WWW-Authenticate'] = 'Basic realm="BOSH Director"'
63
+ throw(:halt, [401, "Not authorized\n"])
64
+ end
62
65
  end
63
66
 
64
67
  after { headers('Date' => Time.now.rfc822) } # As thin doesn't inject date
@@ -5,8 +5,9 @@ module Bosh
5
5
  module Api
6
6
  class UAAIdentityProvider
7
7
  def initialize(options)
8
- @token_coder = CF::UAA::TokenCoder.new(skey: options.fetch('key'), audience_ids: ['bosh'])
9
8
  @url = options.fetch('url')
9
+ Config.logger.debug "Initializing UAA Identity provider with url #{@url}"
10
+ @token_coder = CF::UAA::TokenCoder.new(skey: options.fetch('key'), audience_ids: ['bosh_cli'])
10
11
  end
11
12
 
12
13
  def client_info
@@ -21,7 +22,7 @@ module Bosh
21
22
  def corroborate_user(request_env)
22
23
  auth_header = request_env['HTTP_AUTHORIZATION']
23
24
  token = @token_coder.decode(auth_header)
24
- token["user_id"]
25
+ token['user_name']
25
26
  rescue CF::UAA::DecodeError, CF::UAA::AuthError => e
26
27
  raise AuthenticationError, e.message
27
28
  end
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Director
3
- VERSION = '1.2891.0'
3
+ VERSION = '1.2902.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-director
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2891.0
4
+ version: 1.2902.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt-ruby
@@ -30,126 +30,126 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2891.0
33
+ version: 1.2902.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.2891.0
40
+ version: 1.2902.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bosh-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.2891.0
47
+ version: 1.2902.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.2891.0
54
+ version: 1.2902.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bosh-director-core
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.2891.0
61
+ version: 1.2902.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.2891.0
68
+ version: 1.2902.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bosh_common
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.2891.0
75
+ version: 1.2902.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.2891.0
82
+ version: 1.2902.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bosh-template
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.2891.0
89
+ version: 1.2902.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.2891.0
96
+ version: 1.2902.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bosh_cpi
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.2891.0
103
+ version: 1.2902.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.2891.0
110
+ version: 1.2902.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: bosh_openstack_cpi
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.2891.0
117
+ version: 1.2902.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.2891.0
124
+ version: 1.2902.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bosh_aws_cpi
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.2891.0
131
+ version: 1.2902.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.2891.0
138
+ version: 1.2902.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: bosh_vsphere_cpi
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.2891.0
145
+ version: 1.2902.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.2891.0
152
+ version: 1.2902.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: bosh_vcloud_cpi
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -436,14 +436,14 @@ dependencies:
436
436
  requirements:
437
437
  - - "~>"
438
438
  - !ruby/object:Gem::Version
439
- version: 3.1.0
439
+ version: 3.2.0
440
440
  type: :runtime
441
441
  prerelease: false
442
442
  version_requirements: !ruby/object:Gem::Requirement
443
443
  requirements:
444
444
  - - "~>"
445
445
  - !ruby/object:Gem::Version
446
- version: 3.1.0
446
+ version: 3.2.0
447
447
  - !ruby/object:Gem::Dependency
448
448
  name: timecop
449
449
  requirement: !ruby/object:Gem::Requirement
@@ -558,7 +558,7 @@ dependencies:
558
558
  version: '0'
559
559
  description: |-
560
560
  BOSH Director
561
- 1d294c
561
+ ac0a41
562
562
  email: support@cloudfoundry.com
563
563
  executables:
564
564
  - bosh-director