-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from nikogura/pubkey-auth
Enable JWT Pubkey auth
- Loading branch information
Showing
7 changed files
with
495 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,7 +291,13 @@ Output: | |
|
||
An http repository server. It serves up the various dbt tools and components from a file location on disk. | ||
|
||
At present, the repo server supports basic auth via _htpasswd_ file. Other auth options will be available as time allows. | ||
At present, the repo server supports basic auth via _htpasswd_ file and public key auth from an ssh-agent via JWT. Other auth options will be available as time allows. | ||
|
||
Separate IDP (Identity Provider) files can be provided to provide privilege separation between tool use (GET) and tool publishing (PUT). Likewise separate auth methods can be used for GET and PUT. | ||
|
||
Why did I make it possible to have split auth methods? Flexibility. Passwordless ssh-key auth for a user is good UX. It's secure, and easy for the users. It's kind of a pain for CI systems and other automated uses. Sometimes just sticking a password in the environment is the best way for these use cases. Hey, do what you want. I'm just trying to help. | ||
|
||
The PublicKey Auth IDP file contains sections for both GET and PUT, so a single file can be used for both. Obviously if you do use separate files, only the appropriate portion of each file will be read. | ||
|
||
### Reposerver Config | ||
|
||
|
@@ -301,13 +307,38 @@ A JSON file of the form: | |
"address": "my-hostname.com", | ||
"port": 443, | ||
"serverRoot": "/path/to/where/you/store/tools", | ||
"authType": "basic-htpasswd", | ||
"authTypeGet": "basic-htpasswd", | ||
"authTypePut": "basic-htpasswd", | ||
"authGets": false, | ||
"authOpts": { | ||
"idpFile": "/path/to/htpasswd/file" | ||
} | ||
"authOptsGet": { | ||
"idpFile": "/path/to/htpasswd/file/for/gets" | ||
}, | ||
"authOptsPutt": { | ||
"idpFile": "/path/to/htpasswd/file/for/puts" | ||
}, | ||
} | ||
|
||
### Reposerver IDP File | ||
|
||
The reposerver takes an IDP file. In the case of http basic auth, this is a standard htpasswd file. | ||
|
||
In the case of Public Key JWT Auth, it looks like so: | ||
|
||
{ | ||
"getUsers": [ | ||
{ | ||
"username": "foo", | ||
"publickey": "ssh-rsa ...... [email protected]" | ||
} | ||
], | ||
"putUsers": [ | ||
{ | ||
"username": "bar", | ||
"publickey": "ssh-rsa ...... [email protected]" | ||
} | ||
] | ||
} | ||
|
||
### Running the Reposerver | ||
|
||
Command: `dbt reposerver -f /path/to/config` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.