diff --git a/src/portal/lib/src/config/config.ts b/src/portal/lib/src/config/config.ts index 06f24dd2e..093132ae7 100644 --- a/src/portal/lib/src/config/config.ts +++ b/src/portal/lib/src/config/config.ts @@ -87,6 +87,9 @@ export class Configuration { cfg_expiration: NumberValueItem; scan_all_policy: ComplexValueItem; read_only: BoolValueItem; + http_authproxy_endpoint?: StringValueItem; + http_authproxy_skip_cert_verify?: BoolValueItem; + http_authproxy_always_onboard?: BoolValueItem; public constructor() { this.auth_mode = new StringValueItem("db_auth", true); @@ -128,5 +131,8 @@ export class Configuration { } }, true); this.read_only = new BoolValueItem(false, true); + this.http_authproxy_endpoint = new StringValueItem("", true); + this.http_authproxy_skip_cert_verify = new BoolValueItem(false, true); + this.http_authproxy_always_onboard = new BoolValueItem(false, true); } } diff --git a/src/portal/src/app/config/auth/config-auth.component.html b/src/portal/src/app/config/auth/config-auth.component.html index c05e03214..bc33d50d6 100644 --- a/src/portal/src/app/config/auth/config-auth.component.html +++ b/src/portal/src/app/config/auth/config-auth.component.html @@ -3,14 +3,16 @@
- +
- + {{'CONFIG.TOOLTIP.AUTH_MODE' | translate}} @@ -19,22 +21,24 @@
- +
- +
-
- @@ -44,7 +48,8 @@
-
-
-
-
-
- - + {{'CONFIG.TOOLTIP.LDAP_UID' | translate}} @@ -120,7 +136,8 @@
- @@ -133,8 +150,9 @@
- + @@ -145,7 +163,8 @@
+ [(ngModel)]="currentConfig.ldap_group_search_filter.value" id="ldapGroupFilter" size="40" + [disabled]="disabled(currentConfig.ldap_group_search_filter)"> @@ -155,8 +174,9 @@
- + @@ -168,7 +188,8 @@
+ [(ngModel)]="currentConfig.ldap_group_admin_dn.value" id="ldapGroupAdminDN" size="40" + [disabled]="disabled(currentConfig.ldap_group_admin_dn)"> @@ -180,7 +201,8 @@
- @@ -218,10 +243,12 @@
- +
+
+
+ + +
+
+ + + + +
+
+ + + + +
+
- - - + + +
\ No newline at end of file diff --git a/src/portal/src/app/config/auth/config-auth.component.ts b/src/portal/src/app/config/auth/config-auth.component.ts index beda79e6d..ccb71f731 100644 --- a/src/portal/src/app/config/auth/config-auth.component.ts +++ b/src/portal/src/app/config/auth/config-auth.component.ts @@ -65,12 +65,15 @@ export class ConfigurationAuthComponent implements OnChanges { public get showUAA(): boolean { return this.currentConfig && this.currentConfig.auth_mode && this.currentConfig.auth_mode.value === 'uaa_auth'; } - + public get showHttpAuth(): boolean { + return this.currentConfig && this.currentConfig.auth_mode && this.currentConfig.auth_mode.value === 'http_auth'; + } public get showSelfReg(): boolean { if (!this.currentConfig || !this.currentConfig.auth_mode) { return true; } else { - return this.currentConfig.auth_mode.value !== 'ldap_auth' && this.currentConfig.auth_mode.value !== 'uaa_auth'; + return this.currentConfig.auth_mode.value !== 'ldap_auth' && this.currentConfig.auth_mode.value !== 'uaa_auth' + && this.currentConfig.auth_mode.value !== 'http_auth' ; } } @@ -143,7 +146,11 @@ export class ConfigurationAuthComponent implements OnChanges { || prop.startsWith('uaa_') || prop === 'auth_mode' || prop === 'project_creattion_restriction' - || prop === 'self_registration') { + || prop === 'self_registration' + || prop === 'http_authproxy_endpoint' + || prop === 'http_authproxy_skip_cert_verify' + || prop === 'http_authproxy_always_onboard' + ) { changes[prop] = allChanges[prop]; } } @@ -161,7 +168,7 @@ export class ConfigurationAuthComponent implements OnChanges { handleOnChange($event: any): void { if ($event && $event.target && $event.target["value"]) { let authMode = $event.target["value"]; - if (authMode === 'ldap_auth' || authMode === 'uaa_auth') { + if (authMode === 'ldap_auth' || authMode === 'uaa_auth' || authMode === 'http_auth') { if (this.currentConfig.self_registration.value) { this.currentConfig.self_registration.value = false; // unselect } diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index 111d25b55..36f8e1d65 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -71,7 +71,8 @@ "RULE_USER_EXISTING": "Name is already in use.", "EMPTY": "Name is required", "NONEMPTY": "Can't be empty", - "REPO_TOOLTIP": "Users can not do any operations to the images in this mode." + "REPO_TOOLTIP": "Users can not do any operations to the images in this mode.", + "ENDPOINT_FORMAT": "Endpoint must start with HTTP or HTTPS." }, "PLACEHOLDER": { "CURRENT_PWD": "Enter current password", @@ -619,6 +620,7 @@ "AUTH_MODE_DB": "Database", "AUTH_MODE_LDAP": "LDAP", "AUTH_MODE_UAA": "UAA", + "AUTH_MODE_HTTP": "http_auth", "SCOPE_BASE": "Base", "SCOPE_ONE_LEVEL": "OneLevel", "SCOPE_SUBTREE": "Subtree", @@ -675,6 +677,11 @@ "CLIENT_SECRET": "UAA Client Secret", "VERIFY_CERT": "UAA Verify Cert" }, + "HTTP_AUTH": { + "ENDPOINT": "Server Endpoint", + "ALWAYS_ONBOARD": "Always Onboard", + "VERIFY_CERT": "Authentication Verify Cert" + }, "SCANNING": { "TRIGGER_SCAN_ALL_SUCCESS": "Trigger scan all successfully!", "TRIGGER_SCAN_ALL_FAIL": "Failed to trigger scan all with error: {{error}", diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json index e00eb2a2c..776694506 100644 --- a/src/portal/src/i18n/lang/es-es-lang.json +++ b/src/portal/src/i18n/lang/es-es-lang.json @@ -71,7 +71,8 @@ "RULE_USER_EXISTING": "Name is already in use.", "EMPTY": "Name is required", "NONEMPTY": "Can't be empty", - "REPO_TOOLTIP": "Users can not do any operations to the images in this mode." + "REPO_TOOLTIP": "Users can not do any operations to the images in this mode.", + "ENDPOINT_FORMAT": "Endpoint must start with HTTP or HTTPS." }, "PLACEHOLDER": { "CURRENT_PWD": "Introduzca la contraseña actual", @@ -618,6 +619,7 @@ "AUTH_MODE_DB": "Base de datos", "AUTH_MODE_LDAP": "LDAP", "AUTH_MODE_UAA": "UAA", + "AUTH_MODE_HTTP": "http_auth", "SCOPE_BASE": "Base", "SCOPE_ONE_LEVEL": "UnNivel", "SCOPE_SUBTREE": "Subárbol", @@ -674,6 +676,11 @@ "CLIENT_SECRET": "UAA Client Secret", "VERIFY_CERT": "UAA Verify Cert" }, + "HTTP_AUTH": { + "ENDPOINT": "Server Endpoint", + "ALWAYS_ONBOARD": "Always Onboard", + "VERIFY_CERT": "Authentication Verify Cert" + }, "SCANNING": { "TRIGGER_SCAN_ALL_SUCCESS": "Trigger scan all successfully!", "TRIGGER_SCAN_ALL_FAIL": "Failed to trigger scan all with error: {{error}", diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json index 1dc0ff454..2a4b19715 100644 --- a/src/portal/src/i18n/lang/fr-fr-lang.json +++ b/src/portal/src/i18n/lang/fr-fr-lang.json @@ -58,7 +58,8 @@ "EMAIL_EXISTING": "L'adresse e-mail existe déjà.", "USER_EXISTING": "Le nom d'utilisateur est déjà utilisé.", "NONEMPTY": "Can't be empty", - "REPO_TOOLTIP": "Users can not do any operations to the images in this mode." + "REPO_TOOLTIP": "Users can not do any operations to the images in this mode.", + "ENDPOINT_FORMAT": "Endpoint must start with HTTP or HTTPS." }, "PLACEHOLDER": { "CURRENT_PWD": "Entrez le mot de passe actuel", @@ -590,6 +591,7 @@ "SELF_REGISTRATION": "Autoriser l'Auto-Inscription", "AUTH_MODE_DB": "Base de données", "AUTH_MODE_LDAP": "LDAP", + "AUTH_MODE_HTTP": "http_auth", "SCOPE_BASE": "Base", "SCOPE_ONE_LEVEL": "Premier Niveau", "SCOPE_SUBTREE": "Sous-arbre", @@ -639,6 +641,11 @@ "GROUP_SCOPE": "LDAP Group Scope", "GROUP_SCOPE_INFO": "The scope to search for groups, select Subtree by default." }, + "HTTP_AUTH": { + "ENDPOINT": "serveur paramètre", + "ALWAYS_ONBOARD": "Always Onboard", + "VERIFY_CERT": "authentification vérifier cert" + }, "SCANNING": { "TRIGGER_SCAN_ALL_SUCCESS": "Déclenchement d'analyse globale avec succès !", "TRIGGER_SCAN_ALL_FAIL": "Echec du déclenchement d'analyse globale avec des erreurs : {{error}", diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json index f1d8099eb..8ad4c5c83 100644 --- a/src/portal/src/i18n/lang/pt-br-lang.json +++ b/src/portal/src/i18n/lang/pt-br-lang.json @@ -69,7 +69,8 @@ "EMAIL_EXISTING": "Email já existe.", "USER_EXISTING": "Nome de usuário já está em uso.", "RULE_USER_EXISTING": "Nome já em uso.", - "EMPTY": "Nome é obrigatório" + "EMPTY": "Nome é obrigatório", + "ENDPOINT_FORMAT": "Avaliação deve começar por HTTP Ou HTTPS." }, "PLACEHOLDER": { "CURRENT_PWD": "Insira a senha atual", @@ -613,6 +614,7 @@ "AUTH_MODE_DB": "Banco de Dados", "AUTH_MODE_LDAP": "LDAP", "AUTH_MODE_UAA": "UAA", + "AUTH_MODE_HTTP": "http_auth", "SCOPE_BASE": "Base", "SCOPE_ONE_LEVEL": "OneLevel", "SCOPE_SUBTREE": "Subtree", @@ -668,6 +670,11 @@ "CLIENT_SECRET": "Secret de Cliente UAA", "VERIFY_CERT": "Verificar certificado UAA" }, + "HTTP_AUTH": { + "ENDPOINT": "server endpoint", + "ALWAYS_ONBOARD": "Sempre Onboard", + "VERIFY_CERT": "Verificar certificado de Authentication" + }, "SCANNING": { "TRIGGER_SCAN_ALL_SUCCESS": "Disparo de análise geral efetuado com sucesso!", "TRIGGER_SCAN_ALL_FAIL": "Falha ao disparar análise geral com erro: {{error}", diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index 2b6627ff4..ee829b758 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -70,7 +70,8 @@ "USER_EXISTING": "用户名已经存在。", "RULE_USER_EXISTING": "名称已经存在。", "EMPTY": "名称为必填项", - "NONEMPTY": "不能为空" + "NONEMPTY": "不能为空", + "ENDPOINT_FORMAT": "Endpoint必须以http或https开头。" }, "PLACEHOLDER": { "CURRENT_PWD": "输入当前密码", @@ -618,6 +619,7 @@ "AUTH_MODE_DB": "数据库", "AUTH_MODE_LDAP": "LDAP", "AUTH_MODE_UAA": "UAA", + "AUTH_MODE_HTTP": "http_auth", "SCOPE_BASE": "本层", "SCOPE_ONE_LEVEL": "下一层", "SCOPE_SUBTREE": "子树", @@ -673,6 +675,11 @@ "CLIENT_SECRET": "UAA Client Secret", "VERIFY_CERT": "UAA 检查证书" }, + "HTTP_AUTH": { + "ENDPOINT": "Server Endpoint", + "ALWAYS_ONBOARD": "Always Onboard", + "VERIFY_CERT": "Authentication验证证书" + }, "SCANNING": { "TRIGGER_SCAN_ALL_SUCCESS": "启动扫描所有镜像任务成功!", "TRIGGER_SCAN_ALL_FAIL": "启动扫描所有镜像任务失败:{{error}",