2020-02-22 23:29:33 +00:00
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
|
|
const fs = require('fs');
|
|
|
|
const path = require('path');
|
|
|
|
|
2020-03-02 08:58:07 +00:00
|
|
|
const SSL_CERT_DIRECTORY = path.join(__dirname, './ssl/cert');
|
2020-02-22 01:32:12 +00:00
|
|
|
|
|
|
|
module.exports = {
|
2020-02-22 23:29:33 +00:00
|
|
|
port: 1812,
|
2020-02-22 01:32:12 +00:00
|
|
|
// radius secret
|
|
|
|
secret: 'testing123',
|
|
|
|
|
|
|
|
certificate: {
|
2020-02-22 23:29:33 +00:00
|
|
|
cert: fs.readFileSync(path.join(SSL_CERT_DIRECTORY, '/server.crt')),
|
2020-02-22 01:32:12 +00:00
|
|
|
key: [
|
|
|
|
{
|
2020-02-22 23:29:33 +00:00
|
|
|
pem: fs.readFileSync(path.join(SSL_CERT_DIRECTORY, '/server.key')),
|
2020-05-14 13:02:15 +00:00
|
|
|
passphrase: 'whatever2020',
|
|
|
|
},
|
|
|
|
],
|
2020-02-22 01:32:12 +00:00
|
|
|
},
|
|
|
|
|
2020-02-23 19:42:36 +00:00
|
|
|
// GoogleLDAPAuth (optimized for google auth)
|
|
|
|
authentication: 'GoogleLDAPAuth',
|
2020-02-22 01:32:12 +00:00
|
|
|
authenticationOptions: {
|
|
|
|
base: 'dc=hokify,dc=com',
|
2020-02-28 09:31:14 +00:00
|
|
|
// get your keys from http://admin.google.com/ -> Apps -> LDAP -> Client
|
|
|
|
tls: {
|
|
|
|
keyFile: 'ldap.gsuite.key',
|
2020-05-14 13:02:15 +00:00
|
|
|
certFile: 'ldap.gsuite.crt',
|
|
|
|
},
|
|
|
|
},
|
2020-02-23 19:42:36 +00:00
|
|
|
|
|
|
|
/** LDAP AUTH
|
|
|
|
authentication: 'LDAPAuth',
|
|
|
|
authenticationOptions: {
|
|
|
|
url: 'ldaps://ldap.google.com',
|
|
|
|
base: 'dc=hokify,dc=com',
|
2020-02-28 09:31:14 +00:00
|
|
|
tls: {
|
|
|
|
keyFile: 'ldap.gsuite.key',
|
|
|
|
certFile: 'ldap.gsuite.crt'
|
|
|
|
},
|
2020-02-23 19:42:36 +00:00
|
|
|
tlsOptions: {
|
|
|
|
servername: 'ldap.google.com'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2020-02-22 01:32:12 +00:00
|
|
|
|
2020-02-23 19:42:36 +00:00
|
|
|
/** IMAP AUTH
|
|
|
|
authentication: 'IMAPAuth',
|
|
|
|
authenticationOptions: {
|
|
|
|
host: 'imap.gmail.com',
|
|
|
|
port: 993,
|
|
|
|
useSecureTransport: true,
|
|
|
|
validHosts: ['hokify.com']
|
|
|
|
}
|
|
|
|
*/
|
2020-02-22 01:32:12 +00:00
|
|
|
|
2020-02-23 19:42:36 +00:00
|
|
|
/** SMTP AUTH
|
|
|
|
authentication: 'IMAPAuth',
|
|
|
|
authenticationOptions: {
|
|
|
|
host: 'smtp.gmail.com',
|
|
|
|
port: 465,
|
|
|
|
useSecureTransport: true,
|
|
|
|
validHosts: ['gmail.com']
|
2020-02-22 01:32:12 +00:00
|
|
|
}
|
2020-02-23 19:42:36 +00:00
|
|
|
*/
|
2020-02-22 01:32:12 +00:00
|
|
|
};
|