Layer file of SDE connection via OS Authentication

406
4
Jump to solution
07-11-2020 02:24 AM
DavidPike
MVP Frequent Contributor

I'm wondering how layer files representing features within a multiuser database can be shared with OS authentication.

My understanding is that a 'filepath' to the feature is a reference to the specific sde connection on my computer, followed by \MyFeature 1 etc. which makes sense to control the authentication and version.

How would a layer file be constructed so that various users can use the same layer file but with a prompt for OS Auth (as they would have different DBMS roles assigned to them)?

Is it just a case of copying the .sde connection file to a network location then wrangling the paths through it?

There are no versions other than DEFAULT.

Thanks for reading.

0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

OS Authentication doesn't have a prompt, it uses the credentials of the process reading the connection information and connecting to the EGDB.

How connection information in SDE files is handled changed around 10.2.  Today, the connection information is embedded in a layer, and hence layer file.  Layer.workspacePath contains a reference to the SDE file last used to set a layer's data source, but that SDE file isn't used to make the connection after set.  Layer.serviceProperties contains the embedded connection information that is used to make the connection.

View solution in original post

0 Kudos
4 Replies
JoshuaBixby
MVP Esteemed Contributor

OS Authentication doesn't have a prompt, it uses the credentials of the process reading the connection information and connecting to the EGDB.

How connection information in SDE files is handled changed around 10.2.  Today, the connection information is embedded in a layer, and hence layer file.  Layer.workspacePath contains a reference to the SDE file last used to set a layer's data source, but that SDE file isn't used to make the connection after set.  Layer.serviceProperties contains the embedded connection information that is used to make the connection.

0 Kudos
DavidPike
MVP Frequent Contributor

Thanks Joshua,

On checking the serviceProperties, is the UserName derived from os.getusername or whatever rather than hardcoded?

Thanks.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Esri doesn't document that information, although I suspect you are correct it is getting it from the database because Layer.serviceProperties returns no information on user when an EGDB connection is broken.  If the application was pulling the information from local client/process, it would show user information even if the EGDB connection is broken. 

0 Kudos
DavidPike
MVP Frequent Contributor

Thanks Joshua, I guess the best way is to test it with some colleagues.

Cheers.

0 Kudos