-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#813 Add functionality to enable deploy CLI client to use private key…
… JWT (#817) * Adds functional support for private key JWT authentication - Adds new configuration options AUTH0_CLIENT_SIGNING_KEY, AUTH0_CLIENT_SIGNING_ALGORITHM - Adds validation to ensure either AUTH0_CLIENT_SIGNING_KEY or AUTH0_CLIENT_SECRET are present - Passes new configiration options through to auth0/auth0 library when creating a new AuthenticationClient In part, resolves: #813 * Adds test cases to cover new functionalilty for private key JWT authentication In part, resolves: #813 * Updates changelog and documentation to support new features In part, resolves: #813 * Fixes changelog formatting * Continued work * Changing signing key to path rather than passed in as environment variable * Adding public and private keys to the git ignore * Re-recording tests * Updating changelog * Undoing erroneous change and fixing PR link --------- Co-authored-by: Aaron Chilcott <siaison.co> Co-authored-by: Will Vedder <[email protected]>
- Loading branch information
1 parent
d4e6e13
commit 72470f4
Showing
12 changed files
with
2,721 additions
and
3,073 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ config*.json | |
.idea | ||
.npmrc | ||
yarn-error.log | ||
*.pem | ||
*.pub |
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Authenticating with your Tenant | ||
|
||
There are three available methods of authenticating the Deploy CLI with your tenant: | ||
|
||
- [Client Credentials](#client-credentials) | ||
- [Private Key JWT](#private-key-JWT) | ||
- [Access Token](#access-token) | ||
|
||
## Client Credentials | ||
|
||
Authenticating with a client ID and client secret pair. This option is straightforward and enables the quickest path to setup for the tool. In order to utilize, set both the `AUTH0_CLIENT_ID` and `AUTH0_CLIENT_SECRET` configuration values with the client ID and client secret respectively. These credentials can be found under the "Credentials" tab within the designated application used for the Deploy CLI. | ||
|
||
## Private Key JWT | ||
|
||
Providing a private key to facilitate asymmetric key pair authentication. This requires the "Private Key JWT" authentication method for the designated client as well as a public key configured on the remote tenant. This may be appealing to developers who do not wish to have credentials stored remotely on Auth0. | ||
|
||
To utilize, pass the path of the private key through the `AUTH0_CLIENT_SIGNING_KEY_PATH` configuration property either as an environment variable or property in your `config.json` file. This path is relative to the working directory. Optionally, you can specify the signing algorithm through the `AUTH0_CLIENT_SIGNING_ALGORITHM` configuration property. | ||
|
||
**Example: ** | ||
|
||
```json | ||
{ | ||
"AUTH0_CLIENT_SIGNING_KEY_PATH": "./private.pem", | ||
"AUTH0_CLIENT_SIGNING_ALGORITHM": "RSA256" | ||
} | ||
``` | ||
|
||
See [Configure Private Key JWT Authentication](https://auth0.com/docs/get-started/applications/configure-private-key-jwt) for further documentation | ||
|
||
## Access Token | ||
|
||
Passing in an access token directly is also supported. This option puts more onus on the developers but can enable flexible and specific workflows when necessary. It can be leveraged by passing the Auth0 access token in via the `AUTH0_ACCESS_TOKEN` environment variable. | ||
|
||
[[table of contents]](../README.md#documentation) |
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
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.