Deploying UAA in does not work as intended

Shetty, Viraj S [CTR]

I are trying to deploy UAA to (based on cloud foundry). Intention is to use that as the Identity management for all applications deployed in  I followed the steps laid out in

I was able to get the code, build it and deploy locally.  Both below works fine 

uaac target http://localhost:8080/uaa
uaac token client get admin -s adminsecret

Then, I followed the steps to deploy in I created a manifest file as below 

- name: fdic-uaa
  memory: 1024M
  disk_quota: 512M
  instances: 1
    - java_buildpack
    - route:

I followed the steps laid out in  "Deploy UAA to Cloud Foundry". After a few updates to uaa.yml file (uncomment SAML Key Configuration and added "encryption" field), i was able to deploy to cloud foundry without errors. Now when i enter the following command its okay (though it gives some error Unknown key: Max-Age = 86400)

uaac target 

But on retrieving the token, i get the error "Bad Credentials" 

uaac token client get admin -s adminsecret
error response:
  "error": "unauthorized",
  "error_description": "Bad credentials"
attempt to get token failed

The logs gave the following error 

   2018-12-14T16:12:41.55-0500 [APP/PROC/WEB/0] OUT [2018-12-14 21:12:41.557] cloudfoundry-identity-server - ???? [http-nio-8080-exec-3] .... DEBUG --
- ClientDetailsAuthenticationProvider: User 'admin' not found
   2018-12-14T16:12:41.55-0500 [APP/PROC/WEB/0] OUT [2018-12-14 21:12:41.557] cloudfoundry-identity-server - ???? [http-nio-8080-exec-3] ....  INFO --
- Audit: PrincipalAuthenticationFailure ('null'): principal=admin, origin=[], identityZoneId=[uaa]
   2018-12-14T16:12:41.55-0500 [APP/PROC/WEB/0] OUT [2018-12-14 21:12:41.557] cloudfoundry-identity-server - ???? [http-nio-8080-exec-3] ....  INFO --
- Audit: ClientAuthenticationFailure ('Bad credentials'): principal=admin, origin=[remoteAddress=, clientId=admin], identityZoneId=[uaa]
   2018-12-14T16:12:41.55-0500 [APP/PROC/WEB/0] OUT [2018-12-14 21:12:41.558] cloudfoundry-identity-server - ???? [http-nio-8080-exec-3] .... DEBUG --
- ClientBasicAuthenticationFilter: Authentication request for failed: Bad credentials

I also tried to add a clients section in the uaa.yml file and still get an error. 

         secret: <some secret>
         authorized-grant-types: client_credentials
         scope: uaa.none
         authorities: uaa.admin,clients.admin,,clients.write,clients.secret

Any assistance will be helpful. Is there a reliable documentation on how to deploy UAA int ocloudfoundry ? I am not sure if I need to set some other atrributes in the uaa.yml 

Join { to automatically receive all group messages.