Skip to content

Commit bf0d912

Browse files
authored
Merge branch 'main' into GEA-978
2 parents 9fd7830 + 904063f commit bf0d912

42 files changed

Lines changed: 3821 additions & 1709 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

public/locales/gsa-de.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@
618618
"Do you really want to remove the Dashboard {{name}} and its configuration?": "Möchten Sie das Dashboard {{name}} und seine Einstellungen wirklich löschen?",
619619
"Documentation": "Dokumentation",
620620
"Done": "Abgeschlossen",
621-
"Download CA Certificate": "CA-Zertifikat herunterladen",
622621
"Download Certificate": "Zertifikat herunterladen",
623622
"Download CSV": "CSV-Daten herunterladen",
624623
"Download Debian (.deb) Package": "Debian-Paket (.deb) herunterladen",
@@ -1356,7 +1355,8 @@
13561355
"Partial": "Partiell",
13571356
"Partition": "Partition",
13581357
"Passive": "Passiv",
1359-
"Passphrase": "Passphrase",
1358+
"Passphrase for Private Client Certificate": "Passphrase für privates Client-Zertifikat",
1359+
"Passphrase for Private SSH Key": "Passphrase für privaten SSH-Schlüssel",
13601360
"Password": "Passwort",
13611361
"Password only": "Nur Passwort",
13621362
"Password: Use existing Password": "Passwort: Verwende bestehendes Passwort",
@@ -1383,6 +1383,7 @@
13831383
"Permissions ({{count}})": "Berechtigungen ({{count}})",
13841384
"Permissions Filter": "Berechtigungen-Filter",
13851385
"Permissions to create a ticket are insufficient. You need the create_permission and get_users permissions.": "Die Berechtigungen ein Ticket zu erstellen sind unzureichend. Sie benötigen die create_permission- und get_users-Berechtigungen.",
1386+
"Permissions to verify Scanner denied": "Keine Berechtigung, um den Scanner zu verifizieren",
13861387
"PGP Encryption Key": "PGP-Verschlüsselungsschlüssel",
13871388
"Physical": "Physisch",
13881389
"PKCS12 Credential": "PKCS12-Anmeldedaten",
@@ -1427,14 +1428,16 @@
14271428
"Previous completed report of the same task": "Vorheriger abgeschlossener Bericht der selben Aufgabe",
14281429
"Privacy Algorithm": "Privacy-Algorithmus",
14291430
"Privacy Password": "Privacy-Passwort",
1430-
"Private Key": "Privater Schlüssel",
1431+
"Private Client Certificate": "Privates Client-Zertifikat",
1432+
"Private SSH Key": "Privater SSH-Schlüssel",
14311433
"Privileges Required": "Benötigte Berechtigungen",
14321434
"Processing": "Verarbeiten",
14331435
"Product": "Produkt",
14341436
"Product Detection Result": "Ergebnis zur Produkterkennung",
14351437
"Protocol": "Protokoll",
14361438
"Provider Urgency": "Dringlichkeit des Anbieters",
1437-
"Public Key": "Öffentlicher Schlüssel",
1439+
"Public Client Certificate": "Öffentliches Client-Zertifikat",
1440+
"Public PGP Key": "Öffentlicher PGP-Schlüssel",
14381441
"Published": "Veröffentlicht",
14391442
"Published:": "Veröffentlicht:",
14401443
"QoD": "QdE",

public/locales/gsa-en.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@
618618
"Do you really want to remove the Dashboard {{name}} and its configuration?": "Do you really want to remove the Dashboard {{name}} and its configuration?",
619619
"Documentation": "Documentation",
620620
"Done": "Done",
621-
"Download CA Certificate": "Download CA Certificate",
622621
"Download Certificate": "Download Certificate",
623622
"Download CSV": "Download CSV",
624623
"Download Debian (.deb) Package": "Download Debian (.deb) Package",
@@ -1356,7 +1355,8 @@
13561355
"Partial": "Partial",
13571356
"Partition": "Partition",
13581357
"Passive": "Passive",
1359-
"Passphrase": "Passphrase",
1358+
"Passphrase for Private Client Certificate": "Passphrase for Private Client Certificate",
1359+
"Passphrase for Private SSH Key": "Passphrase for Private SSH Key",
13601360
"Password": "Password",
13611361
"Password only": "Password only",
13621362
"Password: Use existing Password": "Password: Use existing Password",
@@ -1383,6 +1383,7 @@
13831383
"Permissions ({{count}})": "Permissions ({{count}})",
13841384
"Permissions Filter": "Permissions Filter",
13851385
"Permissions to create a ticket are insufficient. You need the create_permission and get_users permissions.": "Permissions to create a ticket are insufficient. You need the create_permission and get_users permissions.",
1386+
"Permissions to verify Scanner denied": "Permissions to verify Scanner denied",
13861387
"PGP Encryption Key": "PGP Encryption Key",
13871388
"Physical": "Physical",
13881389
"PKCS12 Credential": "PKCS12 Credential",
@@ -1427,14 +1428,16 @@
14271428
"Previous completed report of the same task": "Previous completed report of the same task",
14281429
"Privacy Algorithm": "Privacy Algorithm",
14291430
"Privacy Password": "Privacy Password",
1430-
"Private Key": "Private Key",
1431+
"Private Client Certificate": "Private Client Certificate",
1432+
"Private SSH Key": "Private SSH Key",
14311433
"Privileges Required": "Privileges Required",
14321434
"Processing": "Processing",
14331435
"Product": "Product",
14341436
"Product Detection Result": "Product Detection Result",
14351437
"Protocol": "Protocol",
14361438
"Provider Urgency": "Provider Urgency",
1437-
"Public Key": "Public Key",
1439+
"Public Client Certificate": "Public Client Certificate",
1440+
"Public PGP Key": "Public PGP Key",
14381441
"Published": "Published",
14391442
"Published:": "Published:",
14401443
"QoD": "QoD",

public/locales/gsa-zh_CN.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@
618618
"Do you really want to remove the Dashboard {{name}} and its configuration?": "是否要删除仪表盘 {{name}} 及其配置?",
619619
"Documentation": "",
620620
"Done": "完成",
621-
"Download CA Certificate": "下载CA证书",
622621
"Download Certificate": "下载证书",
623622
"Download CSV": "下载CSV",
624623
"Download Debian (.deb) Package": "下载Debian包(.deb)",
@@ -1356,7 +1355,8 @@
13561355
"Partial": "部分",
13571356
"Partition": "分区",
13581357
"Passive": "",
1359-
"Passphrase": "口令",
1358+
"Passphrase for Private Client Certificate": "",
1359+
"Passphrase for Private SSH Key": "",
13601360
"Password": "密码",
13611361
"Password only": "仅密码",
13621362
"Password: Use existing Password": "密码: 使用现有密码",
@@ -1383,6 +1383,7 @@
13831383
"Permissions ({{count}})": "",
13841384
"Permissions Filter": "权限筛选",
13851385
"Permissions to create a ticket are insufficient. You need the create_permission and get_users permissions.": "创建工单的权限不足.您需要create_permission和get_users权限.",
1386+
"Permissions to verify Scanner denied": "",
13861387
"PGP Encryption Key": "PGP加密密钥",
13871388
"Physical": "物理",
13881389
"PKCS12 Credential": "PKCS12 证书",
@@ -1427,14 +1428,16 @@
14271428
"Previous completed report of the same task": "同一任务的上一次报告",
14281429
"Privacy Algorithm": "数据加密协议",
14291430
"Privacy Password": "数据加密密码",
1430-
"Private Key": "私钥",
1431+
"Private Client Certificate": "",
1432+
"Private SSH Key": "",
14311433
"Privileges Required": "需要权限",
14321434
"Processing": "",
14331435
"Product": "产品",
14341436
"Product Detection Result": "产品检测结果",
14351437
"Protocol": "协议",
14361438
"Provider Urgency": "",
1437-
"Public Key": "",
1439+
"Public Client Certificate": "",
1440+
"Public PGP Key": "",
14381441
"Published": "发布",
14391442
"Published:": "公布:",
14401443
"QoD": "QoD",

