application.conf.j2 4.43 KB
Newer Older
Bozidar Proevski's avatar
Bozidar Proevski committed
1
2
3
4
5
6
7
###
## Documentation is available at https://github.com/TheHive-Project/TheHiveDocs/TheHive4
###

## Include Play secret key
# More information on secret key at https://www.playframework.com/documentation/2.8.x/ApplicationSecret
#include "/etc/thehive/secret.conf"
Arne Øslebø's avatar
Arne Øslebø committed
8
play.http.secret.key="{{lookup('password', '{{playbook_dir}}/secrets/tokens/thehive_secret_key')}}"
Bozidar Proevski's avatar
Bozidar Proevski committed
9
10
11
12
13
14
15

## Database configuration
db.janusgraph {
  storage {
    ## Cassandra configuration
    # More information at https://docs.janusgraph.org/basics/configuration-reference/#storagecql
    backend: cql
Arne Øslebø's avatar
Arne Øslebø committed
16
    hostname: ["{{groups['cassandra'][0]}}.{{soctools_netname}}:9042"]
Bozidar Proevski's avatar
Bozidar Proevski committed
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
    # Cassandra authentication (if configured)
    // username: "thehive"
    // password: "password"
    cql {
      cluster-name: thp
      keyspace: thehive
    }
  }

  ## For test only !
  # Comment Cassandra settings before enable Berkeley database
  // storage.backend: berkeleyje
  // storage.directory: /path/to/berkeleydb
  // berkeleyje.freeDisk: 200 # disk usage threshold
}

## Attachment storage configuration
storage {
  ## Local filesystem
  provider: localfs
  localfs.directory: /opt/thp_data/files/thehive

  ## Hadoop filesystem (HDFS)
  // provider: hdfs
  // hdfs {
  //   root: "hdfs://localhost:10000" # namenode server hostname
  //   location: "/thehive"           # location inside HDFS
  //   username: thehive              # file owner
  // }
}

## Authentication configuration
# More information at https://github.com/TheHive-Project/TheHiveDocs/TheHive4/Administration/Authentication.md
Arne Øslebø's avatar
Arne Øslebø committed
50
51
auth {
  providers: [
Bozidar Proevski's avatar
Bozidar Proevski committed
52
53
54
55
//    {name: session}               # required !
//    {name: basic, realm: thehive}
//    {name: local}
//    {name: key}
Arne Øslebø's avatar
Arne Øslebø committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
    {name: session}               # required !
    {name: basic, realm: thehive}
    {name: local}
    {name: key}    
    {
      name: oauth2
      clientId: "soctools-thehive"
      clientSecret: {{thehivesecret.value}}
      redirectUri: "https://{{soctoolsproxy}}:9000/api/ssoLogin"
      responseType: "code"
      grantType: "authorization_code"
      authorizationUrl: "https://{{soctoolsproxy}}:12443/auth/realms/{{openid_realm}}/protocol/openid-connect/auth"
      authorizationHeader: "Bearer"
      tokenUrl: "https://{{soctoolsproxy}}:12443/auth/realms/{{openid_realm}}/protocol/openid-connect/token"
      userUrl: "https://{{soctoolsproxy}}:12443/auth/realms/{{openid_realm}}/protocol/openid-connect/userinfo"
//      scope: ["openid", "email"]
      scope: ["openid"]
      userIdField: "email"
//      userIdField: "name"
    }
  ]
  sso {
    autocreate: true
    autoupdate: true
    autologin: true
    mapper: "simple"
//    attributes {
//     login: "login"
//      name: "name"
//      roles: "role"
//    }
    defaultRoles: ["read", "write", "admin"]
    defaultOrganization: "uninett.no"
//    defaultOrganization: "demo"
  } 
  ws.ssl.trustManager {
    stores = [
      {
        type: "JKS" // JKS or PEM
        path: "cacerts.jks"
        password: "{{lookup('password', '{{playbook_dir}}/secrets/passwords/truststore')}}"
      }
    ]
  }
Bozidar Proevski's avatar
Bozidar Proevski committed
100
101
# The format of logins must be valid email address format. If the provided login doesn't contain `@` the following
# domain is automatically appended
Arne Øslebø's avatar
Arne Øslebø committed
102
103
104
  defaultUserDomain: "uninett.no"
#  defaultUserDomain: "thehive.local"
}
Bozidar Proevski's avatar
Bozidar Proevski committed
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144

## CORTEX configuration
# More information at https://github.com/TheHive-Project/TheHiveDocs/TheHive4/Administration/Connectors.md
# Enable Cortex connector
// play.modules.enabled += org.thp.thehive.connector.cortex.CortexModule
// cortex {
//  servers: [
//    {
//      name: "local"                # Cortex name
//      url: "http://localhost:9001" # URL of Cortex instance
//      auth {
//        type: "bearer"
//        key: "***"                 # Cortex API key
//      }
//      ws {}                        # HTTP client configuration (SSL and proxy)
//    }
//  ]
// }

## MISP configuration
# More information at https://github.com/TheHive-Project/TheHiveDocs/TheHive4/Administration/Connectors.md
# Enable MISP connector
// play.modules.enabled += org.thp.thehive.connector.mips.MispModule
// misp {
//  interval: 1 hour
//  servers: [
//    {
//      name = "local"            # MISP name
//      url = "http://localhost/" # URL or MISP
//      auth {
//        type = key
//        key = "***"             # MISP API key
//      }
//      ws {}                        # HTTP client configuration (SSL and proxy)
//    }
//  ]
//}

# Define maximum size of attachments (default 10MB)
//play.http.parser.maxDiskBuffer: 1GB