- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
docs: JWT authorizations documentation #170
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
base: main
Are you sure you want to change the base?
Conversation
…ication - Added a new section on JWT Authorization, detailing its use for headless authentication in CI/CD pipelines. - Included step-by-step instructions for generating RSA key pairs, configuring Connected Apps in Salesforce, and adding JWT authorization via CLI. - Enhanced the table of contents to reflect new sections and commands related to JWT authorization for both Salesforce and Data Cloud. - Updated command descriptions and examples for clarity and consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
dd839f9    to
    9df705a      
    Compare
  
    Signed-off-by: Chris Montes <cmontes@heroku.com>
…ected App configuration
| 
               | 
          ||
| - [@heroku-cli/plugin-applink](#heroku-cliplugin-applink) | ||
| - [Usage](#usage) | ||
| - [JWT Authorization (Headless Authentication)](#jwt-authorization-headless-authentication) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this whole section be in a Dev Center article instead? For example, I put the info in a draft: https://devcenter.heroku.com/articles/jwt-heroku-applink?preview_key=35c92d2249f1e86e60eaf0f11bbb0d40652e3830d3f420ea4ec06960c80e8340
| # JWT Authorization (Headless Authentication) | ||
| 
               | 
          ||
| The AppLink plugin supports JWT (JSON Web Token) authorization for headless | ||
| authentication in CI/CD pipelines and automated workflows. This eliminates the | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| authentication in CI/CD pipelines and automated workflows. This eliminates the | |
| authentication in CI/CD pipelines and automated workflows. JWT authorization eliminates the | 
| # Generate private key and self-signed certificate | ||
| openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes | ||
| 
               | 
          ||
| # Extract public key for Connected App | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Extract public key for Connected App | |
| # Extract public key for connected app | 
| ### 2. Configure Connected App in Salesforce | ||
| 
               | 
          ||
| Follow the official Salesforce documentation to create and configure your | ||
| Connected App: | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Connected App: | |
| connected app: | 
| 
               | 
          ||
| ### 3. Pre-authorize Users | ||
| 
               | 
          ||
| Follow the official guide for | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Follow the official guide for | |
| Follow the official Salesforce documentation for | 
| required: true, | ||
| description: 'path to file containing private key to authorize with', | ||
| description: | ||
| 'Path to file containing RSA private key in PEM format. Generate with: openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes', | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'Path to file containing RSA private key in PEM format. Generate with: openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes', | |
| 'path to file containing RSA private key in PEM format to authorize with', | 
| char: 'l', | ||
| description: 'Salesforce login URL', | ||
| description: | ||
| 'Salesforce login URL (default: https://login.salesforce.com for production, https://test.salesforce.com for sandboxes)', | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'Salesforce login URL (default: https://login.salesforce.com for production, https://test.salesforce.com for sandboxes)', | |
| 'Salesforce login URL', | 
| required: true, | ||
| description: 'username for authorization', | ||
| description: | ||
| 'Salesforce username that has been authorized for the Connected App. Must be a valid user in the target org.', | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'Salesforce username that has been authorized for the Connected App. Must be a valid user in the target org.', | |
| 'Salesforce username authorized for the connected app', | 
| alias: flags.string({ | ||
| description: | ||
| 'alias for the authorization (defaults to applink:{developer_name})', | ||
| 'Alias for the authorization (defaults to applink:{developer_name}). Used to retrieve credentials via SDK.', | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'Alias for the authorization (defaults to applink:{developer_name}). Used to retrieve credentials via SDK.', | |
| '[default: applink:{developer_name}] alias for authorization to retrieve credentials via SDK', | 
| Follow the official guide for | ||
| [Managing Connected App Policies](https://help.salesforce.com/s/articleView?id=sf.connected_app_manage_oauth.htm): | ||
| 
               | 
          ||
| In your Connected App settings, click **Manage** > **Edit Policies**: | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| In your Connected App settings, click **Manage** > **Edit Policies**: | |
| In your connected app settings, click **Manage** > **Edit Policies**: | 
Description
This pull request adds the documentation JWT (headless) authentication in the Heroku AppLink plugin, providing examples for CI/CD and automation scenarios.
WI
Replace this text with a summary of the change(s) including relevant
motivations, context, and or links.
📋 Documentation Requiring CX Review
README.md Section: Lines 28-196 (the entire JWT Authorization section)
Source Files
src/lib/jwtAuthCommand.ts(base command with shared text)src/commands/salesforce/authorizations/add/jwt.tssrc/commands/datacloud/authorizations/add/jwt.tsLive Commands:
Local installation and manual testing instructions