Skip to Content
0

Mobile Development and Operations - No authorization while creating iOS app

Apr 07, 2017 at 11:20 AM

196

avatar image

Hello all,

I am starting playing around the iOS SDK and although technically speaking the setup was completely ok, I am struggling to generate my first application using the Assistant.

Each time I try to create one, the Assistant gets stuck for a while and I start seeing these messages on the Mobile Service homepage:

Initially I thought it was an issue with my ES4 account (which I am using as a Backend connection) but I am completely able to log in to and access services metadata.

Then I moved to the Roles configuration in the Cloud Platform to assign myself to the HanaMobileAdmin permissions...but still, I am not able to create my application.

The Assistant gives up after a while, saying the it is "Unable to download metadata for application com.xy.zw.

I am now very stuck here...any suggestions?

Thanks,

R.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Andreas Schlosser Apr 10, 2017 at 08:41 AM
0

Roberto,

It would be good if you could share more detail on your backend configuration. If your ES4 system is using different users than your Mobile Services Cockpit, you need to have the principal propagation configured properly. Otherwise, Mobile Services will just forward the SAP ID service user to your backend, which might then not be accepted there.

You can find more detail on this here: https://help.hana.ondemand.com/hana_cloud_platform_mobile_services/frameset.htm?21a016f86b0d4fdeb3e6fef802df9b55.html (step 3 - SSO mechanism) or here: https://help.hana.ondemand.com/hana_cloud_platform_mobile_services/frameset.htm?6fa89e57e45f46c9b61dd9c21f76ca1d.html

Thanks
Andreas

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Andreas,
The ES4 System I am using is the publicly Gateway Demo system ES4. It doesn't have any particular authentication configuration, a simple password based Basic Authentication.

I've already set it up in the Mobile Services Cockpit, providing the public url, avoiding the user name propagation and setting un an SSO mechanism with "Basic Authentication" and my personal ES4 credentials.

It is still not working though...and the cockpit logs aren't really helpful in this case, as they just report the error message without further (useful) details.
Again, if tested via browser, the ES4 service works like a charm.

I will keep digging.

0
Piet Jaspers Apr 12, 2017 at 07:21 AM
0

Hi Andreas,

As I'm experiencing a similar problem, I'm grateful for the links that you've sent. However, for someone not fluent in SAP, the content of these pages is *very* hard to understand.

So - if possible - could you provide us with more detailed information on what the problem exactly is and a more detailed way how to fix it?

From what I understand, the problem occurs because the user/password combo for the Mobile Services Cockpit is different than the combo for ES4? Is that correct?

What does principal propagation mean exactly? Is this some sort of "translation" of "link" between these 2 accounts?

The step by step tutorials to get a trial for Mobile Services Cockpit running are so nicely done and easy to follow. Why wasn't more effort taken to make the ES4 story easier?

Share
10 |10000 characters needed characters left characters exceeded
Robin van het Hof
Apr 18, 2017 at 07:44 AM
0

Hi Roberto & Piet,

There is a tutorial which describes setting up ES4 in SAP Cloud Platform mobile services (https://www.sap.com/developer/tutorials/fiori-ios-hcpms-backend-connection.html) but it uses Basic Authentication (no principal propagation)

In step 4 it is mentioned: "However, because there is no trust setup between your SAP Cloud Platform(trial) account and ES4, Application-to-Application SSO can not be used. Instead, Basic Authentication needs to be used." I'm not really familiar with the ES4 system, but I think to set up a trust for principal propagation you need SAP Cloud Connector (see https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/c84d4d0b12d34890b334998185f49e88.html) but I'm not sure if you can set up Cloud Connector on ES4...

I believe, since ES4 is just a 'personal training system', basic authentication would suffice for now -- if you want to connect to a 'real' backend, however, principal propagation as advised by Andreas is the way forward.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Robin,

thanks for pointing this out.
I don't know what's wrong, either I screwed up things while "playing" with authorization roles or the Mobile Services Cockpit is not properly working in these days.

Now I am not even able to create a new application from within the Cockpit, it shoots "Internal Server Error" errors all around...something like "Liquibase failed to initialize database".

I think I'll open a support message :)

0
Roberto Pagni
Apr 27, 2017 at 11:35 AM
0

Hi all,

Still unable to make it work, but at least I got an understandable error message:

It seems definetely an Authorization issue raised by the backend, in this case ES4.

What seems wrong to me is the indication of a null request: The request to the back end failed with status 401 for request null : Unauthorized.

It would be good to understand if anyone has got something similar...I will try to test everything with the Northwind service as it does not require any authorization and post the results.

EDIT:

With the Northwind service everything works as expected. I really do not understand where's the issue with ES4, provided I did things correctly (following the tutorial Robin suggested).
If anyone has a tip, please shoot it :)

Thanks,

Roberto.


cattura.png (107.1 kB)
Share
10 |10000 characters needed characters left characters exceeded