ravanrijn / styx

Styx the open source Cloud Foundry console
MIT License
26 stars 10 forks source link

login appears to fail, seems to be in user details lookup #2

Closed jbayer closed 11 years ago

jbayer commented 11 years ago

Is this because the UAA I'm using blocks this call when user details lookup by user id can be enabled on other UAA instances?

00:06:23.643 [http-bio-61857-exec-7] DEBUG  org.springframework.web.client.RestTemplate  - Created GET request for "http://uaa.a1.cf-app.com/ids/Users?filter=id%20eq%20'e57aa620-6557-45f4-bde9-48111c23648f'"
00:06:23.647 [http-bio-61857-exec-7] DEBUG  org.springframework.web.client.RestTemplate  - Setting request Accept header to [application/json, application/*+json]
00:06:23.669 [http-bio-61857-exec-7] WARN   org.springframework.web.client.RestTemplate  - GET request for "http://uaa.a1.cf-app.com/ids/Users?filter=id%20eq%20'e57aa620-6557-45f4-bde9-48111c23648f'" resulted in 404 (Not Found); invoking error handler
00:06:23.677 [http-bio-61857-exec-7] DEBUG  org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver  - Resolving exception from handler [public java.util.List<com.github.styx.domain.Organization> com.github.styx.controllers.OrganizationController.getOrganizations(java.lang.String)]: com.github.styx.domain.RepositoryException: Unable to perform exchange for path [ids/Users?filter=id eq 'e57aa620-6557-45f4-bde9-48111c23648f']
00:06:23.680 [http-bio-61857-exec-7] DEBUG  org.springframework.beans.factory.support.DefaultListableBeanFactory  - Returning cached instance of singleton bean 'globalExceptionHandler'
00:06:23.682 [http-bio-61857-exec-7] DEBUG  org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver  - Invoking @ExceptionHandler method: public org.springframework.http.ResponseEntity<?> com.github.styx.controllers.GlobalExceptionHandler.handleException(java.lang.Exception)
00:06:23.688 [http-bio-61857-exec-7] DEBUG  org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor  - Written [<html><head><title>Apache Tomcat/7.0.32 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.32</h3></body></html>] as "application/json" using [org.springframework.http.converter.StringHttpMessageConverter@37021349]
00:06:23.691 [http-bio-61857-exec-7] DEBUG  org.springframework.web.servlet.DispatcherServlet  - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
00:06:23.692 [http-bio-61857-exec-7] DEBUG  org.springframework.web.servlet.DispatcherServlet  - Successfully completed request
ravanrijn commented 11 years ago

Yes, by default the UAA blocks this call. You can enable the endpoint on the UAA by setting the following in your BOSH deployment descriptor:

scim: userids_enabled: true

I have made the UAA call during login optional, so you can always login, even if the setting on the UAA was not changed. If you pull the latest version of the code you should be able to login. The user screen is quite useless when this setting is not enable though.

Hopefully the Cloud Foundry API will support user names in the future, so we can remove this dependency on the UAA.