mirror of
https://github.com/open-webui/oikb.git
synced 2026-11-05 01:27:25 +00:00
[PR #120] [MERGED] fix(sharepoint): use SHA-1 thumbprint in the x5t assertion header #118
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/oikb#118
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/oikb/pull/120
Author: @a-nych
Created: 9/16/2026
Status: ✅ Merged
Merged: 9/16/2026
Merged by: @tjbck
Base:
main← Head:fix/sharepoint-cert-thumbprint-sha1📝 Commits (1)
9564dfffix(sharepoint): use SHA-1 thumbprint in the x5t assertion header📊 Changes
1 file changed (+5 additions, -3 deletions)
View changed files
📝
src/oikb/connectors/sharepoint.py(+5 -3)📄 Description
Certificate auth is currently unusable with any certificate signed with SHA-256, which in practice is every certificate people generate today.
_get_token_via_certificatebuilds the JWTx5theader from the certificate's signature hash algorithm:For a
sha256WithRSAEncryptioncertificate that yields a 32-byte digest. The Microsoft identity platform identifies the registered key by its SHA-1 thumbprint, regardless of how the certificate is signed (certificate credentials spec), so the token request is rejected:The thumbprint in that message is the SHA-256 digest, which never matches what Entra stored.
Verified against a live Entra app registration: same key, same certificate, same assertion, only the
x5tdigest swapped from SHA-256 to SHA-1 — 401 becomes an issued token, and a full SharePoint library sync then runs.x509.hashesin the old fallback also isn't a real attribute, so that branch would have raisedAttributeErrorhadsignature_hash_algorithmever beenNone. Both go away here.Note this is unrelated to certificate strength — SHA-1 is only the identifier Entra indexes keys by; the assertion itself is still signed RS256.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.