summaryrefslogtreecommitdiff
path: root/provider_base/services/webapp.json
blob: 1af95022fab5b30acb1dd4a2a29bba253c61e40e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
  "webapp": {
    "admins": [],
    "domain": "= domain.full_suffix",
    "modules": ["user", "billing", "help"],
    "couchdb_webapp_user": {
      "username": "= global.services[:couchdb].couch.users[:webapp].username",
      "password": "= secret :couch_webapp_password",
      "salt": "= hex_secret :couch_webapp_password_salt, 128"
    },
    "customization_dir": "= file_path 'webapp'",
    "client_certificates": "= provider.ca.client_certificates",
    "allow_limited_certs": "= provider.service.allow_limited_bandwidth",
    "allow_unlimited_certs": "= provider.service.allow_unlimited_bandwidth",
    "allow_anonymous_certs": "= provider.service.allow_anonymous",
    "allow_registration": "= provider.service.allow_registration",
    "default_service_level": "= provider.service.default_service_level",
    "service_levels": "= provider.service.levels",
    "secret_token": "= secret :webapp_secret_token",
    "api_version": 1,
    "secure": false,
    "git": {
      "source": "https://leap.se/git/leap_web",
      "revision": "origin/master"
    },
    "client_version": "= provider.client_version",
    "nagios_test_user": {
      "username": "nagios_test",
      "password": "= secret :nagios_test_password"
    },
    "engines": [
      "support"
    ]
  },
  "stunnel": {
    "clients": {
      "couch_client": "= stunnel_client(nodes_like_me[:services => :couchdb], global.services[:couchdb].couch.port)"
    }
  },
  "haproxy": {
    "couch": {
      "listen_port": 4096,
      "servers": "= haproxy_servers(nodes_like_me[:services => :couchdb], stunnel.clients.couch_client, global.services[:couchdb].couch.port, 5984)"
    }
  },
  "definition_files": {
    "provider": "= file :provider_json_template",
    "eip_service": "= file [:eip_service_json_template, 'v'+webapp.api_version.to_s]",
    "soledad_service": "= file [:soledad_service_json_template, 'v'+webapp.api_version.to_s]",
    "smtp_service": "= file [:smtp_service_json_template, 'v'+webapp.api_version.to_s]"
  },
  "service_type": "public_service",
  "api": {
    "domain": "= 'api.' + webapp.domain",
    "port": 4430
  },
  "nickserver": {
    "domain": "= 'nicknym.' + domain.full_suffix",
    "couchdb_nickserver_user": {
      "username": "= global.services[:couchdb].couch.users[:nickserver].username",
      "password": "= secret :couch_nickserver_password",
      "salt": "= hex_secret :couch_nickserver_password_salt, 128"
    },
    "port": 6425
  },
  "dns": {
    "aliases": "= [domain.full, webapp.domain, api.domain, nickserver.domain]"
  },
  "x509": {
    "use": true,
    "use_commercial": true,
    "ca_cert": "= file :ca_cert, :missing => 'provider CA. Run `leap cert ca`'",
    "client_ca_cert": "= file :client_ca_cert, :missing => 'Certificate Authority. Run `leap cert ca`.'",
    "client_ca_key": "= file :client_ca_key, :missing => 'Certificate Authority. Run `leap cert ca`.'"
  }
}