Skip to content

MahmoudSayed96/apigee-freamwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Apigee Development Framework

A comprehensive framework for Google Apigee API development that provides commonly used policies, shared flows, and best practices for building robust API proxies.

🚀 Features

  • 🔒 Security Policies: CORS, OAuth2, API Key validation
  • 🚦 Traffic Management: Rate limiting, spike arrest
  • 🔄 Data Transformation: JSON/XML conversion
  • 📊 Monitoring: Response caching, comprehensive logging
  • ⚠️ Error Handling: Standardized error responses
  • 🔍 Logging: Audit logging with sensitive data masking
  • 📚 Documentation: Complete developer guides and examples
  • 🛠️ Tools: Deployment scripts and API proxy templates

📁 Framework Structure

framework/
├── policies/                 # Common policies
│   ├── security/            # Security-related policies
│   ├── traffic/             # Traffic management policies
│   ├── transformation/      # Data transformation policies
│   └── monitoring/          # Monitoring and analytics policies
├── shared-flows/            # Reusable shared flows
│   ├── logging/             # Logging and audit flows
│   ├── error-handling/      # Error handling flows
│   ├── authentication/      # Authentication flows
│   └── utilities/           # Utility flows
├── examples/                # Example API proxies
├── templates/               # API proxy templates
├── scripts/                 # Deployment and utility scripts
└── docs/                    # Documentation

🏃‍♂️ Quick Start

  1. Clone the framework

    git clone <repository-url>
    cd apigee-framework
  2. Deploy shared flows

    ./framework/scripts/deploy-framework.sh -o your-org -e prod -u username -p password
  3. Create a new API proxy

    ./framework/scripts/create-api-proxy.sh -n my-api -d "My API" -b /my-api -t https://api.example.com -r resource -o ./my-api
  4. Use in your API proxy

    <PreFlow name="PreFlow">
        <Request>
            <Step>
                <Name>security-cors-v1</Name>
                <Condition>request.verb == "OPTIONS"</Condition>
            </Step>
            <Step>
                <Name>authentication-oauth2-v1</Name>
            </Step>
            <Step>
                <Name>logging-audit-v1</Name>
            </Step>
        </Request>
    </PreFlow>

📖 Documentation

🔧 Components

Policies

  • Security: security-cors-v1, security-oauth2-v1, security-api-key-v1
  • Traffic: traffic-rate-limit-v1, traffic-spike-arrest-v1
  • Transformation: transformation-json-to-xml-v1, transformation-xml-to-json-v1
  • Monitoring: monitoring-response-cache-v1

Shared Flows

  • Logging: logging-audit-v1 - Comprehensive logging with sensitive data masking
  • Error Handling: error-handling-standard-v1 - Standardized error responses
  • Authentication: authentication-oauth2-v1 - OAuth2 authentication flow
  • Utilities: utilities-request-validation-v1 - Request validation utilities

🛡️ Security Features

  • Sensitive Data Masking: Automatically masks passwords, tokens, credit cards, SSNs, emails
  • OAuth2 Support: Complete OAuth2 token validation
  • CORS Handling: Configurable cross-origin resource sharing
  • API Key Validation: Secure API key management

📊 Logging & Monitoring

  • Comprehensive Logging: Request/response logging with structured format
  • Sensitive Data Protection: Automatic masking of sensitive information
  • External Integration: Send logs to external systems
  • Performance Monitoring: Response time tracking and caching

🎯 Best Practices

  • Consistent naming conventions
  • Standardized error handling
  • Comprehensive logging
  • Security-first approach
  • Performance optimization
  • Documentation-driven development

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests and documentation
  5. Submit a pull request

📞 Support

For questions and support:


Built with ❤️ for the Apigee community

About

This framework for building google apigee Api development popular and most used polices and shared flows

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors