mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-13 06:54:18 +00:00
perf: 支持连接开启ssl且自签证书的Redis/MongoDB (#2039)
* perf: 支持连接开启ssl且自签证书的Redis/MongoDB * 修改字段文案 * 修改字段名称 * 修改变量名
This commit is contained in:
parent
1fce7561db
commit
7ad86062b4
@ -267,6 +267,11 @@
|
|||||||
"IPLoginLimit": "IP login limit",
|
"IPLoginLimit": "IP login limit",
|
||||||
"Setting": "Setting",
|
"Setting": "Setting",
|
||||||
"Certificate": "Certificate",
|
"Certificate": "Certificate",
|
||||||
|
"CACertificate": "CA Certificate",
|
||||||
|
"ClientCertificate": "Client certificate",
|
||||||
|
"CertificateKey": "Certificate key file",
|
||||||
|
"AllowInvalidCert": "Allow invalid cert",
|
||||||
|
"UseSSL": "Use SSL/TLS",
|
||||||
"SecretKey": "Secret key",
|
"SecretKey": "Secret key",
|
||||||
"Scope": "Type",
|
"Scope": "Type",
|
||||||
"Builtin": "Builtin",
|
"Builtin": "Builtin",
|
||||||
|
@ -272,6 +272,11 @@
|
|||||||
"IPLoginLimit": "IPログイン制限",
|
"IPLoginLimit": "IPログイン制限",
|
||||||
"Setting": "設定",
|
"Setting": "設定",
|
||||||
"Certificate": "証明書",
|
"Certificate": "証明書",
|
||||||
|
"CACertificate": "CA 証明書",
|
||||||
|
"ClientCertificate": "クライアント証明書",
|
||||||
|
"CertificateKey": "証明書秘密鍵ファイル",
|
||||||
|
"AllowInvalidCert": "証明書チェックを無視する",
|
||||||
|
"UseSSL": "使う SSL/TLS",
|
||||||
"SecretKey": "鍵",
|
"SecretKey": "鍵",
|
||||||
"Scope": "カテゴリ",
|
"Scope": "カテゴリ",
|
||||||
"Builtin": "内蔵",
|
"Builtin": "内蔵",
|
||||||
|
@ -272,6 +272,11 @@
|
|||||||
"IPLoginLimit": "IP 登录限制",
|
"IPLoginLimit": "IP 登录限制",
|
||||||
"Setting": "设置",
|
"Setting": "设置",
|
||||||
"Certificate": "证书",
|
"Certificate": "证书",
|
||||||
|
"CACertificate": "CA 证书",
|
||||||
|
"ClientCertificate": "客户端证书",
|
||||||
|
"CertificateKey": "证书秘钥文件",
|
||||||
|
"AllowInvalidCert": "忽略证书检查",
|
||||||
|
"UseSSL": "使用 SSL/TLS",
|
||||||
"SecretKey": "密钥",
|
"SecretKey": "密钥",
|
||||||
"Scope": "类别",
|
"Scope": "类别",
|
||||||
"Builtin": "内置",
|
"Builtin": "内置",
|
||||||
|
@ -39,10 +39,25 @@ export default {
|
|||||||
type: 'input'
|
type: 'input'
|
||||||
},
|
},
|
||||||
use_ssl: {
|
use_ssl: {
|
||||||
|
label: this.$t('common.UseSSL'),
|
||||||
component: 'el-switch'
|
component: 'el-switch'
|
||||||
},
|
},
|
||||||
|
allow_invalid_cert: {
|
||||||
|
label: this.$t('common.AllowInvalidCert'),
|
||||||
|
hidden: (form) => { return !form.use_ssl }
|
||||||
|
},
|
||||||
ca_cert: {
|
ca_cert: {
|
||||||
label: this.$t('common.Certificate'),
|
label: this.$t('common.CACertificate'),
|
||||||
|
hidden: (form) => { return !form.use_ssl },
|
||||||
|
component: UploadKey
|
||||||
|
},
|
||||||
|
client_cert: {
|
||||||
|
label: this.$t('common.ClientCertificate'),
|
||||||
|
hidden: (form) => { return !form.use_ssl },
|
||||||
|
component: UploadKey
|
||||||
|
},
|
||||||
|
cert_key: {
|
||||||
|
label: this.$t('common.CertificateKey'),
|
||||||
hidden: (form) => { return !form.use_ssl },
|
hidden: (form) => { return !form.use_ssl },
|
||||||
component: UploadKey
|
component: UploadKey
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,14 @@ import { ORACLE, MONGODB, REDIS } from '../const'
|
|||||||
|
|
||||||
export function getDatabaseTypeFieldsMap(type) {
|
export function getDatabaseTypeFieldsMap(type) {
|
||||||
const baseParams = ['host', 'port', 'database']
|
const baseParams = ['host', 'port', 'database']
|
||||||
|
const tlsParams = ['use_ssl', 'allow_invalid_cert', 'ca_cert']
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ORACLE:
|
case ORACLE:
|
||||||
return baseParams.concat(['version'])
|
return baseParams.concat(['version'])
|
||||||
case MONGODB:
|
|
||||||
case REDIS:
|
case REDIS:
|
||||||
return baseParams.concat(['use_ssl', 'ca_cert'])
|
return baseParams.concat(tlsParams.concat(['client_cert', 'cert_key']))
|
||||||
|
case MONGODB:
|
||||||
|
return baseParams.concat(tlsParams.concat(['cert_key']))
|
||||||
default:
|
default:
|
||||||
return baseParams
|
return baseParams
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user