Skip to content

Commit 98f31a1

Browse files
authored
Confluence source connector: Also allow PATs for Ingest v2 authentication only (#434)
1 parent 7cdcfb3 commit 98f31a1

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

snippets/general-shared-text/confluence-cli-api.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import AdditionalIngestDependencies from '/snippets/general-shared-text/ingest-d
1111
The following environment variables:
1212

1313
- `CONFLUENCE_URL` - The URL of the Confluence instance, represented by `--url` (CLI) or `url` (Python).
14-
- `CONFLUENCE_API_TOKEN` - The value of the Confluence API token for authenticating with the Confluence instance, represented by `--api-token` (CLI) or `api_token` (Python).
14+
- One of the following:
15+
16+
- `CONFLUENCE_API_TOKEN` - The value of the Confluence API token for authenticating with the Confluence instance, represented by `--api-token` (CLI) or `api_token` (Python).
17+
- `CONFLUENCE_ACCESS_TOKEN` - The value of the Confluence personal access token for authenticating with the Confluence instance, represented by `--access-token` (CLI) or `access_token` (Python).
18+
1519
- `CONFLUENCE_USER_EMAIL` - The user's email address for authenticating with the Confluence instance, represented by `--user-email` (CLI) or `user_email` (Python).
1620

1721
Additional settings include:

snippets/general-shared-text/confluence.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@ allowfullscreen
1313
- A [Confluence user](https://confluence.atlassian.com/doc/add-and-invite-users-138313.html) with
1414
the correct [permissions](https://support.atlassian.com/confluence-cloud/docs/what-are-confluence-cloud-permissions-and-restrictions/) to
1515
access the target spaces and pages in the Confluence instance.
16-
- A [Confluence API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) for the target Confluence user.
16+
- One of the following:
17+
18+
- A [Confluence Cloud API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) for the target Confluence user.
19+
- For Unstructured Ingest only, a [Confluence personal access token](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html) for the target Confluence user.
20+
1721
- Optionally, the names of the specific [spaces](https://support.atlassian.com/confluence-cloud/docs/navigate-spaces/) in the Confluence instance to access.

snippets/source_connectors/confluence.sh.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ unstructured-ingest \
77
--spaces luke,paul \
88
--user-email $CONFLUENCE_USER_EMAIL \
99
--api-token $CONFLUENCE_API_TOKEN \
10+
# Or:
11+
# --access-token $CONFLUENCE_ACCESS_TOKEN \
1012
--output-dir $LOCAL_FILE_OUTPUT_DIR \
1113
--partition-by-api \
1214
--api-key $UNSTRUCTURED_API_KEY \

snippets/source_connectors/confluence.v2.py.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ if __name__ == "__main__":
2626
),
2727
downloader_config=ConfluenceDownloaderConfig(download_dir=os.getenv("LOCAL_FILE_DOWNLOAD_DIR")),
2828
source_connection_config=ConfluenceConnectionConfig(
29-
access_config=ConfluenceAccessConfig(api_token=os.getenv("CONFLUENCE_API_TOKEN")),
29+
access_config=ConfluenceAccessConfig(
30+
api_token=os.getenv("CONFLUENCE_API_TOKEN")
31+
# Or:
32+
# access_token=os.getenv("CONFLUENCE_ACCESS_TOKEN")
33+
),
3034
url=os.getenv("CONFLUENCE_URL"),
3135
user_email=os.getenv("CONFLUENCE_USER_EMAIL")
3236
),

0 commit comments

Comments
 (0)