Skip to content

auth: draft jwt support using gapitoken#65

Merged
rakyll merged 6 commits into
googleapis:masterfrom
proppy:jwt
Aug 14, 2013
Merged

auth: draft jwt support using gapitoken#65
rakyll merged 6 commits into
googleapis:masterfrom
proppy:jwt

Conversation

@proppy

@proppy proppy commented Jul 31, 2013

Copy link
Copy Markdown
Contributor

Fixes #5, modeled after the compute client.

@proppy

proppy commented Jul 31, 2013

Copy link
Copy Markdown
Contributor Author

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

rakyll commented Jul 31, 2013

Copy link
Copy Markdown
Contributor

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

@proppy

proppy commented Jul 31, 2013

Copy link
Copy Markdown
Contributor Author

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

rakyll commented Jul 31, 2013

Copy link
Copy Markdown
Contributor

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

proppy commented Aug 10, 2013

Copy link
Copy Markdown
Contributor Author

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

rakyll commented Aug 13, 2013

Copy link
Copy Markdown
Contributor

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

@proppy

proppy commented Aug 13, 2013

Copy link
Copy Markdown
Contributor Author

@proppy

proppy commented Aug 14, 2013

Copy link
Copy Markdown
Contributor Author

PTAL

Comment thread package.json Outdated

This comment was marked as spam.

@proppy

proppy commented Aug 14, 2013

Copy link
Copy Markdown
Contributor Author

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