Add admin groups parameter to http auth

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
AllForNothing 2020-12-14 13:43:47 +08:00
parent 90f9bea965
commit 11b706adeb
11 changed files with 41 additions and 16 deletions

View File

@ -283,6 +283,12 @@
[disabled]="!currentConfig.http_authproxy_tokenreview_endpoint.editable" />
<clr-control-error>{{'TOOLTIP.ENDPOINT_FORMAT' | translate}}</clr-control-error>
</clr-input-container>
<clr-input-container>
<label for="HttpAdminGroup">{{'CONFIG.HTTP_AUTH.ADMIN_GROUPS' | translate}}</label>
<input autocomplete="off" (blur)="trimSpace($event)" clrInput name="HttpAdminGroup" type="text" #ngHttpAdminGroup="ngModel"
[(ngModel)]="currentConfig.http_authproxy_admin_groups.value" id="HttpAdminGroup" size="35"
[disabled]="disabled(currentConfig.http_authproxy_admin_groups)" />
</clr-input-container>
<clr-checkbox-container clrInline>
<label for="http_authproxy_verify_cert"
class="required">{{'CONFIG.HTTP_AUTH.VERIFY_CERT' | translate}}</label>

View File

@ -268,4 +268,13 @@ export class ConfigurationAuthComponent implements OnChanges, OnInit {
this.currentConfig.oidc_user_claim.value = "";
}
}
trimSpace(e: any) {
if (e && e.target) {
if (e.target.value) {
e.target.value = e.target.value.trim();
} else {
e.target.value = "";
}
}
}
}

View File

@ -850,7 +850,7 @@
"AUTH_MODE_DB": "Datenbank",
"AUTH_MODE_LDAP": "LDAP",
"AUTH_MODE_UAA": "UAA",
"AUTH_MODE_HTTP": "http_auth",
"AUTH_MODE_HTTP": "Http Auth",
"AUTH_MODE_OIDC": "OIDC",
"SCOPE_BASE": "Base",
"SCOPE_ONE_LEVEL": "OneLevel",
@ -916,7 +916,8 @@
"ENDPOINT": "Server Endpunkt",
"TOKEN_REVIEW": "Token Review Endpunkt",
"SKIP_SEARCH": "Suche überspringen",
"VERIFY_CERT": "Zertifikate überprüfen"
"VERIFY_CERT": "Zertifikate überprüfen",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC": {
"OIDC_PROVIDER": "OIDC Provider Name",

View File

@ -850,7 +850,7 @@
"AUTH_MODE_DB": "Database",
"AUTH_MODE_LDAP": "LDAP",
"AUTH_MODE_UAA": "UAA",
"AUTH_MODE_HTTP": "http_auth",
"AUTH_MODE_HTTP": "Http Auth",
"AUTH_MODE_OIDC": "OIDC",
"SCOPE_BASE": "Base",
"SCOPE_ONE_LEVEL": "OneLevel",
@ -916,7 +916,8 @@
"ENDPOINT": "Server Endpoint",
"TOKEN_REVIEW": "Token Review Endpoint",
"SKIP_SEARCH": "Skip Search",
"VERIFY_CERT": "Verify Certificate"
"VERIFY_CERT": "Verify Certificate",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC": {
"OIDC_PROVIDER": "OIDC Provider Name",

View File

@ -850,7 +850,7 @@
"AUTH_MODE_DB": "Base de datos",
"AUTH_MODE_LDAP": "LDAP",
"AUTH_MODE_UAA": "UAA",
"AUTH_MODE_HTTP": "http_auth",
"AUTH_MODE_HTTP": "Http Auth",
"AUTH_MODE_OIDC": "OIDC",
"SCOPE_BASE": "Base",
"SCOPE_ONE_LEVEL": "UnNivel",
@ -916,7 +916,8 @@
"ENDPOINT": "Server Endpoint",
"TOKEN_REVIEW": "Review Endpoint De Token",
"SKIP_SEARCH": "Skip Search",
"VERIFY_CERT": "Authentication Verify Cert"
"VERIFY_CERT": "Authentication Verify Cert",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC": {
"OIDC_PROVIDER": "OIDC Proveedor",

View File

@ -830,7 +830,7 @@
"SELF_REGISTRATION": "Autoriser l'Auto-Inscription",
"AUTH_MODE_DB": "Base de données",
"AUTH_MODE_LDAP": "LDAP",
"AUTH_MODE_HTTP": "http_auth",
"AUTH_MODE_HTTP": "Http Auth",
"AUTH_MODE_OIDC": "OIDC",
"SCOPE_BASE": "Base",
"SCOPE_ONE_LEVEL": "Premier Niveau",
@ -889,7 +889,8 @@
"ENDPOINT": "serveur paramètre",
"TOKEN_REVIEW": "examen symbolique paramètre",
"SKIP_SEARCH": "Skip Search",
"VERIFY_CERT": "authentification vérifier cert"
"VERIFY_CERT": "authentification vérifier cert",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC": {
"OIDC_PROVIDER": "OIDC Fournisseur",

View File

@ -846,7 +846,7 @@
"AUTH_MODE_DB": "Banco de Dados",
"AUTH_MODE_LDAP": "LDAP",
"AUTH_MODE_UAA": "UAA",
"AUTH_MODE_HTTP": "http_auth",
"AUTH_MODE_HTTP": "Http Auth",
"AUTH_MODE_OIDC": "OIDC",
"SCOPE_BASE": "Base",
"SCOPE_ONE_LEVEL": "OneLevel",
@ -912,7 +912,8 @@
"ENDPOINT": "Server endpoint",
"TOKEN_REVIEW": "Ponto final do Token Review",
"SKIP_SEARCH": "Skip Search",
"VERIFY_CERT": "Verificar certificado de Authentication"
"VERIFY_CERT": "Verificar certificado de Authentication",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC": {
"OIDC_PROVIDER": "OIDC Fornecedor",

View File

@ -850,7 +850,7 @@
"AUTH_MODE_DB": "Veritabanı",
"AUTH_MODE_LDAP": "LDAP",
"AUTH_MODE_UAA": "UAA",
"AUTH_MODE_HTTP": "http_auth",
"AUTH_MODE_HTTP": "Http Auth",
"AUTH_MODE_OIDC": "OIDC",
"SCOPE_BASE": "Temel",
"SCOPE_ONE_LEVEL": "İlk Seviye",
@ -916,7 +916,8 @@
"ENDPOINT": "Sunucu Uç Noktası",
"TOKEN_REVIEW": "Token Uç Noktasını İnceleyin",
"SKIP_SEARCH": "Aramayı Atla",
"VERIFY_CERT": "Sertifikayı Doğrula"
"VERIFY_CERT": "Sertifikayı Doğrula",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC": {
"OIDC_PROVIDER": "OIDC Sağlayıcı Adı",

View File

@ -851,7 +851,7 @@
"AUTH_MODE_DB": "数据库",
"AUTH_MODE_LDAP": "LDAP",
"AUTH_MODE_UAA": "UAA",
"AUTH_MODE_HTTP": "http_auth",
"AUTH_MODE_HTTP": "Http Auth",
"AUTH_MODE_OIDC": "OIDC",
"SCOPE_BASE": "本层",
"SCOPE_ONE_LEVEL": "下一层",
@ -916,7 +916,8 @@
"ENDPOINT": "Server Endpoint",
"TOKEN_REVIEW": "Token Review Endpoint",
"SKIP_SEARCH": "Skip Search",
"VERIFY_CERT": "Authentication验证证书"
"VERIFY_CERT": "Verify Certificate",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC": {
"OIDC_PROVIDER": "OIDC 供应商",

View File

@ -846,7 +846,7 @@
"AUTH_MODE_DB": "數據庫",
"AUTH_MODE_LDAP":"LDAP",
"AUTH_MODE_UAA":"UAA",
"AUTH_MODE_HTTP":"http_auth",
"AUTH_MODE_HTTP":"Http Auth",
"AUTH_MODE_OIDC":"OIDC",
"SCOPE_BASE":"本層",
"SCOPE_ONE_LEVEL": "下一層",
@ -911,7 +911,8 @@
"ENDPOINT":"服務器端點",
"TOKEN_REVIEW":"令牌審查端點",
"SKIP_SEARCH":"跳過搜索",
"VERIFY_CERT": "Authentication驗證證書"
"VERIFY_CERT": "Authentication驗證證書",
"ADMIN_GROUPS": "Admin Groups"
},
"OIDC":{
"OIDC_PROVIDER": "OIDC 供應商",

View File

@ -90,6 +90,7 @@ export class Configuration {
scan_all_policy: ComplexValueItem;
read_only: BoolValueItem;
notification_enable: BoolValueItem;
http_authproxy_admin_groups?: StringValueItem;
http_authproxy_endpoint?: StringValueItem;
http_authproxy_tokenreview_endpoint?: StringValueItem;
http_authproxy_verify_cert?: BoolValueItem;
@ -151,6 +152,7 @@ export class Configuration {
}, true);
this.read_only = new BoolValueItem(false, true);
this.notification_enable = new BoolValueItem(false, true);
this.http_authproxy_admin_groups = new StringValueItem("", true);
this.http_authproxy_endpoint = new StringValueItem("", true);
this.http_authproxy_tokenreview_endpoint = new StringValueItem("", true);
this.http_authproxy_verify_cert = new BoolValueItem(false, true);