MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

Andriod and iOS apps #925

Open Chicagoan2016 opened 4 years ago

Chicagoan2016 commented 4 years ago

Question Greetings, So our organization has on-premise Sql Servers and on-premise AD. We are considering building a few mobile apps for just our employees but I am not sure if an app on our employees' Iphones or Andriod phones can connect to our AD or on premise Sql Server? thoughts please?

Kind Regards

Version and Platform CSLA version: 4.7.100 OS: Windows Platform: Xamarin

BlagoCuljak commented 4 years ago

First of all, is this CSLA related question or question in general?

Second of all, if you're not planning an Enterprise app, if it's small app using Xamarin, then you should consider not using CSLA at all, you have a ton of resources with asp, Xamarin, AD Auth, SQL Server on the net. You will probably have it sooner then with CSLA.

Chicagoan2016 commented 4 years ago

Our team is (has been) using Csla so, at least for our team, it's a Csla related question. I was wondering if one of fellow Csla developers has done something similar with Csla and would like to share.

GillesBer commented 4 years ago

Hi @Chicagoan2016 , we always have a remote portal on which we connect to (3 tier deployement). This way, both AD & SQL are accessible to the application server (which can be hosted on your premises). we don't use 2 tier deployment on mobile devices: I don't know if this is technically feasible, but our infra would not open our SQL Server on internet.

rockfordlhotka commented 4 years ago

The mobile devices can't directly connect to a SQL Server, you need an app server - with CSLA that's normally a data portal endpoint. The server-side data portal code, as with normal CSLA, can talk to the database.

In terms of the authentication, I'm not 100% sure what's in the box with Xamarin in that regard. You can certainly authenticate via the data portal and server, but it might be possible to use Oauth directly from the device to authenticate the user.

Chicagoan2016 commented 4 years ago

@GillesBer , @rockfordlhotka, can't thank you enough. A couple more questions 1) Should we set up a remote data portal on application server as described in using Csla 4 ebook 'Data portal configuration'? 2)Could we use LDAP authentication and users can authenticate on their iphones/Andriods before they could use the app? Warm Regards

ajj7060 commented 4 years ago

@Chicagoan2016

  1. Yes, this is the only way you'll get the app to work. If you want the app to work even if they are not on your internal network, the app server will need to be accessible via the internet (just for https).
  2. No. As Rocky said, I don't think there's anything built in with Xamarin to let you do that. Probably what you'll have to do is gather the user/password in your app, send it to the app server which can then ask AD to authenticate. You could then get the groups & other info and store it as claims on your ClaimsPrincipal/ClaimsIdentity... but none of this will be using using impersonation like you could in an asp.net app.