Skip to content
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

auth: draft jwt support using gapitoken #65

Merged
merged 6 commits into from Aug 14, 2013
Merged

Conversation

proppy
Copy link
Contributor

@proppy proppy commented Jul 31, 2013

Fixes #5, modeled after the compute client.

@proppy
Copy link
Contributor Author

proppy commented Jul 31, 2013

Note that the current implementation require you to confert the p12 file into PEM using:

openssl pkcs12 -in key.p12 -out key.pem -nocerts

And always ask for a passphrase:

Enter PEM pass phrase:

There seems to be PKCS12 support in node.crypto so there might be a workaround for the converstion.

One could get rid of the passphrase using:

openssl rsa -in key.pem -out key-nopass.pem

@rakyll
Copy link
Contributor

rakyll commented Jul 31, 2013

Your base is not google:master, fetch and merge.

@proppy
Copy link
Contributor Author

proppy commented Jul 31, 2013

It's from a fresh clone:

~/google-api-nodejs-client$ git pull origin master
git pull origin master
From https://github.com/google/google-api-nodejs-client
 * branch            master     -> FETCH_HEAD
Already up-to-date.
~/google-api-nodejs-client$ git push proppy jwt
git push proppy jwt
Everything up-to-date

@rakyll
Copy link
Contributor

rakyll commented Jul 31, 2013

My bad, broken tests...
I'm not quite sure about the current naming, two concerns.

  • Currently, we call all auth middleware xxxAuthClient but it's quite verbose, so I don't want to keep naming auth clients in a similar fashion.
  • JWT doesn't represent the OAuth 2.0's client authorization, as Google calls it, service account based authorization.

@proppy
Copy link
Contributor Author

proppy commented Aug 10, 2013

Currently, we call all auth middleware xxxAuthClient but it's quite verbose, so I don't want to keep naming auth clients in a similar fashion.

Can we do this in a separate, refactoring change? I created #77 to track it.

JWT doesn't represent the OAuth 2.0's client authorization, as Google calls it, service account based authorization.

Do you want me to rename it to serviceaccount? I wanted to make the distinction between JWT based service account, and platform specific ones like compute or app engine.

@rakyll
Copy link
Contributor

rakyll commented Aug 13, 2013

To be accurate, it should be as verbose as oauth2serviceaccount.

@proppy
Copy link
Contributor Author

proppy commented Aug 13, 2013

@proppy
Copy link
Contributor Author

proppy commented Aug 14, 2013

PTAL

@@ -27,6 +27,7 @@
"dependencies" : {
"request": "~2.25.0",
"async": "0.2.6"

This comment was marked as spam.

@proppy
Copy link
Contributor Author

proppy commented Aug 14, 2013

tests fixed: PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for jwt service account
2 participants