Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Upgrade the CC to use the latest uaa gem
Browse files Browse the repository at this point in the history
Additionally, fix some code to get the CC to download the public
key correctly when it is available.

The UAA has changed some endpoint names to be in line with a spec
it implements, and we have modified how some parameters are passed
to one token request to be more consistent. The gem currently in
the CC makes the old calls (which the UAA still supports), but
we'd like to drop the backward compatibility code.

Change-Id: I262b0432ffc1432b4f0d44949075d187b2d535d5
  • Loading branch information
joeldsa committed Oct 19, 2012
1 parent bb1c43b commit c67e526
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cloud_controller/Gemfile
Expand Up @@ -8,7 +8,7 @@ gem 'nats', :require => 'nats/client'
# VCAP common components # VCAP common components
gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'https://github.com/cloudfoundry/vcap-common.git', :ref => 'fd6b6d91' gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'https://github.com/cloudfoundry/vcap-common.git', :ref => 'fd6b6d91'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'https://github.com/cloudfoundry/common.git', :ref => 'e36886a1' gem 'vcap_logging', :require => ['vcap/logging'], :git => 'https://github.com/cloudfoundry/common.git', :ref => 'e36886a1'
gem 'cf-uaa-client', '~> 1.0', :git => 'https://github.com/cloudfoundry/uaa.git', :ref => 'dad29c90' gem 'cf-uaa-client', '~> 1.2', :git => 'https://github.com/cloudfoundry/uaa.git', :ref => '603bb76ce8'


# For queuing staging tasks # For queuing staging tasks
gem 'em-hiredis' gem 'em-hiredis'
Expand Down
12 changes: 6 additions & 6 deletions cloud_controller/Gemfile.lock
Expand Up @@ -24,11 +24,11 @@ GIT


GIT GIT
remote: https://github.com/cloudfoundry/uaa.git remote: https://github.com/cloudfoundry/uaa.git
revision: dad29c9030f482c7a426c9c81b0e05d9715ccc11 revision: 603bb76ce8e369546e62402248d28ab9e87ef886
ref: dad29c90 ref: 603bb76ce8
specs: specs:
cf-uaa-client (1.1.1) cf-uaa-client (1.2.4)
em-http-request em-http-request (>= 1.0.0.beta.3)
eventmachine eventmachine
highline highline
launchy launchy
Expand Down Expand Up @@ -107,7 +107,7 @@ GEM
eventmachine eventmachine
erubis (2.6.6) erubis (2.6.6)
abstract (>= 1.0.0) abstract (>= 1.0.0)
highline (1.6.13) highline (1.6.15)
hiredis (0.3.2) hiredis (0.3.2)
http_parser.rb (0.5.1) http_parser.rb (0.5.1)
httpclient (2.2.7) httpclient (2.2.7)
Expand Down Expand Up @@ -196,7 +196,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
SystemTimer (~> 1.2) SystemTimer (~> 1.2)
bcrypt-ruby (~> 2.1.4) bcrypt-ruby (~> 2.1.4)
cf-uaa-client (~> 1.0)! cf-uaa-client (~> 1.2)!
ci_reporter ci_reporter
delorean delorean
em-hiredis em-hiredis
Expand Down
2 changes: 1 addition & 1 deletion cloud_controller/app/models/uaa_token.rb
Expand Up @@ -37,7 +37,7 @@ def decode_token(auth_token)
if token_key_fetch_failure_count > 0 && !@token_key if token_key_fetch_failure_count > 0 && !@token_key
begin begin
CF::UAA::Misc.async=true CF::UAA::Misc.async=true
@token_key ||= CF::UAA::Misc.validation_key(AppConfig[:uaa][:url], AppConfig[:uaa][:resource_id], AppConfig[:uaa][:client_secret]) @token_key ||= CF::UAA::Misc.validation_key(AppConfig[:uaa][:url])


if @token_key[:alg] == "SHA256withRSA" if @token_key[:alg] == "SHA256withRSA"
CloudController.logger.debug("token key fetched from the uaa #{@token_key.inspect}") CloudController.logger.debug("token key fetched from the uaa #{@token_key.inspect}")
Expand Down
2 changes: 1 addition & 1 deletion health_manager/Gemfile
Expand Up @@ -12,7 +12,7 @@ gem 'yajl-ruby', :require => ['yajl', 'yajl/json_gem']


gem 'vcap_common', '>= 1.0.10', :git => 'https://github.com/cloudfoundry/vcap-common.git', :ref => 'cbeb8a17' gem 'vcap_common', '>= 1.0.10', :git => 'https://github.com/cloudfoundry/vcap-common.git', :ref => 'cbeb8a17'
gem "vcap_logging", "~> 1.0.0", :git => 'https://github.com/cloudfoundry/common.git', :ref => 'e36886a1' gem "vcap_logging", "~> 1.0.0", :git => 'https://github.com/cloudfoundry/common.git', :ref => 'e36886a1'
gem 'cf-uaa-client', '~> 1.0', :git => 'https://github.com/cloudfoundry/uaa.git', :ref => 'dad29c90' gem 'cf-uaa-client', '~> 1.2', :git => 'https://github.com/cloudfoundry/uaa.git', :ref => '603bb76ce8'


group :test do group :test do
gem "rspec" gem "rspec"
Expand Down
12 changes: 6 additions & 6 deletions health_manager/Gemfile.lock
Expand Up @@ -15,11 +15,11 @@ GIT


GIT GIT
remote: https://github.com/cloudfoundry/uaa.git remote: https://github.com/cloudfoundry/uaa.git
revision: dad29c9030f482c7a426c9c81b0e05d9715ccc11 revision: 603bb76ce8e369546e62402248d28ab9e87ef886
ref: dad29c90 ref: 603bb76ce8
specs: specs:
cf-uaa-client (1.1.1) cf-uaa-client (1.2.4)
em-http-request em-http-request (>= 1.0.0.beta.3)
eventmachine eventmachine
highline highline
launchy launchy
Expand Down Expand Up @@ -54,7 +54,7 @@ GEM
http_parser.rb (>= 0.5.1) http_parser.rb (>= 0.5.1)
em-socksify (0.1.0) em-socksify (0.1.0)
eventmachine eventmachine
highline (1.6.13) highline (1.6.15)
http_parser.rb (0.5.3) http_parser.rb (0.5.3)
json_pure (1.7.3) json_pure (1.7.3)
launchy (2.1.0) launchy (2.1.0)
Expand Down Expand Up @@ -90,7 +90,7 @@ PLATFORMS


DEPENDENCIES DEPENDENCIES
bundler (>= 1.0.10) bundler (>= 1.0.10)
cf-uaa-client (~> 1.0)! cf-uaa-client (~> 1.2)!
ci_reporter ci_reporter
em-http-request (~> 1.0.0.beta.3) em-http-request (~> 1.0.0.beta.3)
eventmachine! eventmachine!
Expand Down

0 comments on commit c67e526

Please sign in to comment.