OpenSocial gadget added to the jts dashboards does not work
I have a gadget with refers to the service from my app running on 9444.
Putting the gadhet in the dashboards gives following result: XHR finished loading: "https://localhost:9443/jts/web/services/makeRequest". throw 1; <don>{"https://localhost:9444/support/retainqueuelist":{"oauthErrorText":"Not allowed due to security","oauthError":true}} How can I workaround this? |
11 answers
Please provide more information
|
I have written a dojo module which access the REST service https://localhost:9444/support/retainqueuelist. This works fine if the widget is used in the application running on port 9444.
Then I created an opensocial widget which embedds the dojo module, and I got the error, it is possibly because the jfs dashboards run on port 9443. What details more do you need? |
I have written a dojo module which access the REST service https://localhost:9444/support/retainqueuelist. This works fine if the widget is used in the application running on port 9444. How does your gadget load its dojo module(s)? Are you using the jazz web infrastructure? What does your code look like that invokes makeRequest? |
Randy, The widget is very simple: <?xml version="1.0" encoding="UTF-8"?> Under https://localhost:9444/support/app there is a regular dojo module which calls jazz.client.xhrGet to get the data from https://localhost:9444/support/retainqueuelist. Small debugging revealed that in
returns false, because FriendsConfig.getFriendsConfig().getFriendMatchForOauthDomain(uri)returns null. This looks pretty much like a wrong friends configuration. My application looks like it was registered correctly (there are entries in Registered Applications and in Consumer (Inbound). I also doubt if there is something wrong with JFS itself, so maybe it is my application configuration. My rootservices are:
My friends are :
Is there something that I've missed? |
Small debugging revealed that in Were you debugging the JTS? Subject says the gadget was added to a JTS dashboard. JazzHttpClient.allow(request, context) If your gadget is being rendered on the JTS, then we should looking at the JTS's friends, not your App's friends. Your gadget needs to communicate back to :9444/support from :9443/jts, right? |
Yep. Using remote debug.
I am no expert in making friends ;-). I get your point, but I am still not convinced who to blame. Maybe my app (:9444/support) should expose something via rootservices... |
returns false, because What was the uri? Are you sure it was 9444/support/? |
Screenshots:
Note that the oauthDomainURIs list is empty. |
Seems like FriendEx would be violating some invariant to not have any oauth domains.
|
Seems like FriendEx would be violating some invariant to not have any oauth domains. I have overcome this problem. Entries were missing in rootservices. Now I get other error: throw 1; < don't be evil' >{"https://localhost:9444/support/retainqueuelist":{"rc":401,"body":"{\n \"detailedMessage\": \"Authorization information is missing\",\n \"errorMessage\": \"unaothorized user\",\n \"errorStatus\": \"401\"\n}","headers":{}}} How should I proceed? |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.