Skip to content

[FEATURE] Add advanced API Atlassian Authentication #2

Description

@Alex1under

Is there an existing feature request or discussion for this?

  • I have searched the existing feature requests and discussions

Problem

Есть проблема при взаимодействия модуля confluence и облачного конфлюенса от Atlassian, например, при попытке загрузки контента, например на мой конфлюенс **https://mudgolem.atlassian.net/wiki/spaces/ ** возникает следующая ошибка:

Enterprise Response Model & Common Knowledge | Code version: 0.0.1; Data version: 0.0.1
[✓] ATT&CK mapping has been updated
Traceback (most recent call last):.
  File "/home/user/ERMACK-feature-nested_response_playbooks/./main.py", line 147, in <module>
    main()
  File "/home/user/ERMACK-feature-nested_response_playbooks/./main.py", line 97, in main
    renderer.render(args=args)
  File "/home/user/ERMACK-feature-nested_response_playbooks/ermack/render_knowledge_base.py", line 73, in render
    self.data_provider.load_structure()
  File "/home/user/ERMACK-feature-nested_response_playbooks/ermack/data_providers/confluence_provider.py", line 175, in load_structure
    page = self.confluence.get_page_by_title(space=self.space, title=page_name)
  File "/usr/local/lib/python3.9/dist-packages/atlassian/confluence.py", line 307, in get_page_by_title
    response = self.get(url, params=params)
  File "/usr/local/lib/python3.9/dist-packages/atlassian/rest_client.py", line 285, in get
    response = self.request(
  File "/usr/local/lib/python3.9/dist-packages/atlassian/rest_client.py", line 257, in request
    self.raise_for_status(response)
  File "/usr/local/lib/python3.9/dist-packages/atlassian/confluence.py", line 2988, in raise_for_status
    raise HTTPError(error_msg, response=response)
requests.exceptions.HTTPError: Request rejected because issuer is either not authorized or not authorized to impersonate

Связана она с механизмами аутентификации confluence и в случае облачных хранилищ возможны проблемы с аутентификацией. Обходным решением (то же самое я делал c ATC) может быть что-то наподобие:
https://community.atlassian.com/t5/Confluence-Cloud-discussions/Confluence-cloud-Rest-API-returns-401-Unauthorize-while-fetching/td-p/1213977.

Solution

Заполнение контента на облачный confluence без ошибок.

Improvements

No response

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions