hoauth2
hoauth2 copied to clipboard
Service Account
Damian Soriano (Gmail) to me Aug 8 Hi!
I am creating a Haskell application that connects go bigquery. I wanted to use your OAuth2 lib to do that: https://github.com/freizl/hoauth2
I search a little bit in the doc and example and I didn't found anything about service account authentication (https://developers.google.com/identity/protocols/OAuth2ServiceAccount). I was wondering if that feature is already implemented in the lib or not, since I found no example about that.
Many thanks
Regards
Hi,
I have just released few days ago a package called google-oauth2-jwt that create the signed JWT needed to access Google APIs with Service Accounts.
BTW: your issue #16 also need it.
Best regards, Michel.
@MichelBoucey nice! will take an look.
@MichelBoucey just be curious that are you able to build http://hackage.haskell.org/package/google-oauth2-jwt on latest mac? Gets linking error
Undefined symbols for architecture x86_64:
"_DHparams_dup", referenced from:
_HsOpenSSL_DHparams_dup in libHSHsOpenSSL-0.11.1.1-42cQLUu6Nm37qCxYZlRnxo.a(HsOpenSSL.o)
(maybe you meant: _HsOpenSSL_DHparams_dup)
"_X509_CRL_get0_by_serial", referenced from:
_cZGG_info in libHSHsOpenSSL-0.11.1.1-42cQLUu6Nm37qCxYZlRnxo.a(Revocation.o)
"_X509_STORE_CTX_get0_current_crl", referenced from:
_HsOpenSSL_X509_STORE_CTX_get0_current_crl in libHSHsOpenSSL-0.11.1.1-42cQLUu6Nm37qCxYZlRnxo.a(HsOpenSSL.o)
(maybe you meant: _HsOpenSSL_X509_STORE_CTX_get0_current_crl)
"_X509_STORE_CTX_get0_current_issuer", referenced from:
_HsOpenSSL_X509_STORE_CTX_get0_current_issuer in libHSHsOpenSSL-0.11.1.1-42cQLUu6Nm37qCxYZlRnxo.a(HsOpenSSL.o)
(maybe you meant: _HsOpenSSL_X509_STORE_CTX_get0_current_issuer)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
I have no Mac. I work on Linux x86_64. I never have had this issue and the build on travis CI is also Okay... Do you build the package with Stack? Have you OpenSSL sources installed? There is an ongoing issue about building HsOpenSSL on Mac OS X.
@MichelBoucey thanks your feedback. I did find that link which help to me to install the HsOpenSSL but I got error at linking. Turns out it's specific issue in Mac and I'm running it in CentOS now.
@freizl RedHat/CentOS are very LTS distros, so they use very old versions of libraries and softwares. A successful build should be easer to get on a current Debian(-like) distro or ArchLinux.
thoughts: maybe put it in an separated repo?
Can't you develop the service account branch in a debian/archlinux docker container?
I'm not yet an fan of docker container but I have bootstrapped an linux vm. It's still in progress in very low pace if you are interested: https://github.com/freizl/hoauth2/compare/branch/service-account?expand=1
And I'm wondering all those changes shall live in its own repo given it seems special to google implementation.
I have built branch/service-account without any troubles on ArchLinux x86_64 (discarding all examples test searching for "Keys").
And yes it seems to me also that a specific package is a bit better outside an only generic implementation package, at least, in an obviously specific module Network.OAuth.OAuth2.Google .
Network.OAuth.OAuth2.Google seems an good name. Thanks!