New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ServiceAccountCredential on .NET Core #797
Comments
System.Security.Cryptography.Cng is not available on Linux, so an alternative RSA implementation will need finding/writing. |
@chrisdunelm there is an OpenSSL implementation: https://www.nuget.org/packages/System.Security.Cryptography.OpenSsl. I've been using it to call Google API's succesfully using an X509 certificate. |
Unfortunately System.Security.Cryptography.OpenSsl requires netstandard >=1.6, whereas we're targetting netstanard1.3, so we can't use this unless we re-target. |
Support ServiceAccountCredentials in netstandard, although without initialization from X509 certificate. Fixes googleapis#797. googleapis#805 adds tests for valid AccessToken from ServiceAccountCredential. Fixed signing in netstandard builds so InternalsVisibleTo now works. Enabled all tests in netstandard that previously were disabled due to internal access.
Support ServiceAccountCredentials in netstandard, although without initialization from X509 certificate. Fixes googleapis#797. Fixed signing in netstandard builds so InternalsVisibleTo now works. Enabled all tests in netstandard that previously were disabled due to internal access.
* NetStandard improvements Support ServiceAccountCredentials in netstandard, although without initialization from X509 certificate. Fixes #797. #805 adds tests for valid AccessToken from ServiceAccountCredential. Fixed signing in netstandard builds so InternalsVisibleTo now works. Enabled all tests in netstandard that previously were disabled due to internal access.
@chrisdunelm why no support for the Just call the Key = certificate.GetRSAPrivateKey(); |
@henkmollema Yes, the implementation is straightforward, but I'm not sure if the returned RSA instance will be supported on non-Windows platforms (Linux), and I haven't yet implemented the test that would ensure it's OK. If you can work out how to add a netstandard1.3 test of X509Certificate in ServiceAccountCredentialTests.cs please let me know :) |
Created #807 for X509Certificate initialization. |
Hi @henkmollema |
@nicolocodev Exactly which Google library(s) and version are you depending on? |
@chrisdunelm my "frameworks": {
"net452": {
"dependencies":{
"Google.Apis.Vision.v1" : "1.15.0.572"
}
}
} |
@nicolocodev odd, yes, I would expect it to use the full net45 library in the Google.Apis.Auth package. Please can you update to version 1.16.0.593 (the latest version) and restore/build again and let me know what happens? |
I agree it's odd. Mind posting your Auth code as well? |
@chrisdunelm updated, now it works! |
Great :) Glad to hear it. |
umm but now works on |
@nicolocodev yes, support has been added for service credentials on .NET Core in the 1.16.0 release. Is this causing a problem? |
No, it works well, thank you! |
Are there any plans on supporting server-to-server access to Google API's using the
ServiceAccountCredential
class on .NET Core (including Linux)?Currently it's still not available due to
RSACryptoServiceProvider
not being available on Linux (see this).I understand this is problematic since
RSACryptoServiceProvider
is part of the public API, but I still hope a solution can be found.Related: #695, #758
The text was updated successfully, but these errors were encountered: