11-03-2016 11:45 AM
Hello,
Am getting this error when sending a POST to CUC CUMI. Same works with 10.x CUC. Is this implementation broken in 11.x?
https://<CUC IP>/vmrest/mailbox?method=requestnotification
I have tried POSTMAN and CURL (curl -k -i -X POST -H "Authorization:Basic xxxxxxxxxxxx" 'https://xxxxxxxxx/vmrest/mailbox?method=requestnotification') with same results.
----------------------------
<!-- custom Cisco error page -->
<html>
<head>
<title> Cisco System - Error report </title>
<style type="text/css"> a { color: #316984; text-decoration: none; } a:hover { color: #316984; text-decoration: underline; } a:visted { color: #316984; text-decoration: none; } body { background-attachment: fixed; background-color: #ffffff; background-repeat: no-repeat; color: #316984; font-family: arial,helvetica,sans-serif; } #content { border: 1px solid #d6d7d6; font-size: 93.5%; margin: 0px 10% 30px 10%; } #content-header { background-color: #eeeeee; border-bottom: 1px solid #666666; color: #666666; font-size: 124.5%; padding: 5px 15px 5px 15px; } #copyright { font-size: 75%; margin: 0px 10% 0px 10%; padding: 3px 0px 0px 0px; text-align: right; } img { display: block; margin: 0px 0px 20px 0px; } #logo { margin: 30px 10% 0px 10%; } p { padding: 5px 15px 5px 15px; } pre { padding: 5px 15px 5px 30px; } </style>
</head>
<body>
<div id="logo">
<img src="/ciscologo.gif" alt="Cisco Systems, Inc." />
</div>
<div id="content">
<div id="content-header">HTTP Status 401 - Domain not Allowed. </div>
<p>
<b> type: </b> Status report
</p>
<p>
<b>message: </b> Domain not Allowed.
</p>
<p>
<b>description: </b> This request requires HTTP authentication.
</p>
</div>
</body>
</html>
----------------------------
Any help will be appreciated.
Thanks
Note: I have posted at CUC CUMI POST request error with 11.xand was asked to post in a different location so did that.
https://supportforums.cisco.com/discussion/13156866/cuc-cumi-post-request-error-11x and was now asked to post on this discussion forum.
11-03-2016 11:14 PM
Tried CORS. Now POSTMAN reports same error message "HTTP Status 401 - Domain not Allowed." and CURL reports "HTTP Status 500 -". Would this point to Implementation issue? Why would a server report differently to different clients for REST calls? How to look at internal logs?
Thanks in advance.
11-04-2016 12:58 AM
Removed CORS config. It has no dependency on the issue.
Finally got it working with CURL.
------------------ Debugs with CURL---------------------------
00:26:26.949 |7407,,,VMREST,3,DEBUG [http-bio-443-exec-19] com.cisco.connection.rest.ResponseFilter - RESPONSE filter IN
00:29:56.881 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.SecurityFilter - IMS result code: 0
00:29:56.900 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.CorsFilter - doFilter - The request is not a CORS request as request is from same origin: null . Delegating to next filter for further processing.
00:29:56.900 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.RequestFilter - REQUEST POST mailbox
00:29:56.902 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.impl.BaseRestImpl - user object ID retrieved from security context: objectid=06d97d71-ff8d-4a7b-b167-7688b3508c30
00:29:56.902 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.impl.BaseRestImpl - created authentication information: username=test2, alias=test2, id=06d97d71-ff8d-4a7b-b167-7688b3508c30
00:29:56.902 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.impl.BaseRestImpl - returning signed in user id: 06d97d71-ff8d-4a7b-b167-7688b3508c30
00:29:56.902 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.impl.BaseRestImpl - returning session cached authentication information: alias=test2, id=06d97d71-ff8d-4a7b-b167-7688b3508c30
00:29:56.929 |31510,,,VMREST,3,INFO [http-bio-443-exec-49] com.cisco.connection.rest.impl.BaseRestImpl - MailboxRestImpl.post: user=test2, method=requestnotification
00:29:56.930 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.impl.BaseRestImpl - Comet notification requested: user=test2, target user id=06d97d71-ff8d-4a7b-b167-7688b3508c30
Definitely no improvement with POSTMAN.
------------------ Debugs with POSTMAN---------------------------
00:29:56.953 |31510,,,VMREST,3,DEBUG [http-bio-443-exec-49] com.cisco.connection.rest.ResponseFilter - RESPONSE filter IN
00:30:00.847 |31472,,,VMREST,3,DEBUG [http-bio-443-exec-47] com.cisco.connection.rest.SecurityFilter - IMS result code: 0
00:30:00.852 |31472,,,VMREST,3,DEBUG [http-bio-443-exec-47] com.cisco.connection.rest.CorsFilter - doFilter - Origin header in the request : chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop
00:30:00.853 |31472,,,VMREST,3,DEBUG [http-bio-443-exec-47] com.cisco.connection.rest.cors.CorsConfigService - containsKey - No match found for domain returning false
00:30:00.853 |31472,,,VMREST,3,ERROR [http-bio-443-exec-47] com.cisco.connection.rest.CorsFilter - doFilter - Domain not allowed.
Now its more certain that VMREST function is behaving differently with any other client than CURL.
Please advice on how do we implement when user side client is not CURL.
11-06-2016 09:36 PM
While using postman – you would need to override the origin header with the exact domain name you have set in cors setting page with full-access or domain name of your CUC .
something like
origin : https://servername.domain.com
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide