Nova has a system for managing multiple APIs on different subdomains. Currently there is support for the OpenStack API, as well as the Amazon EC2 API.
Starting point for routing EC2 requests.
Bases: nova.wsgi.Middleware
Authorize an EC2 API request.
Return a 401 if ec2.controller and ec2.action in WSGI environ may not be executed in nova.context.
Bases: nova.wsgi.Middleware
Authenticate an EC2 request with keystone and convert to context.
Bases: nova.wsgi.Application
Execute an EC2 API request.
Executes ‘ec2.action’ upon ‘ec2.controller’, passing ‘nova.context’ and ‘ec2.action_args’ (all variables in WSGI environ.) Returns an XML response, or a 400 upon failure.
Bases: nova.wsgi.Middleware
Calls the middleware stack, captures any exceptions into faults.
Bases: nova.wsgi.Middleware
Lockout for x minutes on y failed auths in a z minute period.
x = lockout_timeout flag y = lockout_window flag z = lockout_attempts flag
Uses memcached if lockout_memcached_servers flag is set, otherwise it uses a very simple in-process cache. Due to the simplicity of the implementation, the timeout window is started with the first failed request, so it will block if there are x failed logins within that period.
There is a possible race condition where simultaneous requests could sneak in before the lockout hits, but this is extremely rare and would only result in a couple of extra failed attempts.
Bases: nova.wsgi.Middleware
Add user:project as ‘nova.context’ to WSGI environ.
Bases: nova.wsgi.Middleware
Access-Log akin logging for all EC2 API requests.
Bases: nova.wsgi.Middleware
Bases: nova.wsgi.Middleware
Helper to send an ec2_compatible error
APIRequest class
Bases: object