oauth2-authorization-server
Verified Safeby musabbozkurt
Overview
An OAuth2 Authorization Server managing user authentication, user data, PostgreSQL to Oracle database migration/scripting, AI chat with various models, file storage, and Excel processing.
Installation
java -Dspring.ai.mcp.server.stdio=true -Dspring.main.web-application-type=none -Dlogging.pattern.console= -jar oauth2-authorization-server-0.0.1.jarEnvironment Variables
- SPRING_DATASOURCE_URL
- DB_USERNAME
- DB_PASSWORD
- DEEP_SEEK_API_KEY
- OPENAPI_TITLE
- OPENAPI_DESCRIPTION
- OPENAPI_VERSION
- OPENAPI_OAUTH_FLOW_TOKEN_URL
- environment-namespace
- MINIO_ENDPOINT
- MINIO_ACCESS_KEY
- MINIO_SECRET_KEY
- MINIO_BUCKET
- SPRING_LDAP_URL
- SPRING_LDAP_PASSWORD
- SPRING_LDAP_USER_DN
- SPRING_LDAP_USER_SEARCH_BASE
- SPRING_LDAP_USER_SEARCH_FILTER
- ZIPKIN_ENDPOINT
- OTLP_METRICS_EXPORT_URL
- OPENTELEMETRY_TRACING_EXPORT_OTLP_ENDPOINT
- OPENTELEMETRY_LOGGING_EXPORT_OTLP_ENDPOINT
Security Notes
The server employs robust Spring Security features including JWT authentication, custom authentication providers, and session management with Redis. XSS prevention is implemented via `XssRequestWrapper` and `XssSanitizerUtils`, and HTTP security headers (X-XSS-Protection, Content-Security-Policy) are configured. Sensitive configurations like database credentials, API keys, and LDAP settings are externalized through environment variables, with safe defaults for development. RSA keys for JWT are loaded or generated on startup and stored locally, which is generally secure if the `jwt.key.path` is adequately protected. No direct hardcoded production secrets or `eval`-like dangerous patterns were found. The `logout` endpoint's redirect behavior, while standard for Spring Security, relies on the `referer` header which should ideally be validated further, though XSS filters provide some mitigation.
Similar Servers
mcp-framework
This repository provides a framework for integrating and managing OAuth authentication within a server application, potentially involving HTTP streaming.
springai-mcp-gateway
An OAuth 2.1 secured Spring AI MCP gateway enabling ChatGPT Connectors to interact with local development tools via a streamable HTTP endpoint.
mcp-oauth2-proxy
This project acts as an OAuth2 proxy to secure web applications or services, handling authentication and authorization through an OAuth2 provider.
mcp-s-oauth
Universal OAuth middleware for MCP (Model Context Protocol) servers, enabling authentication with various OAuth providers.