fix(setup): TLS-Prüfungs-Checkbox aus Cluster-Join-GUI entfernt
Sicherheit des Joins kommt vom HMAC-Token, nicht von TLS-Cert-Trust. Insecure=true wird jetzt immer im Handler gesetzt — GUI-Nutzer müssen das nicht kennen oder konfigurieren. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@ import (
|
|||||||
usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users"
|
usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "1.1.150"
|
var version = "1.1.151"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
addr := os.Getenv("EDGEGUARD_API_ADDR")
|
addr := os.Getenv("EDGEGUARD_API_ADDR")
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"git.netcell-it.de/projekte/edgeguard-native/internal/services/setup"
|
"git.netcell-it.de/projekte/edgeguard-native/internal/services/setup"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "1.1.150"
|
var version = "1.1.151"
|
||||||
|
|
||||||
const usage = `edgeguard-ctl — EdgeGuard CLI
|
const usage = `edgeguard-ctl — EdgeGuard CLI
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import (
|
|||||||
"git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts"
|
"git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "1.1.150"
|
var version = "1.1.151"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// renewTickInterval — how often we re-evaluate expiring certs.
|
// renewTickInterval — how often we re-evaluate expiring certs.
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ func (h *SetupHandler) JoinCluster(c *gin.Context) {
|
|||||||
ACMEEmail string `json:"acme_email" binding:"required,email"`
|
ACMEEmail string `json:"acme_email" binding:"required,email"`
|
||||||
PrimaryFQDN string `json:"primary_fqdn" binding:"required"`
|
PrimaryFQDN string `json:"primary_fqdn" binding:"required"`
|
||||||
Token string `json:"token" binding:"required"`
|
Token string `json:"token" binding:"required"`
|
||||||
Insecure bool `json:"insecure"`
|
|
||||||
}
|
}
|
||||||
if err := c.ShouldBindJSON(&body); err != nil {
|
if err := c.ShouldBindJSON(&body); err != nil {
|
||||||
response.BadRequest(c, err)
|
response.BadRequest(c, err)
|
||||||
@@ -164,7 +163,7 @@ func (h *SetupHandler) JoinCluster(c *gin.Context) {
|
|||||||
PrimaryFQDN: body.PrimaryFQDN,
|
PrimaryFQDN: body.PrimaryFQDN,
|
||||||
Token: strings.TrimSpace(body.Token),
|
Token: strings.TrimSpace(body.Token),
|
||||||
CommonName: fqdn,
|
CommonName: fqdn,
|
||||||
Insecure: body.Insecure,
|
Insecure: true, // security comes from the HMAC token, not TLS cert trust
|
||||||
Force: true, // bootstrap self-signed cert must be replaced
|
Force: true, // bootstrap self-signed cert must be replaced
|
||||||
Version: h.Version,
|
Version: h.Version,
|
||||||
NodeID: h.NodeID,
|
NodeID: h.NodeID,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Alert, Button, Card, Checkbox, Form, Input, Space, Typography, message } from 'antd'
|
import { Alert, Button, Card, Form, Input, Space, Typography, message } from 'antd'
|
||||||
import { ArrowLeftOutlined, CheckCircleOutlined, ClusterOutlined, DesktopOutlined } from '@ant-design/icons'
|
import { ArrowLeftOutlined, CheckCircleOutlined, ClusterOutlined, DesktopOutlined } from '@ant-design/icons'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@@ -24,7 +24,6 @@ interface JoinValues {
|
|||||||
acme_email: string
|
acme_email: string
|
||||||
primary_fqdn: string
|
primary_fqdn: string
|
||||||
token: string
|
token: string
|
||||||
insecure?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const FQDN_RE = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/
|
const FQDN_RE = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/
|
||||||
@@ -78,7 +77,6 @@ export default function SetupPage({ onComplete: _onComplete }: Props) {
|
|||||||
acme_email: vals.acme_email.trim().toLowerCase(),
|
acme_email: vals.acme_email.trim().toLowerCase(),
|
||||||
primary_fqdn: vals.primary_fqdn.trim().toLowerCase(),
|
primary_fqdn: vals.primary_fqdn.trim().toLowerCase(),
|
||||||
token: vals.token.trim(),
|
token: vals.token.trim(),
|
||||||
insecure: vals.insecure ?? false,
|
|
||||||
})
|
})
|
||||||
setJoinDone(true)
|
setJoinDone(true)
|
||||||
} catch (e: unknown) {
|
} catch (e: unknown) {
|
||||||
@@ -281,10 +279,6 @@ export default function SetupPage({ onComplete: _onComplete }: Props) {
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item name="insecure" valuePropName="checked">
|
|
||||||
<Checkbox>{t('setup.joinInsecure')}</Checkbox>
|
|
||||||
</Form.Item>
|
|
||||||
|
|
||||||
<Form.Item style={{ marginBottom: 0 }}>
|
<Form.Item style={{ marginBottom: 0 }}>
|
||||||
<Button type="primary" htmlType="submit" block loading={loading}>
|
<Button type="primary" htmlType="submit" block loading={loading}>
|
||||||
{t('setup.nodeSubmit')}
|
{t('setup.nodeSubmit')}
|
||||||
|
|||||||
Reference in New Issue
Block a user