BUG: System DSNs not decryptable by system users #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One feature blocking the ODBC driver from working on the Power BI Gateway server was that System DSNs were usable by anyone on the system, but the client secret decryption was only possible by the user who created the DSN. This meant that when the Power BI Gateway Server tried to use the DSN via its service account, the client secret could not be decrypted.
This PR modifies system DSN secret encryption/decryption to happen in the system scope, so all users of the system can leverage system DSNs. User DSNs use the original user scope, and cannot be leveraged by other users on the system. This solves the problem and is closer to the original vision of User vs System DSNs.
This makes progress on #21 and probably also on #11 (though that has not yet been confirmed as I don't have access to a report server to test).