Closed cisco-sbg-mgiassa-ai closed 2 months ago
Thanks for the report. Not yet ruling out an error in the implementation, I do have some questions about the configuration being used. The error:
multiple authentication options configured
Is an indication that there is a mix of configuration authentication types being used. You mention that you are using confluence_publish_token
to authenticate with a Confluence Data Center instance. But you are also getting a message about using confluence_api_token
which is for Confluence Cloud instances:
A publishing password has been configured with 'confluence_api_token'...
With the new versions of this extension, we have a bit more explicit checks in the configuration that help detect odd configuration cases -- that now it is explicitly stopping a run with the new detection logic.
I'd be curious for a report on what configuration items are set. In theory, we should not be mixing entries like PAT and user/API tokens together. If such a configuration was required to get it to work for you instance, I would be interested to know -- it wouldn't make sense to me to why, but I would take the time to investigate how a requirement was needed (and in turn, make appropriate changes to the extension).
@jdknight Thanks for the rapid help. I'll get that report ASAP. Cheers!
@jdknight Here we go:
(system)
platform: Linux-5.15.0-1066-aws-x86_64-with-glibc2.29
python: 3.8.10 (default, Jul 29 2024, 17:02:10) [GCC 9.4.0]
sphinx: 7.1.2
docutils: 0.20.1
requests: 2.32.3
urllib3: 2.2.2
builder: 2.6.1
(configuration)
confluence_api_token: (set)
confluence_ask_password: False
confluence_cleanup_purge: True
confluence_editor: v1
confluence_footer_file: assets/footer.tpl
confluence_header_file: assets/header.tpl
confluence_include_search: True
confluence_lang_overrides: {'dockerfile': 'Bash', 'makefile': 'Bash', 'shell': 'Bash', 'diff': 'Diff', 'yaml': 'YAML'}
confluence_page_hierarchy: True
confluence_parent_page: (set)
confluence_prev_next_buttons_location: top
confluence_publish: True
confluence_publish_debug: True
confluence_publish_dryrun: False
confluence_publish_prefix: ********
confluence_publish_token: (set)
confluence_server_url: https://(removed)
confluence_space_key: (set; upper)
(confluence instance)
connected: no
@cisco-sbg-mgiassa-ai, thanks for the update.
Is there a reason why confluence_api_token
and confluence_publish_token
is set? In theory, a user should only need to use just confluence_publish_token
(data center/server, i.e. on-prem) or confluence_api_token
with confluence_server_user
(Cloud).
@jdknight I'm not explicitly setting confluence_api_token
. Maybe it's implicitly set, but that keyword is nowhere to be found in my config file.
Intersting... hmm... by chance is the CONFLUENCE_API_TOKEN
environment option set?
@jdknight I was just about to test that (yes, it's set). I didn't realize these config.py
variables also mapped to env vars.
Fun corner case.
I see room for improvements here:
Thanks for the (patient) help, by the way.
Thanks for the (patient) help, by the way.
Any time. Thanks for the report. It's great to have user feedback to try to improve things for all.
+1 for the above-noted features (as time permits).
On a side note, it's worth noting I've used this tool at 3 companies so far, and it's been a godsend. Some ansible/J2 templating of the doc repo (and some Mermaid/PlantUML files), and we have an entire dynamically-generated wiki that can be replicated to HTML (GitHub Pages), PDF, and Confluence. Zero vendor lock-in, and the resulting docs look great (and can be auto-republished via a CI job to prevent drift/edits). The textbook definition of "documentation as code" 😄
Working now. Thanks again!
edit: it was indeed due to the env var triggering both API and publish token to be set.
Good day,
I have a Confluence-builder project that's been churning away daily for a couple years now. I recently upgraded to v7.1.2 of Sphinx (latest confluence-builder), and cannot authenticate anymore via
confluence_publish_token
(using a PAT):This was never an issue before. An extended error message indicates:
However, when I do that, a new error arises:
So, chicken-and-egg problem that entirely prevents (at least in this case) PAT-based authentication.