Split AppBitsController into separate upload and download controllers

* In preparation for handling auth token differently on app bits upload.

[#68014448]

Signed-off-by: James Myers <jmyers@pivotallabs.com>
Update cf-uaa-lib gem to 2.0.1

* Minor refactorings in uaa_util on account of change from CF::UAA::Misc
to CF::UAA::Info in 2.0.0

[#68014448]

Signed-off-by: James Myers <jmyers@pivotallabs.com>
Extract SecurityContext setup from CC::Controller into separate class

* This responsibility moved to SecurityContextConfigurer class
* Move CF::UAA exception handling and logging into UaaTokenDecoder
* Remove support for deprecated bootstrap_admin_email config parameter

[#68014448]

Signed-off-by: James Myers <jmyers@pivotallabs.com>
Remove deprecated bootstrap_admin_email property from config and templates

[#68014448]

Signed-off-by: James Myers <jmyers@pivotallabs.com>
Change app bits upload controller to reauthorize with grace period

* Grace period can be set in config, defaults to 0 in controller if
  absent
* UaaTokenDecoder uses grace period when decoding auth token
* Uses new version of cf-uaa-lib that supports decoding at a reference
  timestamp

[#68014448]

Signed-off-by: Eric Malm <emalm@pivotallabs.com>
Remove unused CF::UAA stub from spec_helper

* It seems as if we used to have a controller action during a before(:all)
  which required this stub on validation_key in order to force symmetric key
  behavior.

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Allow app_bits_upload_grace_period_in_seconds to be configurable

* when it is not specified we provide a default value of 0 seconds.

[#68014448]

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Split uaa_util.rb and specs into separate files

[#68014448]

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Remove mock of uaa_token_coder from symmetric_key spec

[#68014448]

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Reset app_bits_upload_grace_period_in_seconds to 0 when it's negative

* Hopefully we will sanitize other invalid values in the config for the
  future
[#68014448]

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Rename ip to address to better reflect the values it can contain.

Signed-off-by: Phan Le <ple@pivotallabs.com>
/v2/service_instances/:guid/permissions read scope

[finsishes #69490440]
Extra logging for a flaky test

* Auth failure is occasionally happening and the spec only checks the response
  code.

Signed-off-by: Chris Adams <cadams@pivotallabs.com>
To String on `user_guid`

* `user_guid` was being treated as int by Sequel. This prevents that.

Signed-off-by: Chris Adams <cadams@pivotallabs.com>
Raise correct ApiError if UAA error occurs when getting UAA clients list

during update or deletion of broker
[#62008198]
Updating the diego stager task to support custom buildpacks (except git urls)

Signed-off-by: Karl Isenberg <kisenberg@pivotallabs.com>
Add the app_bits_upload_grace_period_in_seconds to BOSH config templates

* make sure the grace period takes effect when deploying CC as part of
  CF

[#68014448]

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Document X-Cf-Warnings header in ServiceBrokers API spec

[#65141758]
Diego stager task disallows .git buildpacks
Return "Invalid Auth Token" description when token does not contain cloud_controller.read scope

[#69490440]