1 Server::Application.routes.draw do
4 # See http://guides.rubyonrails.org/routing.html
6 # OPTIONS requests are not allowed at routes that use cookies.
7 ['/auth/*a', '/login', '/logout'].each do |nono|
8 match nono, :to => 'user_sessions#cross_origin_forbidden', :via => 'OPTIONS'
10 # OPTIONS at discovery and API paths get an empty response with CORS headers.
11 match '/discovery/v1/*a', :to => 'static#empty', :via => 'OPTIONS'
12 match '/arvados/v1/*a', :to => 'static#empty', :via => 'OPTIONS'
16 resources :api_client_authorizations do
17 post 'create_system_auth', on: :collection
18 get 'current', on: :collection
20 resources :api_clients
21 resources :authorized_keys
22 resources :collections do
23 get 'provenance', on: :member
24 get 'used_by', on: :member
27 get 'contents', on: :collection
28 get 'contents', on: :member
32 resources :containers do
33 get 'auth', on: :member
34 post 'lock', on: :member
35 post 'unlock', on: :member
36 get 'current', on: :collection
38 resources :container_requests
40 get 'queue', on: :collection
41 get 'queue_size', on: :collection
42 post 'cancel', on: :member
43 post 'lock', on: :member
45 resources :keep_disks do
46 post 'ping', on: :collection
48 resources :keep_services do
49 get 'accessible', on: :collection
54 post 'ping', on: :member
56 resources :pipeline_instances
57 resources :pipeline_templates
59 resources :repositories do
60 get 'get_all_permissions', on: :collection
64 resources :user_agreements do
65 get 'signatures', on: :collection
66 post 'sign', on: :collection
69 get 'current', on: :collection
70 get 'system', on: :collection
71 post 'activate', on: :member
72 post 'setup', on: :collection
73 post 'unsetup', on: :member
75 resources :virtual_machines do
76 get 'logins', on: :member
77 get 'get_all_logins', on: :collection
79 get '/permissions/:uuid', :to => 'links#get_permissions'
83 if Rails.env == 'test'
84 post '/database/reset', to: 'database#reset'
88 match '/auth/:provider/callback', :to => 'user_sessions#create'
89 match '/auth/failure', :to => 'user_sessions#failure'
90 # not handled by omniauth provider -> 403 with no CORS headers.
91 get '/auth/*a', :to => 'user_sessions#cross_origin_forbidden'
94 match '/login', :to => 'user_sessions#login'
95 match '/logout', :to => 'user_sessions#logout'
97 match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#index'
99 match '/static/login_failure', :to => 'static#login_failure', :as => :login_failure
101 # Send unroutable requests to an arbitrary controller
102 # (ends up at ApplicationController#render_not_found)
103 match '*a', :to => 'static#render_not_found'
105 root :to => 'static#home'