You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any particular reason why you are storing the tokens in unencrypted form on the hard drive? Hardly the best security practice.
I understand that you might be using this for ensuring session longevity and such, but at least store them as secure string, or use the cred man or something. On a related note, why arent you leveraging the ADAL/MSAL token cache?
Thanks for calling this out. We had tokens being encrypted on Windows, but we didn't have it working on Linux/OSX because there was no support for it in MSAL. Peter Ombwa (@peombwa) worked on adding support for encrypting tokens on Linux last week and we expect to be able to add encryption back very soon.
I actually noticed this on a Windows machine. The userTokenCache.bin3 is created in the assembly directory and contains the unencrypted tokens, you can simply copy/paste it for use in auth header outside of the Graph module. Using 0.1.4 if it matters.
As long as you are aware of this an plan to address it, I'm fine :)
We had to temporarily remove it for Windows because System.Security.Cryptography.ProtectedData - DPAPI - doesn't support PowerShell 5 (.Net 4.5). This is something high on our priority list.
Activity
darrelmiller commentedon Dec 3, 2019
Thanks for calling this out. We had tokens being encrypted on Windows, but we didn't have it working on Linux/OSX because there was no support for it in MSAL. Peter Ombwa (@peombwa) worked on adding support for encrypting tokens on Linux last week and we expect to be able to add encryption back very soon.
We are using the MSAL Token cache. We access it here https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/dev/src/Authentication/Authentication/Helpers/AuthenticationHelpers.cs#L48
michevnew commentedon Dec 3, 2019
I actually noticed this on a Windows machine. The userTokenCache.bin3 is created in the assembly directory and contains the unencrypted tokens, you can simply copy/paste it for use in auth header outside of the Graph module. Using 0.1.4 if it matters.
As long as you are aware of this an plan to address it, I'm fine :)
darrelmiller commentedon Dec 3, 2019
I'm not sure why we needed to remove it temporarily for Windows, but I do know that this is high on our priority to fix.
peombwa commentedon Dec 3, 2019
We had to temporarily remove it for Windows because System.Security.Cryptography.ProtectedData - DPAPI - doesn't support PowerShell 5 (.Net 4.5). This is something high on our priority list.