jcmturner / gokrb5

Pure Go Kerberos library for clients and services
Apache License 2.0
723 stars 245 forks source link

Get User SID #409

Open HamburgerJungeJr opened 4 years ago

HamburgerJungeJr commented 4 years ago

Im using this to authenticate users on my webapplication. Therefore I need some way to retrieve the ID of the user, so I can use this to map the Kerberos-User to my internal user for access control.

In ADCredentials there is the UserID field. But this is an Integer and I cannot find any AD-Field which would be unique which is an Integer. I would like to use the ObjectSID, like it its provieded for the Groups in GroupSIDs.

SchulteMK commented 2 years ago

Getting the samaccountname is a possibility, but you can change that. How top get the actual SID of the user account?