Windows Impersonation: A Flaw in the Ointment

前端 未结 3 1565
悲哀的现实
悲哀的现实 2021-02-08 15:41

In my journey to master the nuances of user impersonation in Windows I first had an issue about getting impersonation to a remote database to occur at all (see this SO question)

3条回答
  •  名媛妹妹
    2021-02-08 16:24

    I have found that the login type LOGON32_LOGON_NETWORK_CLEARTEXT does not have a problem with connections being re-used across impersonation contexts and works as expected without varying the connection string.

    According to this thread, the "cleartext" part of this login type seems to be local to the server. I only keep the token alive for the duration of the database query or set of queries, so the token is very short-lived. Using this login type for long-lived tokens may or may not be a security risk.

提交回复
热议问题