1. 24 Sep, 2013 2 commits
  2. 16 Sep, 2013 1 commit
  3. 12 Sep, 2013 1 commit
    • Giorgos Korfiatis's avatar
      common: Strip trailing slash from endpoints · 31d98e59
      Giorgos Korfiatis authored
      Remove trailing slash from the endpoints' publicURL field in service
      definitions. These values end up in the response of POST /tokens, and,
      according to the keystone API, should not end in slash. A trailing slash
      breaks some clients, which do no proper checking before appending a
      suffix.
      
      Note that these URLs are not meant to act as a base path in the strict
      semantics of http://tools.ietf.org/html/rfc3986#section-5.2.3 . Suffixes
      should be merged into by a simple append (modulo catering for the joining
      slash).
      
      URLs are still configured as groups per prefix ending in a slash, eg:
      '^account/' and '^ui/'. Permanent redirects are added for all non-API
      endpoints (ui, helpdesk, admin, etc), so that `BASE_PATH/path' leads to
      `BASE_PATH/path/'.
      31d98e59
  4. 28 Jun, 2013 2 commits
  5. 25 Jun, 2013 1 commit
  6. 19 Jun, 2013 1 commit
  7. 18 Jun, 2013 1 commit
  8. 13 Jun, 2013 1 commit
  9. 12 Jun, 2013 1 commit
  10. 10 Jun, 2013 2 commits
  11. 06 Jun, 2013 2 commits
  12. 03 Jun, 2013 3 commits
    • Georgios D. Tsoukalas's avatar
      ae38e9f6
    • Georgios D. Tsoukalas's avatar
    • Georgios D. Tsoukalas's avatar
      make synnefo URLs consistent and configurable · 79f2ca3b
      Georgios D. Tsoukalas authored
      https://service.deployment.vendor.tld/service-base/api-prefix/hard/path
      |___________________________________| |__________| |________| |_______|
                   BASE_HOST                  BASE_PATH    PREFIX    Hardcoded
      |_________________________________________________|
                   SERVICE_BASE_URL
      
      - Introduce <SERVICE>_BASE_URL setting, and <API>_PREFIX constants
        for all services. Extract BASE_HOST, BASE_PATH from the setting.
      
      - Use settings and constants to construct top-level patterns
        (base-path/api-prefix) in services' urls.py
      
      - Refactor/extend proxy() to be compatible with the above.
      
      - Change URLs passed around (ui, e-mails) to be compatible.
        (needs more work)
      
      Notes:
      
      This configuration REQUIRES that any rewriting and proxying on the
      front-end must eventually result in the application server (gunicorn)
      getting the original path of the request, otherwise the view-generated
      URLs will be different.
      
      Changes:
      - set top-level urlpatterns from <SERVICE>_BASE_URL
      - rename setting: APP_INSTALL_URL to CYCLADES_BASE_URL
      - rename setting: ASTAKOS_URL to ASTAKOS_BASE_URL everywhere
      - introduce setting: PITHOS_BASE_URL
      - update shipped .confs, quick install admin guide, upgrade guide
      - fix urls/views/reverse()/other that were broken
      - (more not listed)
      79f2ca3b
  13. 31 May, 2013 1 commit
  14. 28 May, 2013 3 commits
  15. 24 May, 2013 1 commit
  16. 20 May, 2013 3 commits
  17. 16 May, 2013 1 commit
    • Sofia Papagiannaki's avatar
      astakos: api calls authenticated via X-Auth-Token shall not affect cookie · d350c42a
      Sofia Papagiannaki authored
      CookieAuthenticationMiddleware.process_request() synchronizes
      the astakos cookie with the request user.
      If an astakos cookie is set but there is no logged in user,
      the middleware deletes the cookie.
      Respectively, if there is a logged in user but the astakos cookie
      is not set, the middleware setis the cookie.
      In order to set/delete the cookie, redirects to the request path.
      
      For checking whether the user is logged in or not,
      utilized the django.contrib.auth.models.User.is_authenticated() method.
      This returns always True for django.contrib.auth.models.User instances
      (request.user for non authenticated requests is
       django.contrib.auth.models.AnonymousUser instance)
      
      Some astakos api calls are decorated by
      astakos.api.utils.user_for_token()
      which checks the X-Auth-Token request header and if its valid
      sets the request.user to the respective AstakosUser instance.
      
      Therefore, the above check succeeded for these calls
      and the middleware used to set the cookie.
      Subsequent requests read the cookie and
      if it did not comform with the request.user
      (no authentication info supplied)
      redirected to request path for deleting it.
      
      In order to resolve this undesired behavior
      the cookie fix() method has been changed
      and if it is actually an api call request
      it returns immediately without affecting the cookie.
      d350c42a
  18. 15 May, 2013 2 commits
  19. 14 May, 2013 1 commit
  20. 30 Apr, 2013 3 commits
  21. 29 Apr, 2013 1 commit
  22. 19 Apr, 2013 5 commits
  23. 16 Apr, 2013 1 commit
    • Christos Stavrakakis's avatar
      Fix API decorator response Content-Type · 3b538afa
      Christos Stavrakakis authored
      Remove check for response Content-Type, since 'django.http.HttpResponse'
      has always a default Content-Type of 'text/html; charset=utf-8'. Views
      defining their response 'Content-Type' should set the
      'override_serialization' attribute of response to 'True'.
      3b538afa