GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [python] Show why the server refused a credential. by blp · Pull Request #7858 · feldera/feldera

Conversation

@blp

@blp blp commented Nov 5, 2026

Copy link
Copy Markdown
Member

Linked Issue

Related to #7048. This does not fix it.

On a 401, the pipeline manager gives the reason in the error_description of its WWW-Authenticate header, and the body is empty. The client error read only the body, so it said "credential rejected (invalid or expired token / API key)" for every refusal.

In the two most recent reports in #7048 (runs 39514151001 and 41968241434), the token refresher log shows a refresh every 90 seconds with no misses. So the server refused tokens that had not expired. The client logs cannot show why.

The 401 error message now has a Reason: line with that description. On the next failure, the CI log will show which check refused the token.

Describe Manual Test Plan

New unit tests in python/tests/unit/test_401_reason.py. The escaped-quote test fails when errors.py is reverted. All of tests/unit passes.

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

  • OpenAPI / REST HTTP API / feldera-types / manager (What is a breaking change?)
  • Feldera SQL (Syntax, Semantics)
  • feldera-sqllib (incl. dependencies fxp, etc.) (What is a breaking change?)
  • Python SDK (What is a breaking change?)
  • fda (CLI arguments)
  • Adapters (including configuration)
  • Storage Format / Checkpoints
  • Others (specify)

Describe Incompatible Changes

None. Only the text of 401 error messages changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mythical-fred-oss

mythical-fred-oss Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

LGTM.

Ran: uv run --locked pytest tests/unit (424 passed) and pre-commit run on the changed files (ruff and ruff-format passed). I also tried a few extra WWW-Authenticate headers by hand: a challenge with several params (realm, error, error_description), an escaped backslash, an unquoted value (returns None) and an unterminated quote (returns None). All behave as expected. No gates fail.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blp blp mentioned this pull request Nov 5, 2026
Convert the last CRLF files to LF. #7859
Merged
12 tasks
@blp blp added python Pull requests that update python code python-sdk Issues related to the feldera python sdk authentication Everything related to OIDC, AWS Cognito, auth0, tenants, issuers etc. CI/CD QA Testing and quality assurance labels Nov 5, 2026
@blp blp self-assigned this Nov 5, 2026
mihaibudiu
mihaibudiu approved these changes Nov 5, 2026
View reviewed changes
@blp
blp added this pull request to the merge queue Nov 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 5, 2026
@blp
[python] Show why the server refused a credential.
4571416
On a 401, the pipeline manager gives the reason in the
`error_description` of its `WWW-Authenticate` header, and the body is
empty. The client error read only the body, so it said "credential
rejected (invalid or expired token / API key)" for every refusal. In
could not show why.

The 401 error message now has a `Reason:` line with that description.

Signed-off-by: Ben Pfaff <[email protected]>
@blp
blp force-pushed the python-401-reason branch from 63dda0e to 4571416 Compare November 5, 2026 22:23
@blp
blp added this pull request to the merge queue Nov 5, 2026
@gz

gz commented Nov 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

It may help to also query /healthz in this case to find out more, I believe if the database is unreachable it could also result in a 401

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Merged via the queue into main with commit 7d1607e Nov 6, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@blp
blp deleted the python-401-reason branch November 6, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mihaibudiu mihaibudiu mihaibudiu approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@blp blp

Labels

authentication Everything related to OIDC, AWS Cognito, auth0, tenants, issuers etc. CI/CD python Pull requests that update python code python-sdk Issues related to the feldera python sdk QA Testing and quality assurance

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@blp @gz @mihaibudiu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.