public/locales/gsa-zh_TW.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@
618618
"Do you really want to remove the Dashboard {{name}} and its configuration?": "",
619619
"Documentation": "",
620620
"Done": "",
621-
"Download CA Certificate": "下載 CA 憑證",
622621
"Download Certificate": "下載憑證",
623622
"Download CSV": "下載 CSV",
624623
"Download Debian (.deb) Package": "",
@@ -1356,7 +1355,8 @@
13561355
"Partial": "",
13571356
"Partition": "",
13581357
"Passive": "",
1359-
"Passphrase": "",
1358+
"Passphrase for Private Client Certificate": "",
1359+
"Passphrase for Private SSH Key": "",
13601360
"Password": "密碼",
13611361
"Password only": "",
13621362
"Password: Use existing Password": "",
@@ -1383,6 +1383,7 @@
13831383
"Permissions ({{count}})": "",
13841384
"Permissions Filter": "",
13851385
"Permissions to create a ticket are insufficient. You need the create_permission and get_users permissions.": "",
1386+
"Permissions to verify Scanner denied": "",
13861387
"PGP Encryption Key": "",
13871388
"Physical": "",
13881389
"PKCS12 Credential": "PKCS12 憑證",
@@ -1427,14 +1428,16 @@
14271428
"Previous completed report of the same task": "",
14281429
"Privacy Algorithm": "",
14291430
"Privacy Password": "",
1430-
"Private Key": "私鑰",
1431+
"Private Client Certificate": "",
1432+
"Private SSH Key": "",
14311433
"Privileges Required": "",
14321434
"Processing": "",
14331435
"Product": "產品",
14341436
"Product Detection Result": "",
14351437
"Protocol": "通訊協定",
14361438
"Provider Urgency": "",
1437-
"Public Key": "",
1439+
"Public Client Certificate": "",
1440+
"Public PGP Key": "",
14381441
"Published": "發佈日期",
14391442
"Published:": "發佈日期:",
14401443
"QoD": "",

src/gmp/commands/scanner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ScannerCommand extends EntityCommand<Scanner, ScannerElement> {
9595
}
9696

