8000 fix(iiif): refuse password sign-in on the access page when passwords are off by adeelahmad · Pull Request #158 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(iiif): refuse password sign-in on the access page when passwords are off - #158

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-qt650x-iiif-passwords
Oct 5, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-qt650x-iiif-passwords

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: with password sign-in turned off (auth.passwords), the IIIF access page at /iiif/auth/access still showed a password form, and submitting it signed the person in and set the IIIF cookie.

After: with passwords off, the page explains that it can't sign anyone in yet and shows no form. A submitted password answers 403 and sets no cookie. Installs with passwords on behave as before.

Motivation and Context

This came from the threat model's surface pass (api/iiif.py, POST handler). docs/authentication.md says that with passwords off, password sign-in answers 403. The /api/v1/auth/login route did that, but the IIIF form called auth.login directly and skipped the check. Passkey sign-in on this page is not built, so third-party viewers on such installs play only open material. docs/iiif.md now says so.

Steps to reproduce (if appropriate):

test_access_form_refuses_passwords_when_they_are_off failed on main with 200 (signed in) instead of 403, and passes with this change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ


Generated by Claude Code

…are off

The IIIF access service signed people in with a password even with
auth.passwords off. It now shows no password form there, and a submitted
one answers 403, as the rest of the API does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ
@adeelahmad adeelahmad self-assigned this Oct 5, 2026
Copy link
Copy Markdown
Owner Author

Local CI: green. The self-hosted runner is down, so I replayed every PR job from .github/workflows (ci.yml, pre-commit.yml, pr-title.yml) with ci/local-ci.sh --pr 158 (#181). It tests the head merged into the latest main, which is what GitHub's pull_request event tests.

Local CI on PR #158 head 516fad2 merged into main f69d6af, 2026-10-05 07:56 UTC

Job Result Time
FastAPI (embedded SurrealDB) pass 390s
FastAPI (SurrealDB server) pass 253s
Next.js pass 187s
pre-commit pass 70s
PR title pass 0s

Generated by Claude Code

@adeelahmad
adeelahmad merged commit cc6b603 into main Oct 5, 2026
7 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-qt650x-iiif-passwords branch October 5, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0