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

Supporting JSON authentication keys #16

Closed
frsyuki opened this issue Aug 20, 2015 · 2 comments
Closed

Supporting JSON authentication keys #16

frsyuki opened this issue Aug 20, 2015 · 2 comments

Comments

@frsyuki
Copy link
Contributor

frsyuki commented Aug 20, 2015

#13 added support for LocalFile class. This allows us to embed authentication information in config file. For example,

out:
  type: bigquery
  auth_method: private_key
  project: my-proj-1234
  dataset: ds1
  table: ts4
  auto_create_table: true
  schema_file:
    content: |
      {
         ..
      }
  p12_keyfile:
    base64: |
      aG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhv
      Z2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dl
      CmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpo
      b2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9n
      ZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UK
      aG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhv
      Z2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dl
      CmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpo
      b2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQpob2dlCmhvZ2UKaG9nZQo=
...

This is good for us to deploy to servers because we can bundle all configuration in one file.

However, creating base64 of .p12 file needs additional work. It would be useful if it supports JSON authentication files. For example,

out:
  type: bigquery
  auth_method: json_key
  json_keyfile: /path/to/auth.json

or

out:
  type: bigquery
  auth_method: json_key
  json_keyfile:
    content: |
      {
          "private_key_id": "123456789",
          "private_key": "-----BEGIN PRIVATE KEY-----\nABCDEF",
          "client_email": "..."
       }
...
@sakama
Copy link
Contributor

sakama commented Sep 16, 2015

@frsyuki I implemented this auth_method at #17.
Do you have any advise or order about this pull-request?

If no, I'll merge it and release new version.

@sakama
Copy link
Contributor

sakama commented Oct 6, 2015

I implemented at #17 and merged.

@sakama sakama closed this as completed Oct 6, 2015
u110 pushed a commit to primenumber-dev/embulk-output-bigquery that referenced this issue May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants