From 311af5d217820dd79406816ec2987012ce80262f Mon Sep 17 00:00:00 2001 From: Yogi_Wang Date: Thu, 4 Apr 2019 14:18:14 +0800 Subject: [PATCH 01/11] Fix issue of oidc configuration save button is always disabled and incorrect character when we login Harbor width OIDC ,we cannot click the save button of oidc config page Signed-off-by: Yogi_Wang --- src/portal/src/app/config/auth/config-auth.component.ts | 1 + src/portal/src/i18n/lang/en-us-lang.json | 4 ++-- src/portal/src/i18n/lang/es-es-lang.json | 2 +- src/portal/src/i18n/lang/fr-fr-lang.json | 6 +++--- src/portal/src/i18n/lang/pt-br-lang.json | 2 +- src/portal/src/i18n/lang/zh-cn-lang.json | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) 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 92c23ecb3..9ea4bc1f1 100644 --- a/src/portal/src/app/config/auth/config-auth.component.ts +++ b/src/portal/src/app/config/auth/config-auth.component.ts @@ -149,6 +149,7 @@ export class ConfigurationAuthComponent implements OnChanges { for (let prop in allChanges) { if (prop.startsWith('ldap_') || prop.startsWith('uaa_') + || prop.startsWith('oidc_') || prop === 'auth_mode' || prop === 'project_creattion_restriction' || prop === 'self_registration' diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index b86e220bb..156c089fe 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -692,12 +692,12 @@ "VERIFY_CERT": "Authentication Verify Cert" }, "OIDC": { - "OIDC_PROVIDER": "OIDC provider", + "OIDC_PROVIDER": "OIDC Provider", "ENDPOINT": "OIDC Endpoint", "CLIENT_ID": "OIDC Client ID", "CLIENTSECRET": "OIDC Client Secret", "SCOPE": "OIDC Scope", - "OIDCSKIPCERTVERIFY": "OIDC Verify Cert", + "OIDCSKIPCERTVERIFY": "OIDC Skip Verifying Certificate", "OIDC_SETNAME": "Set OIDC Username", "OIDC_SETNAMECONTENT": "You must create a Harbor username the first time when authenticating via a third party(OIDC).This will be used within Harbor to be associated with projects, roles, etc.", "OIDC_USERNAME": "Username" diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json index 10b4c709b..247cdd542 100644 --- a/src/portal/src/i18n/lang/es-es-lang.json +++ b/src/portal/src/i18n/lang/es-es-lang.json @@ -696,7 +696,7 @@ "CLIENT_ID": "ID de cliente OIDC", "CLIENTSECRET": "OIDC Client Secret", "SCOPE": "OIDC Ámbito", - "OIDCSKIPCERTVERIFY": "OIDC Verify Cert", + "OIDCSKIPCERTVERIFY": "OIDC Skip Verificar certificado", "OIDC_SETNAME": "Set OIDC nombre de usuario", "OIDC_SETNAMECONTENT": "Usted debe crear un Harbor nombre de usuario la primera vez cuando la autenticación a través de un tercero (OIDC). Esta será usada en Harbor para ser asociados con proyectos, funciones, etc.", "OIDC_USERNAME": "Usuario" diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json index 87ab7c21d..9d815760a 100644 --- a/src/portal/src/i18n/lang/fr-fr-lang.json +++ b/src/portal/src/i18n/lang/fr-fr-lang.json @@ -656,12 +656,12 @@ "VERIFY_CERT": "authentification vérifier cert" }, "OIDC": { - "OIDC_PROVIDER": "OIDC fournisseur", - "ENDPOINT": "OIDC paramètre", + "OIDC_PROVIDER": "OIDC Fournisseur", + "ENDPOINT": "OIDC Faramètre", "CLIENT_ID": "no d'identification du client OIDC", "CLIENTSECRET": "OIDC Client Secret", "SCOPE": "OIDC Scope", - "OIDCSKIPCERTVERIFY": "OIDC vérifier cert", + "OIDCSKIPCERTVERIFY": "Certificat OIDC skip vérifier", "OIDC_SETNAME": "Ensemble OIDC nom d'utilisateur", "OIDC_SETNAMECONTENT": "vous devez créer un Harbor identifiant la première fois lors de la vérification par une tierce partie (oidc). il sera utilisé au sein de port à être associés aux projets, des rôles, etc.", "OIDC_USERNAME": "d'utilisateur" diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json index 32bc95e7d..17fec33a4 100644 --- a/src/portal/src/i18n/lang/pt-br-lang.json +++ b/src/portal/src/i18n/lang/pt-br-lang.json @@ -690,7 +690,7 @@ "CLIENT_ID": "ID de cliente OIDC", "CLIENTSECRET": "OIDC Client Secret", "SCOPE": "Escopo OIDC", - "OIDCSKIPCERTVERIFY": "Verificar certificado OIDC", + "OIDCSKIPCERTVERIFY": "OIDC Skip Verificar Certificado", "OIDC_SETNAME": "Definir o Utilizador OIDC", "OIDC_SETNAMECONTENT": "Você deve Criar um Nome de usuário do Porto a primeira vez que autenticar através de um terceiro (OIDC). Isto será usado Dentro de Harbor para ser associado a projetos, papéis, etc.", "OIDC_USERNAME": "Utilizador" diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index 1c7cf41fd..f93498082 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -694,7 +694,7 @@ "ENDPOINT": "OIDC Endpoint", "CLIENT_ID": "OIDC 客户端标识", "CLIENTSECRET": "OIDC 客户端密码", - "SCOPE": "OIDC scope", + "SCOPE": "OIDC Scope", "OIDCSKIPCERTVERIFY": "OIDC 验证证书", "OIDC_SETNAME": "设置OIDC用户名", "OIDC_SETNAMECONTENT": "在通过第三方(OIDC)进行身份验证时,您必须第一次创建一个Harbor用户名。这将在端口中用于与项目、角色等关联。", From eec55f18eb41dc94a159ad75bf24b7ceda87513c Mon Sep 17 00:00:00 2001 From: Yogi_Wang Date: Mon, 8 Apr 2019 16:07:03 +0800 Subject: [PATCH 02/11] Add OIDC onboard page redirect to Harbor url when we login from OIDC and add redirect page address when we login again after logout 1.when we are the first time we login harbor page when we login from OIDC ,we add the url in onboard-add-username page. 2.fix the part of issue that we cannot redirect to de origin page when we login Signed-off-by: Yogi_Wang --- .../account/sign-in/sign-in.component.html | 2 +- .../account/sign-in/sign-in.component.scss | 4 ++-- .../app/account/sign-in/sign-in.component.ts | 5 +++-- .../app/base/navigator/navigator.component.ts | 20 +++++++++++-------- .../oidc-onboard/oidc-onboard.component.ts | 4 +++- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/portal/src/app/account/sign-in/sign-in.component.html b/src/portal/src/app/account/sign-in/sign-in.component.html index 2342192e8..0e1a2de49 100644 --- a/src/portal/src/app/account/sign-in/sign-in.component.html +++ b/src/portal/src/app/account/sign-in/sign-in.component.html @@ -3,7 +3,7 @@