Skip to content

Latest commit

 

History

History
1 lines (1 loc) · 6.15 KB

File metadata and controls

1 lines (1 loc) · 6.15 KB

Quick Start Guide\n\nGet the Rust Security Platform running in under 30 seconds with our pre-configured demo environment.\n\n## Platform Architecture Overview\n\n\n ┌────────────────────┐\n │ Your Applications │\n └─────────┬──────────┘\n │\n ┌─────────▼──────────┐\n │ Auth Service:8080 │\n │ Authentication │\n │ OAuth 2.0 │\n └─────────┬──────────┘\n │\n ┌─────────▼──────────┐\n │ Policy Service:8081│\n │ Authorization │\n │ Policy Engine │\n └─────────┬──────────┘\n │\n ┌───────────────────┼───────────────────┐\n │ │ │\n┌─────────▼──────────┐ ┌──────▼──────┐ ┌──────────▼─────────┐\n│ Redis Cache │ │ PostgreSQL │ │ Security Dashboard │\n│ Session Storage │ │ User Data │ │ Monitoring:8082 │\n└────────────────────┘ └─────────────┘ └────────────────────┘\n\n\n## Prerequisites Check\n\nVerify you have the required tools installed:\n\nbash\n# Verify requirements (takes 10 seconds)\ncargo --version # Should be 1.80+\ndocker --version # Should be 20.0+\nredis-cli ping # Should return PONG (or start Redis)\n\n\n## Lightning-Fast Startup\n\nClone and start the platform in under 30 seconds:\n\nbash\n# Clone and start (20 seconds total)\ngit clone https://github.com/company/rust-security.git\ncd rust-security\n\n# One-command startup (fast development mode)\n./start-services-dev.sh --demo\n\n# Alternative: Production build (slower but optimized)\n./start-services.sh --demo\n\n\n💡 Tip: Use start-services-dev.sh for faster startup with debug builds, or start-services.sh for optimized release builds.\n\n🎉 Done! Your platform is running at:\n- Auth Service: http://localhost:8080\n- Policy Service: http://localhost:8081 \n- Security Dashboard: http://localhost:8082\n\n## Instant API Testing\n\n### Get Your First Token (10 seconds)\n\nbash\n# Register demo user and get access token\ncurl -X POST http://localhost:8080/api/v1/auth/register \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"email\": \"demo@example.com\",\n \"password\": \"demo123\",\n \"name\": \"Demo User\"\n }'\n\n# Login and get access token\ncurl -X POST http://localhost:8080/api/v1/auth/login \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"email\": \"demo@example.com\", \n \"password\": \"demo123\"\n }' | jq '.access_token'\n\n\n### Test OAuth 2.0 Flow (30 seconds)\n\nbash\n# Start OAuth authorization\nopen \"http://localhost:8080/oauth/authorize?response_type=code&client_id=demo-client&redirect_uri=http://localhost:3000/callback&scope=read+write&state=abc123\"\n\n# After login, exchange code for token\ncurl -X POST http://localhost:8080/oauth/token \\\n -H \"Content-Type: application/x-www-form-urlencoded\" \\\n -d \"grant_type=authorization_code&code=YOUR_AUTH_CODE&client_id=demo-client&client_secret=demo-secret&redirect_uri=http://localhost:3000/callback\"\n\n\n### Validate Tokens & Permissions\n\nbash\n# Check user profile\ncurl -X GET http://localhost:8080/api/v1/auth/me \\\n -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\"\n\n\n### Test Policy Authorization (15 seconds)\n\nbash\n# Test policy service authorization\ncurl -X POST http://localhost:8081/v1/authorize \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"request_id\": \"test-123\",\n \"principal\": {\"type\": \"User\", \"id\": \"demo-user\"},\n \"action\": \"Document::read\",\n \"resource\": {\"type\": \"Document\", \"id\": \"doc-1\"},\n \"context\": {}\n }'\n\n# Check policy service health\ncurl http://localhost:8081/health\n\n# Check policy service metrics\ncurl http://localhost:8081/metrics\n\n\n## Next Steps\n\nNow that you have the platform running:\n\n1. Explore APIs: Check out the API Reference for detailed endpoint documentation\n2. Learn Core Concepts: Read the Architecture Overview to understand system components\n3. Secure Your Setup: Follow the Security Best Practices\n4. Deploy to Production: Use the Deployment Guide for production deployment\n\n## Troubleshooting\n\n### Common Issues & Solutions\n\n#### Service Won't Start\nbash\n# Check port availability\nnetstat -tlnp | grep :8080\n\n# Verify configuration\ncargo run --bin auth-service -- --validate-config\n\n# Check dependencies\nredis-cli ping\npg_isready -h localhost -p 5432\n\n\n#### Authentication Failures\nbash\n# Check JWT configuration\ncurl http://localhost:8080/.well-known/jwks.json\n\n# Validate token\ncurl -X POST http://localhost:8080/oauth/introspect \\\n -H \"Content-Type: application/x-www-form-urlencoded\" \\\n -d \"token=YOUR_TOKEN\"\n\n\n### Get Help\n\n- Documentation: https://docs.rust-security-platform.com\n- GitHub Issues: https://github.com/company/rust-security/issues \n- Community Slack: https://rust-security.slack.com\n- Security Contact: security@company.com\n\n🎉 Congratulations! You now have a fully functional Rust Security Platform with OAuth 2.0, policy-based authorization, and enterprise security features. \n\nStart building secure applications with confidence!\n