mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-25 07:15:57 +03:00
[PR #31] [MERGED] Add Multi-Method Authentication Support (OIDC, Forward Auth, Local) #105
Labels
No labels
bug
documentation
enhancement
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gitea-mirror#105
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/RayLabsHQ/gitea-mirror/pull/31
Author: @arunavo4
Created: 6/24/2025
Status: ✅ Merged
Merged: 6/24/2025
Merged by: @arunavo4
Base:
main← Head:oidc-experiment📝 Commits (7)
6f9b524feat(auth): Implement multi-method authentication with JWT, OIDC, and forward auth7e0dcdffeat(auth): Add comprehensive authentication guide and implement JWKS utilities for JWT validation3f2d15efeat(auth): Add OIDC and Forward Authentication configurations to docker-compose files0b665d0Add comprehensive documentation for Gitea Mirrora95619ffeat(auth): implement dynamic OIDC configuration and setupa19c83btest(auth): enhance forward authentication tests with async validationb819e1ffeat(auth): introduce UI-based authentication configuration and migration guide📊 Changes
54 files changed (+6675 additions, -1502 deletions)
View changed files
📝
.env.example(+77 -36)➕
.env.local(+50 -0)📝
CHANGELOG.md(+22 -0)➕
CONTRIBUTING.md(+360 -0)➕
OIDC_TESTING_GUIDE.md(+313 -0)📝
README.md(+70 -550)➖
data/README.md(+0 -32)➕
docker-compose.forward-auth.yml(+61 -0)➕
docker-compose.oidc.yml(+60 -0)📝
docker-compose.yml(+22 -0)➕
docs/DEVELOPER_GUIDE.md(+408 -0)➖
docs/GRACEFUL_SHUTDOWN.md(+0 -249)➕
docs/README.md(+58 -0)➖
docs/RECOVERY_IMPROVEMENTS.md(+0 -170)➖
docs/SHUTDOWN_PROCESS.md(+0 -236)➕
docs/SYSTEM_INTERNALS.md(+582 -0)➕
docs/USER_GUIDE.md(+314 -0)➕
docs/auth-migration-guide.md(+109 -0)➕
docs/authentication-guide.md(+367 -0)➖
docs/testing.md(+0 -127)...and 34 more files
📄 Description
Closes #29
Summary
This PR implements a comprehensive authentication system for Gitea Mirror, adding support for enterprise SSO while maintaining the simplicity of local authentication. Users can now choose between three authentication methods based on their infrastructure needs.
Major Features
🔐 Three Authentication Methods
Local Authentication (default)
OIDC/SSO Authentication
Forward Authentication
🛡️ Security Enhancements
📚 Documentation Overhaul
🔧 Technical Improvements
Breaking Changes
None. Existing installations will continue working with local authentication by default.
Configuration
Basic OIDC Setup
Forward Auth Setup
Testing
Comprehensive test suite added:
Migration Guide
/docs/authentication-guide.mdfor detailed setupFiles Changed
Core Implementation
/src/lib/auth/- Complete auth system implementation/src/lib/db/migrations.ts- Database migration system/src/pages/api/auth/- New auth endpoints/src/middleware.ts- Auth enforcement middlewareDocumentation
/docs/authentication-guide.md- Complete auth setup guide/docs/USER_GUIDE.md- User installation guide/docs/DEVELOPER_GUIDE.md- Developer documentation/docs/SYSTEM_INTERNALS.md- Architecture deep dive/README.md- Simplified and focusedConfiguration
/docker-compose.yml- Added auth environment variables/docker-compose.oidc.yml- OIDC-specific compose file/docker-compose.forward-auth.yml- Forward auth compose file/.env.example- Complete with all auth optionsChecklist
Screenshots
Not applicable - backend authentication changes.
Additional Notes
This implementation was security-reviewed and includes fixes for:
All authentication methods have been tested with real providers (Authentik, Keycloak, Google).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.