Skip to content

Conversation

@mandelbro
Copy link
Contributor

@mandelbro mandelbro commented Oct 30, 2025

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

  1. README.md Section: Lines 28-196 (the entire JWT Authorization section)

  2. Source Files

Live Commands:

heroku salesforce:authorizations:add:jwt --help
heroku datacloud:authorizations:add:jwt --help

Local installation and manual testing instructions

…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.
@mandelbro mandelbro requested a review from Copilot October 30, 2025 16:57
@mandelbro mandelbro requested a review from a team as a code owner October 30, 2025 16:57
Copy link

Copilot AI left a 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.

@mandelbro mandelbro force-pushed the montes/docs/jwt-auth-documentation branch from dd839f9 to 9df705a Compare October 30, 2025 19:36
@mandelbro mandelbro changed the title Montes/docs/jwt auth documentation docs: JWT authorizations documentation Oct 30, 2025

- [@heroku-cli/plugin-applink](#heroku-cliplugin-applink)
- [Usage](#usage)
- [JWT Authorization (Headless Authentication)](#jwt-authorization-headless-authentication)

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Connected App:
connected app:


### 3. Pre-authorize Users

Follow the official guide for

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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)',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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.',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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.',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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**:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In your Connected App settings, click **Manage** > **Edit Policies**:
In your connected app settings, click **Manage** > **Edit Policies**:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants