Skip to content
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

Investigate 401 error on public Confluence document when it contains a Database #1040

Closed
ali-hugo opened this issue Feb 5, 2024 · 7 comments
Assignees
Labels
community github-request Request for change to access level or settings in the openedx GitHub organization.

Comments

@ali-hugo
Copy link

ali-hugo commented Feb 5, 2024

Description:

When visiting a Confluence Database as an unauthenticated user, I see the following error message:

Image

Canvas Database error: Unable to fetch identity, authentication error

All users —authenticated or not— should be able to view Databases in Confluence. Here is a screenshot of what the database should look like:

Image

To reproduce:

  1. Log out of Confluence (or open an incognito browser tab)
  2. Visit this link
  3. See error

Note: Confluence Databases are currently in beta, so the error may be internal to Confluence. I tried to contact Support to find out if that was the case, but was told that a site admin would need to contact them.

@ali-hugo ali-hugo converted this from a draft issue Feb 5, 2024
@kdmccormick
Copy link
Member

Hey @ali-hugo , we'll look into this. Sorry for the slow response, did you pick "Axim Engineering Task" from the request board? We don't get notified when someone creates an issue that way. Choose any of the "Request" options next time, and it'll show up on our on-call board right away for us to triage.

@kdmccormick kdmccormick added the github-request Request for change to access level or settings in the openedx GitHub organization. label May 13, 2024
@kdmccormick
Copy link
Member

Ah, I think what happened is that you removed [GH Request] from the title. Regardless, this is on our board now, sorry for the delay 🙂

@ali-hugo
Copy link
Author

@kdmccormick Ah, ok - thanks for letting me know! Next time I'll be sure to leave [GH Request] in the title. 👍

@brian-smith-tcril brian-smith-tcril self-assigned this May 13, 2024
@brian-smith-tcril
Copy link

I was able to (mostly) reproduce this issue - the page loaded but looked like this for me
image

I saw a few 401 and 403 errors in the console, as well as a

collab-manager.ts:227 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'access')
    at cGe.getToken (collab-manager.ts:227:26)
    at async cGe.connect (collab-manager.ts:317:19)

error, which when clicking into the source brought me to

  private async getToken() {
    const bulkTokens = await (
      await fetch(`/wiki/rest/internal/1.0/canvas/session/bulk?ids=${this.contentId}`)
    ).json();

    const token = bulkTokens[0].data;

    const containerAri = ConfluenceSpaceAri.create({
      spaceId: this.spaceId,
      siteId: this.cloudId,
    });

    return {
      container: containerAri.toString(),
      board: this.databaseAri.toString(),
      accessToken: token.access.token, // THIS LINE: access is undefined
      mediaToken: token.media.token,
      mediaBaseUrl: token.media.baseUrl,
      mediaCollectionId: token.media.contentId,
    };
  }

I have opened a ticket with atlassian support with the details of my findings. I'll update this ticket when I hear back from them.

@ali-hugo
Copy link
Author

@brian-smith-tcril Thanks for looking into this. Holding thumbs Atlassian Support can help!

@brian-smith-tcril
Copy link

I heard back from Atlassian support. Unfortunately, it seems there isn't a way to allow anonymous access to databases yet.

Root cause analysis

ℹ️ Upon investigation, I discovered that during its beta period, the database functionality within Confluence does not support or work with several features, including Anonymous Access. This directly impacts the ability to view the database without being logged into a Confluence account. This limitation, among others such as Data Residency, Backup & Restore, Admin Key, Atlassian Analytics, Atlassian Data Lake, and Data Connectors, is noted on the Atlassian website.

I understand this may not be the resolution you were hoping for. Still, please rest assured that Atlassian has plans to support many of these features following the General Availability (GA) launch of the database functionality. While it may not provide immediate relief, it is encouraging to know that enhancements and broader support are on the horizon. You can find this information in the article below in the session What features won't be available for databases during beta?

Workaround

💡 In the meantime, if accessing the database is critical for your operations, you can consider using the guest feature. I know this will not meet your expectations 100%, but in some cases, it may help. You can manage some users who need this access by adding them to a guest group. You can see how it works in the articles below:

Feature request created

✔️ Also, after reviewing your request, I took the initiative to create a Feature Request for it 😉

@ali-hugo
Copy link
Author

@brian-smith-tcril Oh ok, that explains it. Thank you so much for investigating this for me 💐 .

It's not critical that non-authenticated users can view the database, so I'll just hold out until the beta period is over. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community github-request Request for change to access level or settings in the openedx GitHub organization.
Projects
Archived in project
Development

No branches or pull requests

3 participants