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

If a node doesn't respond because authentication failed, I should get a more specific error message in the UI #338

Open
3 tasks
surchs opened this issue Oct 31, 2024 · 1 comment
Labels
_flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again

Comments

@surchs
Copy link
Contributor

surchs commented Oct 31, 2024

Right now, if I do the following:

  • log in via query tool to my f-API successfully
  • launch a query that includes a n-API with auth enabled

If then the n-API does not like my identity token (or does not receive one from the f-API due to obscure bugs like neurobagel/federation-api#131), the n-API will respond to the f-API with a failure code.

From the perspective of the query tool, the response from the f-API will look like os:

Case of a single node-API that fails because of auth

{
    "errors": [
        {
            "node_name": "Local graph 1",
            "error": "Forbidden: {\"detail\":\"Not authenticated\"}"
        }
    ],
    "responses": [],
    "nodes_response_status": "fail"
}

Case of a multi-node query where one node fails because of auth

{
    "errors": [
        {
            "node_name": "Local graph 1",
            "error": "Forbidden: {\"detail\":\"Not authenticated\"}"
        }
    ],
    "responses": [
        {
            "node_name": "Quebec Parkinson Network",
            "dataset_uuid": "http://neurobagel.org/vocab/b9d3674d-432e-4f17-bcdc-e562df166aae",
            "dataset_name": "Quebec Parkinson Network",
            "dataset_portal_uri": "https://rpq-qpn.ca/en/home/",
            "dataset_total_subjects": 303,
            "records_protected": true,
            "num_matching_subjects": 303,
            "subject_data": "protected",
            "image_modals": [
                "http://purl.org/nidash/nidm#T1Weighted",
                "http://purl.org/nidash/nidm#DiffusionWeighted",
                "http://purl.org/nidash/nidm#FlowWeighted"
            ],
            "available_pipelines": {}
        }
    ],
    "nodes_response_status": "partial success"
}

In such a case I want that

  • the query tool tells me something like "node XYZ rejected authentication"
  • the query tool tells me that with some error-colored notistack popup that includes the node name(s)
  • If I get no results back at all (i.e. all nodes fail because they refuse to authenticate), my results area also says "all nodes refused authentication" or similar, rather than the more generic "all nodes failed to respond"
Copy link

We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 75 days.
We have applied the _flag:stale label to indicate that this issue should be reviewed again.
When you review, please reread the spec and then apply one of these three options:

  • prioritize: apply the flag:schedule label to suggest moving this issue into the backlog now
  • close: if the issue is no longer relevant, explain why (give others a chance to reply) and then close.
  • archive: sometimes an issue has important information or ideas but we won't work on it soon. In this case
    apply the someday label to show that this won't be prioritized. The stalebot will ignore issues with this
    label in the future. Use sparingly!

@github-actions github-actions bot added the _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again
Projects
None yet
Development

No branches or pull requests

1 participant