9797
verify({id}: ScannerCommandVerifyParams) {
98-
return this.httpPost({
98+
return this.action({
9999
cmd: 'verify_scanner',
100100
id,
101101
});

src/gmp/models/credential.ts

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {parseYesNo, NO_VALUE, parseDate, YesNo} from 'gmp/parser';
1010
import {map} from 'gmp/utils/array';
1111
import {isDefined} from 'gmp/utils/identity';
1212

13-
type CredentialType =
13+
export type CredentialType =
1414
| typeof CERTIFICATE_CREDENTIAL_TYPE
1515
| typeof KRB5_CREDENTIAL_TYPE
1616
| typeof PASSWORD_ONLY_CREDENTIAL_TYPE
@@ -20,12 +20,21 @@ type CredentialType =
2020
| typeof USERNAME_PASSWORD_CREDENTIAL_TYPE
2121
| typeof USERNAME_SSH_KEY_CREDENTIAL_TYPE;
2222

23-
type TimeStatus =
23+
export type CertificateStatus =
2424
| typeof CERTIFICATE_STATUS_EXPIRED
2525
| typeof CERTIFICATE_STATUS_INACTIVE
2626
| typeof CERTIFICATE_STATUS_VALID
2727
| typeof CERTIFICATE_STATUS_UNKNOWN;
2828

29+
export type SNMPAuthAlgorithmType =
30+
| typeof SNMP_AUTH_ALGORITHM_MD5
31+
| typeof SNMP_AUTH_ALGORITHM_SHA1;
32+
33+
export type SNMPPrivacyAlgorithmType =
34+
| typeof SNMP_PRIVACY_ALGORITHM_NONE
35+
| typeof SNMP_PRIVACY_ALGORITHM_AES
36+
| typeof SNMP_PRIVACY_ALGORITHM_DES;
37+
2938
interface CredentialElement extends ModelElement {
3039
certificate_info?: {
3140
activation_time?: string;
@@ -55,7 +64,7 @@ interface CredentialElement extends ModelElement {
5564
export interface CertificateInfo {
5665
activationTime?: Date;
5766
expirationTime?: Date;
58-
timeStatus?: TimeStatus;
67+
timeStatus?: CertificateStatus;
5968
issuer?: string;
6069
subject?: string;
6170
serial?: string;
@@ -83,62 +92,75 @@ export const PASSWORD_ONLY_CREDENTIAL_TYPE = 'pw';
8392
export const CERTIFICATE_CREDENTIAL_TYPE = 'cc';
8493
export const KRB5_CREDENTIAL_TYPE = 'krb5';
8594

86-
export const SSH_CREDENTIAL_TYPES = [
95+
export const SSH_CREDENTIAL_TYPES: readonly CredentialType[] = [
8796
USERNAME_PASSWORD_CREDENTIAL_TYPE,
8897
USERNAME_SSH_KEY_CREDENTIAL_TYPE,
8998
];
9099

91-
export const SSH_ELEVATE_CREDENTIAL_TYPES = [USERNAME_PASSWORD_CREDENTIAL_TYPE];
100+
export const SSH_ELEVATE_CREDENTIAL_TYPES: readonly CredentialType[] = [
101+
USERNAME_PASSWORD_CREDENTIAL_TYPE,
102+
];
92103

93-
export const SMB_CREDENTIAL_TYPES = [USERNAME_PASSWORD_CREDENTIAL_TYPE];
104+
export const SMB_CREDENTIAL_TYPES: readonly CredentialType[] = [
105+
USERNAME_PASSWORD_CREDENTIAL_TYPE,
106+
];
94107

95-
export const ESXI_CREDENTIAL_TYPES = [USERNAME_PASSWORD_CREDENTIAL_TYPE];
108+
export const ESXI_CREDENTIAL_TYPES: readonly CredentialType[] = [
109+
USERNAME_PASSWORD_CREDENTIAL_TYPE,
110+
];
96111

97-
export const SNMP_CREDENTIAL_TYPES = [SNMP_CREDENTIAL_TYPE];
112+
export const SNMP_CREDENTIAL_TYPES: readonly CredentialType[] = [
113+
SNMP_CREDENTIAL_TYPE,
114+
];
98115

99-
export const KRB5_CREDENTIAL_TYPES = [KRB5_CREDENTIAL_TYPE];
116+
export const KRB5_CREDENTIAL_TYPES: readonly CredentialType[] = [
117+
KRB5_CREDENTIAL_TYPE,
118+
];
100119

101-
export const EMAIL_CREDENTIAL_TYPES = [
120+
export const EMAIL_CREDENTIAL_TYPES: readonly CredentialType[] = [
102121
SMIME_CREDENTIAL_TYPE,
103122
PGP_CREDENTIAL_TYPE,
104123
];
105124

106-
export const VFIRE_CREDENTIAL_TYPES = [USERNAME_PASSWORD_CREDENTIAL_TYPE];
125+
export const VFIRE_CREDENTIAL_TYPES: readonly CredentialType[] = [
126+
USERNAME_PASSWORD_CREDENTIAL_TYPE,
127+
];
107128

108-
export const ALL_CREDENTIAL_TYPES = [
129+
export const ALL_CREDENTIAL_TYPES: readonly CredentialType[] = [
109130
USERNAME_PASSWORD_CREDENTIAL_TYPE,
110131
USERNAME_SSH_KEY_CREDENTIAL_TYPE,
111132
SNMP_CREDENTIAL_TYPE,
112133
SMIME_CREDENTIAL_TYPE,
113134
PGP_CREDENTIAL_TYPE,
114135
PASSWORD_ONLY_CREDENTIAL_TYPE,
136+
CERTIFICATE_CREDENTIAL_TYPE,
115137
KRB5_CREDENTIAL_TYPE,
116-
] as const;
138+
];
117139

118-
export const ssh_credential_filter = credential =>
140+
export const ssh_credential_filter = (credential: Credential) =>
119141
credential.credential_type === USERNAME_SSH_KEY_CREDENTIAL_TYPE ||
120142
credential.credential_type === USERNAME_PASSWORD_CREDENTIAL_TYPE;
121143

122-
export const smb_credential_filter = credential =>
144+
export const smb_credential_filter = (credential: Credential) =>
123145
credential.credential_type === USERNAME_PASSWORD_CREDENTIAL_TYPE;
124146

125-
export const esxi_credential_filter = credential =>
147+
export const esxi_credential_filter = (credential: Credential) =>
126148
credential.credential_type === USERNAME_PASSWORD_CREDENTIAL_TYPE;
127149

128-
export const snmp_credential_filter = credential =>
150+
export const snmp_credential_filter = (credential: Credential) =>
129151
credential.credential_type === SNMP_CREDENTIAL_TYPE;
130152

131-
export const krb5CredentialFilter = credential =>
153+
export const krb5CredentialFilter = (credential: Credential) =>
132154
credential.credential_type === KRB5_CREDENTIAL_TYPE;
133155

134-
export const email_credential_filter = credential =>
156+
export const email_credential_filter = (credential: Credential) =>
135157
credential.credential_type === SMIME_CREDENTIAL_TYPE ||
136158
credential.credential_type === PGP_CREDENTIAL_TYPE;
137159

138-
export const password_only_credential_filter = credential =>
160+
export const password_only_credential_filter = (credential: Credential) =>
139161
credential.credential_type === PASSWORD_ONLY_CREDENTIAL_TYPE;
140162

141-
export const vFire_credential_filter = credential =>
163+
export const vFire_credential_filter = (credential: Credential) =>
142164
credential.credential_type === USERNAME_PASSWORD_CREDENTIAL_TYPE;
143165

144166
export const SNMP_AUTH_ALGORITHM_MD5 = 'md5';
@@ -169,7 +191,7 @@ export const getCredentialTypeName = (type: CredentialType) =>
169191

170192
const parseTimeStatus = (
171193
status: string | undefined,
172-
): TimeStatus | undefined => {
194+
): CertificateStatus | undefined => {
173195
if (!isDefined(status)) {
174196
return undefined;
175197
}

src/web/Routes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ import RoleDetailsPage from 'web/pages/roles/RoleDetailsPage';
7777
import RoleListPage from 'web/pages/roles/RoleListPage';
7878
import ScanConfigDetailsPage from 'web/pages/scanconfigs/DetailsPage';
7979
import ScanConfigsPage from 'web/pages/scanconfigs/ListPage';
80-
import ScannerDetailsPage from 'web/pages/scanners/DetailsPage';
81-
import ScannersPage from 'web/pages/scanners/ListPage';
80+
import ScannerDetailsPage from 'web/pages/scanners/ScannerDetailsPage';
81+
import ScannersPage from 'web/pages/scanners/ScannerListPage';
8282
import ScheduleDetailsPage from 'web/pages/schedules/DetailsPage';
8383
import SchedulesPage from 'web/pages/schedules/ListPage';
8484
import StartPage from 'web/pages/start/StartPage';

src/web/entity/hooks/useEntityDelete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ const useEntityDelete = <
4545
dispatch(createDeleteEntity({entityType: name})(gmp)(entity.id as string));
4646

4747
const handleEntityDelete = async (entity: TEntity) => {
48-
return actionFunction<void>(
48+
return actionFunction<void, TDeleteError, void>(
4949
// @ts-expect-error
50-
deleteEntity(entity),
50+
deleteEntity(entity).then(() => {}),
5151
{
5252
onSuccess: onDeleted,
5353
onError: onDeleteError,

src/web/pages/alerts/AlertComponent.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import AlertDialog, {
4242
SECINFO_SUBJECT,
4343
TASK_SUBJECT,
4444
} from 'web/pages/alerts/Dialog';
45-
import CredentialsDialog from 'web/pages/credentials/Dialog';
45+
import CredentialDialog from 'web/pages/credentials/CredentialDialog';
4646
import {
4747
loadReportComposerDefaults,
4848
saveReportComposerDefaults,
@@ -1174,7 +1174,7 @@ const AlertComponent = ({
11741174
/>
11751175
)}
11761176
{credentialDialogVisible && (
1177-
<CredentialsDialog
1177+
<CredentialDialog
11781178
error={credentialError}
11791179
title={credentialDialogTitle}
11801180
types={credentialTypes}

0 commit comments

Comments
 (0)