-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
web_config.go
77 lines (68 loc) · 1.57 KB
/
web_config.go
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
77
package config
import (
"net"
"net/url"
"time"
"github.com/gin-contrib/sessions"
commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"
)
type TLS interface {
Dir() string
Host() string
ForceRedirect() bool
CertFile() string
KeyFile() string
HTTPSPort() uint16
ListenIP() net.IP
}
type RateLimit interface {
Authenticated() int64
AuthenticatedPeriod() time.Duration
Unauthenticated() int64
UnauthenticatedPeriod() time.Duration
}
type MFA interface {
RPID() string
RPOrigin() string
}
type LDAP interface {
ServerAddress() string
ReadOnlyUserLogin() string
ReadOnlyUserPass() string
ServerTLS() bool
SessionTimeout() commonconfig.Duration
QueryTimeout() time.Duration
BaseUserAttr() string
BaseDN() string
UsersDN() string
GroupsDN() string
ActiveAttribute() string
ActiveAttributeAllowedValue() string
AdminUserGroupCN() string
EditUserGroupCN() string
RunUserGroupCN() string
ReadUserGroupCN() string
UserApiTokenEnabled() bool
UserAPITokenDuration() commonconfig.Duration
UpstreamSyncInterval() commonconfig.Duration
UpstreamSyncRateLimit() commonconfig.Duration
}
type WebServer interface {
AuthenticationMethod() string
AllowOrigins() string
BridgeCacheTTL() time.Duration
BridgeResponseURL() *url.URL
HTTPMaxSize() int64
StartTimeout() time.Duration
HTTPWriteTimeout() time.Duration
HTTPPort() uint16
SessionReaperExpiration() commonconfig.Duration
SecureCookies() bool
SessionOptions() sessions.Options
SessionTimeout() commonconfig.Duration
ListenIP() net.IP
TLS() TLS
RateLimit() RateLimit
MFA() MFA
LDAP() LDAP
}