Skip to content

Commit

Permalink
feat: Add new private_key & passphrase based authentication method (#38)
Browse files Browse the repository at this point in the history
# Description

The tap can now connect to snowflake using a provided private key and
passphrase. The private key can be provided as a string or the path to
the private key file can be provided.

Fixes an edge-case handling where schemas needing quotes (example:
`"MySpecial.SchemaName"`) are properly handled during discovery.

Speeds up discovery slightly when `tables` is provided. The speed up is
achieved by only inspecting relevant schemas which can be derived by
parsing each table within `tables`.

Introduces 3 new config parameters to support key based authentication
and since there are 2 ways to authenticate, `password` is now an
optional parameter. The new parameters are:
- `private_key`
- `private_key_path`
- `private_key_passphrase`

resolves: #19

---------

Co-authored-by: Edgar Ramírez Mondragón <[email protected]>
  • Loading branch information
haleemur and edgarrmondragon authored Aug 27, 2024
1 parent 7924641 commit da58939
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 34 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ environment variable is set either in the terminal context or in the `.env` file

### Source Authentication and Authorization

Standard `username` and `password` auth is supported.
This tap supports two authentication methods:
- Standard `username` and `password` auth
- [Key Pair Authentication](https://docs.snowflake.com/en/user-guide/key-pair-auth)

#### Key Pair Authentication

Key Pair authentication can be enabled by specifing either the `private_key` of the `private_key_path`, and optionally the `private_key_passphrase` if required.

### Enabling Batch Messaging

Expand Down
8 changes: 8 additions & 0 deletions meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ plugins:
- name: user
- name: password
kind: password
sensitive: true
- name: private_key
kind: password
sensitive: true
- name: private_key_path
- name: private_key_passphrase
kind: password
sensitive: true
- name: account
kind: password
- name: role
Expand Down
Loading

0 comments on commit da58939

Please sign in to comment.