mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-22 16:07:11 +08:00
c3c3ed1fb8
* NM-254: add bulk delete apis for users, hosts, nodes and optimise postgres connection settings * NM-254: rm debug logs * NM-254: add bulk delete apis, remove old acl code * NM-254: rm unused flag * NM-254: fix bulk delete bugs, add security and performance improvements - Fix host delete notifying peers before confirming deletion from DB - Fix self-delete vulnerability in bulk user delete - Fix DissasociateNodeFromHost failing when host.Nodes is empty - Fix AssociateNodeToHost/DissasociateNodeFromHost stale read race - Hoist GetAllExtClients outside loop in bulk user delete/status - Move initializeUUID outside master-pod guard for HA correctness * NM-254: return 202 Accepted for async bulk APIs, fix relay allowedIPs and host association error handling - Change all bulk endpoints (hosts, nodes, users, ext clients) from 200 OK to 202 Accepted to correctly signal async processing - Add ReturnAcceptedResponse helper in logic/errors.go - Fix GetAllowedIpsForRelayed returning empty allowedIPs slice, restoring relay connectivity - Make AssociateNodeToHost and DissasociateNodeFromHost return an error when the host DB re-fetch fails instead of silently using stale data - Add bulk-apis.md documenting all five bulk endpoints * NM-254: rm coredns container * NM-254: add bulk apis for node,extclient status, add activity logs to bulk apis * NM-254: add bulk api for connection toggle * NM-254: add network check * Update controllers/hosts.go Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com> * NM-254: optimise bulk extclient deletion --------- Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>
64 lines
2.9 KiB
Go
64 lines
2.9 KiB
Go
package models
|
|
|
|
type Theme string
|
|
|
|
const (
|
|
Dark Theme = "dark"
|
|
Light Theme = "light"
|
|
System Theme = "system"
|
|
)
|
|
|
|
type ServerSettings struct {
|
|
NetclientAutoUpdate bool `json:"netclientautoupdate"`
|
|
Verbosity int32 `json:"verbosity"`
|
|
AuthProvider string `json:"authprovider"`
|
|
OIDCIssuer string `json:"oidcissuer"`
|
|
ClientID string `json:"client_id"`
|
|
ClientSecret string `json:"client_secret"`
|
|
SyncEnabled bool `json:"sync_enabled"`
|
|
GoogleAdminEmail string `json:"google_admin_email"`
|
|
GoogleSACredsJson string `json:"google_sa_creds_json"`
|
|
AzureTenant string `json:"azure_tenant"`
|
|
OktaOrgURL string `json:"okta_org_url"`
|
|
OktaAPIToken string `json:"okta_api_token"`
|
|
UserFilters []string `json:"user_filters"`
|
|
GroupFilters []string `json:"group_filters"`
|
|
IDPSyncInterval string `json:"idp_sync_interval"`
|
|
Telemetry string `json:"telemetry"`
|
|
BasicAuth bool `json:"basic_auth"`
|
|
// JwtValidityDuration is the validity duration of auth tokens for users
|
|
// on the dashboard (NMUI).
|
|
JwtValidityDuration int `json:"jwt_validity_duration"`
|
|
// JwtValidityDurationClients is the validity duration of auth tokens for
|
|
// users on the clients (NetDesk).
|
|
JwtValidityDurationClients int `json:"jwt_validity_duration_clients"`
|
|
MFAEnforced bool `json:"mfa_enforced"`
|
|
RacRestrictToSingleNetwork bool `json:"rac_restrict_to_single_network"`
|
|
EndpointDetection bool `json:"endpoint_detection"`
|
|
AllowedEmailDomains string `json:"allowed_email_domains"`
|
|
EmailSenderAddr string `json:"email_sender_addr"`
|
|
EmailSenderUser string `json:"email_sender_user"`
|
|
EmailSenderPassword string `json:"email_sender_password"`
|
|
SmtpHost string `json:"smtp_host"`
|
|
SmtpPort int `json:"smtp_port"`
|
|
MetricInterval string `json:"metric_interval"`
|
|
MetricsPort int `json:"metrics_port"`
|
|
// IPDetectionInterval is the interval (in seconds) at which devices check for changes in public ip.
|
|
IPDetectionInterval int `json:"ip_detection_interval"`
|
|
ManageDNS bool `json:"manage_dns"`
|
|
DefaultDomain string `json:"default_domain"`
|
|
Stun bool `json:"stun"`
|
|
StunServers string `json:"stun_servers"`
|
|
AuditLogsRetentionPeriodInDays int `json:"audit_logs_retention_period"`
|
|
PeerConnectionCheckInterval string `json:"peer_connection_check_interval"`
|
|
PostureCheckInterval string `json:"posture_check_interval"` // in minutes
|
|
CleanUpInterval int `json:"clean_up_interval_in_mins"`
|
|
EnableFlowLogs bool `json:"enable_flow_logs"`
|
|
}
|
|
|
|
type UserSettings struct {
|
|
Theme Theme `json:"theme"`
|
|
TextSize string `json:"text_size"`
|
|
ReducedMotion bool `json:"reduced_motion"`
|
|
}
|