2019-11-02 14:32:58 +00:00
|
|
|
package suites
|
|
|
|
|
2020-05-27 11:55:44 +00:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
2021-12-01 12:11:29 +00:00
|
|
|
|
|
|
|
"github.com/authelia/authelia/v4/internal/configuration/schema"
|
2020-05-27 11:55:44 +00:00
|
|
|
)
|
2019-11-02 14:32:58 +00:00
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// BaseDomain the base domain.
|
2023-01-12 10:57:44 +00:00
|
|
|
var (
|
|
|
|
BaseDomain = "example.com:8080"
|
|
|
|
Example2DotCom = "example2.com:8080"
|
|
|
|
Example3DotCom = "example3.com:8080"
|
|
|
|
)
|
2019-11-02 14:32:58 +00:00
|
|
|
|
2020-05-27 11:55:44 +00:00
|
|
|
// PathPrefix the prefix/url_base of the login portal.
|
|
|
|
var PathPrefix = os.Getenv("PathPrefix")
|
|
|
|
|
2023-01-12 10:57:44 +00:00
|
|
|
// LoginBaseURLFmt the base URL of the login portal for specified baseDomain.
|
|
|
|
func LoginBaseURLFmt(baseDomain string) string {
|
|
|
|
if baseDomain == "" {
|
|
|
|
baseDomain = BaseDomain
|
|
|
|
}
|
|
|
|
|
|
|
|
return fmt.Sprintf("https://login.%s", baseDomain)
|
|
|
|
}
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// LoginBaseURL the base URL of the login portal.
|
2023-01-12 10:57:44 +00:00
|
|
|
var LoginBaseURL = LoginBaseURLFmt(BaseDomain)
|
|
|
|
|
|
|
|
// SingleFactorBaseURLFmt the base URL of the singlefactor with custom domain.
|
|
|
|
func SingleFactorBaseURLFmt(baseDomain string) string {
|
|
|
|
if baseDomain == "" {
|
|
|
|
baseDomain = BaseDomain
|
|
|
|
}
|
|
|
|
|
|
|
|
return fmt.Sprintf("https://singlefactor.%s", baseDomain)
|
|
|
|
}
|
2019-11-02 14:32:58 +00:00
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// SingleFactorBaseURL the base URL of the singlefactor domain.
|
2023-01-12 10:57:44 +00:00
|
|
|
var SingleFactorBaseURL = SingleFactorBaseURLFmt(BaseDomain)
|
2019-11-02 14:32:58 +00:00
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// AdminBaseURL the base URL of the admin domain.
|
2019-11-02 14:32:58 +00:00
|
|
|
var AdminBaseURL = fmt.Sprintf("https://admin.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// MailBaseURL the base URL of the mail domain.
|
2019-11-02 14:32:58 +00:00
|
|
|
var MailBaseURL = fmt.Sprintf("https://mail.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// HomeBaseURL the base URL of the home domain.
|
2019-11-24 20:27:59 +00:00
|
|
|
var HomeBaseURL = fmt.Sprintf("https://home.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// PublicBaseURL the base URL of the public domain.
|
2019-11-24 20:27:59 +00:00
|
|
|
var PublicBaseURL = fmt.Sprintf("https://public.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// SecureBaseURL the base URL of the secure domain.
|
2019-11-24 20:27:59 +00:00
|
|
|
var SecureBaseURL = fmt.Sprintf("https://secure.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// DevBaseURL the base URL of the dev domain.
|
2019-11-24 20:27:59 +00:00
|
|
|
var DevBaseURL = fmt.Sprintf("https://dev.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// MX1MailBaseURL the base URL of the mx1.mail domain.
|
2019-11-24 20:27:59 +00:00
|
|
|
var MX1MailBaseURL = fmt.Sprintf("https://mx1.mail.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// MX2MailBaseURL the base URL of the mx2.mail domain.
|
2019-11-24 20:27:59 +00:00
|
|
|
var MX2MailBaseURL = fmt.Sprintf("https://mx2.mail.%s", BaseDomain)
|
|
|
|
|
2021-05-04 22:06:05 +00:00
|
|
|
// OIDCBaseURL the base URL of the oidc domain.
|
|
|
|
var OIDCBaseURL = fmt.Sprintf("https://oidc.%s", BaseDomain)
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// DuoBaseURL the base URL of the Duo configuration API.
|
2019-11-24 20:27:59 +00:00
|
|
|
var DuoBaseURL = "https://duo.example.com"
|
|
|
|
|
2020-05-02 05:06:39 +00:00
|
|
|
// AutheliaBaseURL the base URL of Authelia service.
|
2020-03-03 07:18:25 +00:00
|
|
|
var AutheliaBaseURL = "https://authelia.example.com:9091"
|
2020-05-02 16:20:40 +00:00
|
|
|
|
2021-12-01 03:32:58 +00:00
|
|
|
const (
|
|
|
|
t = "true"
|
|
|
|
testUsername = "john"
|
|
|
|
testPassword = "password"
|
|
|
|
)
|
2021-12-01 12:11:29 +00:00
|
|
|
|
2022-12-12 23:15:32 +00:00
|
|
|
const (
|
|
|
|
namespaceAuthelia = "authelia"
|
|
|
|
namespaceDashboard = "kubernetes-dashboard"
|
|
|
|
namespaceKube = "kube-system"
|
|
|
|
)
|
|
|
|
|
2021-12-01 12:11:29 +00:00
|
|
|
var (
|
|
|
|
storageLocalTmpConfig = schema.Configuration{
|
2022-03-03 11:20:43 +00:00
|
|
|
TOTP: schema.TOTPConfiguration{
|
2021-12-01 12:11:29 +00:00
|
|
|
Issuer: "Authelia",
|
|
|
|
Period: 6,
|
|
|
|
},
|
|
|
|
Storage: schema.StorageConfiguration{
|
|
|
|
EncryptionKey: "a_not_so_secure_encryption_key",
|
|
|
|
Local: &schema.LocalStorageConfiguration{
|
|
|
|
Path: "/tmp/db.sqlite3",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|