Cancel
Showing results for 
Search instead for 
Did you mean: 

Mindsphere backend application without frontend

Hi.

 

My questions is actually pretty simple:

 

When I upload an application to Mindsphere which needs to access Mindsphere APIs (for example, time series), I have to methods to authenticate this APIs calls:

 

  1. Using the technical user for the tenant, and then requesting the bearer token to authenticate the APIs.
  2. Use the session cookie from the browser which opens the application, and use this cookie to authenticate the APIs.

The problem is, what if I have an application that has no frontend? I mean, I upload an application to Cloud Foundry which needs to make use of the APIs and also cant be tenant specific. The application needs to read and write timeseries continuously. Is this possible?

 

Thanks in advance!

6 REPLIES 6

Re: Mindsphere backend application without frontend

Legend
Legend
I'm not sure I understand "cant be tenant specific" :-?

If your app doesn't require external access and is purely backend internal, you can use your technical user credentials to authenticate with identity "your application" and keep using the mdsp APIs continuously. You can provide the credentials on startup by using the cloudfoundry environment, as the devops-demo devopsadmin component does:

https://gitlab.com/mindsphere/devops-demo/blob/master/devops/devopsadmin/deploy.sh

If you for whatever reason need cross-tenancy, you could always provide on startup several credentials, one for each tenant.

Re: Mindsphere backend application without frontend

If I provide the service credentials to the application, then I need to customize the application for each tenant, because service credentials are tenant-dependent. 

Re: Mindsphere backend application without frontend

Legend
Legend
Your code stays completely generic, you just have to configure your operational deployment on whichever tenants you want your application deployed. There's not such thing as "all tenants credentials".

Maybe if you explain your use case I can help further, because at the moment I don't understand where the issue is :-?
Highlighted

Re: Mindsphere backend application without frontend

Legend
Legend
This might also be relevant for you, released just a couple of days ago:
https://developer.mindsphere.io/apis/exchange-tokenmanager/api-tokenmanager-overview.html

Re: Mindsphere backend application without frontend

Creator
Creator

 

Re: Mindsphere backend application without frontend

I was just reading the documentation yesterday and also found this. I am going to try it a little bit!