Skip to content

Add cookie-based auth in publish proxy - #15692

Merged
88250 merged 5 commits into
siyuan-note:devfrom
Zuoqiu-Yingyi:fix/issue/15646
Aug 28, 2025
Merged

Add cookie-based auth in publish proxy#15692
88250 merged 5 commits into
siyuan-note:devfrom
Zuoqiu-Yingyi:fix/issue/15646

Conversation

@Zuoqiu-Yingyi

@Zuoqiu-Yingyi Zuoqiu-Yingyi commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

REF: #15646

Cookie name: publish-visitor-session-id
Cookie value: session ID (format: UUID)
Cookie Expires: Current Session

Passed local testing

A TODO comment was added to indicate future implementation of authentication using cookies in the PublishServiceTransport RoundTrip method.
Introduces session management using cookies for the publish reverse proxy server. Adds session ID generation, storage, and validation in kernel/model/auth.go, and updates the proxy transport to check for valid sessions before falling back to basic authentication. Sets a session cookie upon successful basic auth login.
@Zuoqiu-Yingyi
Zuoqiu-Yingyi marked this pull request as ready for review August 27, 2025 16:11
@Zuoqiu-Yingyi

Copy link
Copy Markdown
Contributor Author

@88250 可以合并了~

@88250 88250 added this to the 3.3.1 milestone Aug 28, 2025
@88250
88250 merged commit ff4d215 into siyuan-note:dev Aug 28, 2025
@88250

88250 commented Aug 28, 2025

Copy link
Copy Markdown
Member

感谢你的贡献,思源有你更精彩!
Thank you for your contribution. SiYuan will be more wonderful with you!

@Zuoqiu-Yingyi
Zuoqiu-Yingyi deleted the fix/issue/15646 branch August 28, 2025 09:59
boyiwan pushed a commit to boyiwan/siyuan that referenced this pull request Sep 10, 2025
* chore(publish-auth): Add TODO for cookie-based auth in publish proxy

A TODO comment was added to indicate future implementation of authentication using cookies in the PublishServiceTransport RoundTrip method.

* 🎨 Add session-based authentication for publish proxy

Introduces session management using cookies for the publish reverse proxy server. Adds session ID generation, storage, and validation in kernel/model/auth.go, and updates the proxy transport to check for valid sessions before falling back to basic authentication. Sets a session cookie upon successful basic auth login.

* 🐛 Fixed the issue of repeatedly setting cookies

* 🎨 Dynamically remove invalid session IDs

* ♻️ Revert changes in pnpm-lock.yaml
leolee9086 pushed a commit to leolee9086/siyuan that referenced this pull request Oct 25, 2025
* chore(publish-auth): Add TODO for cookie-based auth in publish proxy

A TODO comment was added to indicate future implementation of authentication using cookies in the PublishServiceTransport RoundTrip method.

* 🎨 Add session-based authentication for publish proxy

Introduces session management using cookies for the publish reverse proxy server. Adds session ID generation, storage, and validation in kernel/model/auth.go, and updates the proxy transport to check for valid sessions before falling back to basic authentication. Sets a session cookie upon successful basic auth login.

* 🐛 Fixed the issue of repeatedly setting cookies

* 🎨 Dynamically remove invalid session IDs

* ♻️ Revert changes in pnpm-lock.yaml
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants