Commit graph example-remote-server/auth-server
Author SHA1 Message Date
Basil Hosmer
67def732ff
Fix token audience validation in separate auth mode
The auth server's /introspect endpoint now correctly sets the 'aud' field
to the resource server URL (BASE_URI) instead of the client ID. This ensures
proper audience validation when the MCP server verifies tokens in separate mode.

- Import BASE_URI in auth server
- Set aud to BASE_URI in introspection response
- Fixes "Token was not issued for this resource server" error

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 13:30:55 -04:00
Basil Hosmer
b32d638c87
Consolidate TypeScript build configuration
Use single tsconfig.json for both main server and auth-server to avoid
nested directory issues during build. Update e2e test scripts to run
directly instead of using concurrently.
2025-09-15 02:10:52 -04:00
Basil Hosmer
4e3414fe9c
Fix undefined staticFileRateLimit in auth server
- Add missing staticFileRateLimit definition in auth-server/index.ts
- Resolves compilation error in auth server build
- Addresses PR check failure about missing rate limiting on line 123
2025-09-12 00:44:29 -04:00
Basil Hosmer
ecd82f43c9
Add rate limiting to auth server static file endpoint
- Apply staticFileRateLimit to /mcp-logo.png route in auth server
- Addresses remaining check failure about missing rate limiting
- Matches rate limiting pattern used in main server
2025-09-12 00:36:21 -04:00
Basil Hosmer
890beed75a
Add rate limiting and improve e2e testing workflow
- Add express-rate-limit to custom endpoints for security:
  - /introspect: 100 requests per 5 minutes
  - /fakeupstreamauth/*: 20 requests per minute
  - Static files: 25 requests per 10 minutes
- Add automated e2e testing npm scripts using concurrently:
  - npm run test:e2e:integrated: Auto-starts server and runs test
  - npm run test:e2e:separate: Auto-starts both servers and runs test
- Update README with automated testing approach documentation
- Update docs/streamable-http-design.md with current file structure
- Remove redundancy in README e2e testing documentation
- Verified: All tests, linting, and e2e scripts pass with rate limiting
2025-09-12 00:27:07 -04:00
Basil Hosmer
9ffe376932
Fix endpoint consistency and documentation accuracy
- Remove /oauth prefix from introspect endpoint to match SDK pattern
- Fix auth-server endpoints: /introspect not /oauth/introspect
- Update external-verifier to call correct introspect endpoint
- Add 30-day expiry to client registration (REDIS_EXPIRY_TIMES.CLIENT_REGISTRATION)
- Remove inaccurate scratch/ directory references from README
- Add backlinks from auth-server/README.md to main README sections
- Verified all implementation details against running servers and Redis data
2025-09-11 21:08:29 -04:00
Basil Hosmer
d368c8d8c7
address comments:
* fix: add /mcp to endpoints in misc README.mds
* improve architecture interaction diagrams in README.md
* add "OAuth Flow Analysis" section in README.md
2025-09-11 17:37:52 -04:00
Basil Hosmer
5c408eb43d
Phase 4: Create standalone authorization server
- Created auth-server/index.ts with full OAuth endpoint support
- Reuses EverythingAuthProvider from main server
- Added custom /oauth/introspect endpoint for token validation
- Includes fake upstream auth routes for user authentication
- Added TypeScript configuration for auth server
- Added comprehensive npm scripts for all modes:
  - dev:integrated, dev:separate, dev:auth-server
  - dev:with-separate-auth (runs both servers)
  - build:auth-server, build:all
- Added concurrently dependency for running multiple servers
- Added detailed README for auth server
- Successfully serves OAuth metadata and health endpoints
2025-09-04 22:01:57 -04:00