mirror of https://github.com/rancher/ui.git
Update fields for azure ad
This commit is contained in:
parent
5c69a66b89
commit
2ef1789c99
|
|
@ -17,15 +17,10 @@ export default Controller.extend({
|
||||||
testing: false,
|
testing: false,
|
||||||
error: null,
|
error: null,
|
||||||
|
|
||||||
loginUsername: null,
|
|
||||||
loginPassword: null,
|
|
||||||
|
|
||||||
//new
|
//new
|
||||||
azureADConfig: alias('model.azureADConfig'),
|
azureADConfig: alias('model.azureADConfig'),
|
||||||
isEnabled: alias('azureADConfig.enabled'),
|
isEnabled: alias('azureADConfig.enabled'),
|
||||||
editing: false,
|
editing: false,
|
||||||
mode: 'global',
|
|
||||||
modeClass: 'span-4',
|
|
||||||
|
|
||||||
numUsers: computed('azureADConfig.allowedPrincipalIds.[]','userType','groupType', function() {
|
numUsers: computed('azureADConfig.allowedPrincipalIds.[]','userType','groupType', function() {
|
||||||
return ( get(this, 'azureADConfig.allowedPrincipalIds') || [] ).filter(principal => principal.includes(C.PROJECT.TYPE_AZURE_USER)).get('length');
|
return ( get(this, 'azureADConfig.allowedPrincipalIds') || [] ).filter(principal => principal.includes(C.PROJECT.TYPE_AZURE_USER)).get('length');
|
||||||
|
|
@ -41,25 +36,6 @@ export default Controller.extend({
|
||||||
set(this, 'editing', true);
|
set(this, 'editing', true);
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleMode() {
|
|
||||||
|
|
||||||
if (get(this, 'mode') === 'global') {
|
|
||||||
|
|
||||||
setProperties(this, {
|
|
||||||
mode: 'china',
|
|
||||||
modeClass: 'span-3'
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
setProperties(this, {
|
|
||||||
mode: 'global',
|
|
||||||
modeClass: 'span-4'
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
test: function() {
|
test: function() {
|
||||||
this.send('clearError');
|
this.send('clearError');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ export default Route.extend({
|
||||||
model() {
|
model() {
|
||||||
let gs = get(this, 'globalStore');
|
let gs = get(this, 'globalStore');
|
||||||
return hash({
|
return hash({
|
||||||
azureADConfig: gs.find('authconfig', 'azuread'),
|
// TODO: WJW mocking purpose
|
||||||
|
// azureADConfig: gs.find('authconfig', 'azuread'),
|
||||||
|
azureADConfig: {},
|
||||||
principals: gs.all('principal')
|
principals: gs.all('principal')
|
||||||
}).catch( e => e);
|
}).catch( e => e);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,22 @@
|
||||||
<b>{{t 'authPage.azuread.configure.tenantId.label'}}: </b> <span class="text-muted">{{azureADConfig.tenantId}}</span>
|
<b>{{t 'authPage.azuread.configure.tenantId.label'}}: </b> <span class="text-muted">{{azureADConfig.tenantId}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b>{{t 'authPage.azuread.configure.clientId.label'}}: </b> <span class="text-muted">{{azureADConfig.clientId}}</span>
|
<b>{{t 'authPage.azuread.configure.applicationId.label'}}: </b> <span class="text-muted">{{azureADConfig.applicationId}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b>{{t 'authPage.azuread.configure.domain.label'}}: </b> <span class="text-muted">{{azureADConfig.domain}}</span>
|
<b>{{t 'authPage.azuread.configure.serverURL.label'}}: </b> <span class="text-muted">{{azureADConfig.serverURL}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<b>{{t 'authPage.azuread.configure.azureADEndpoint.label'}}: </b> <span class="text-muted">{{azureADConfig.azureADEndpoint}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<b>{{t 'authPage.azuread.configure.azureADGraphEndpoint.label'}}: </b> <span class="text-muted">{{azureADConfig.azureADGraphEndpoint}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<b>{{t 'authPage.azuread.configure.azureADTokenEndpoint.label'}}: </b> <span class="text-muted">{{azureADConfig.azureADTokenEndpoint}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<b>{{t 'authPage.azuread.configure.azureADAuthEndpoint.label'}}: </b> <span class="text-muted">{{azureADConfig.azureADAuthEndpoint}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -82,39 +94,61 @@
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="pull-right btn-group no-inline-space p-0">
|
<div class="col span-6">
|
||||||
<button class="btn btn-link btn-sm {{if (eq mode 'global') 'bg-primary' 'bg-deafult'}}" {{action 'toggleMode'}}>Global</button>
|
|
||||||
<button class="btn btn-link btn-sm bg-defualt {{if (eq mode 'china') 'bg-primary' 'bg-deafult'}}" {{action 'toggleMode'}}>China</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col {{modeClass}}">
|
|
||||||
<div class="inline-form">
|
<div class="inline-form">
|
||||||
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.tenantId.label'}}{{field-required}}</label>
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.tenantId.label'}}{{field-required}}</label>
|
||||||
{{input type="text" value=azureADConfig.tenantId placeholder=(t 'authPage.azuread.configure.tenantId.placeholder') classNames="form-control"}}
|
{{input type="text" value=azureADConfig.tenantId placeholder=(t 'authPage.azuread.configure.tenantId.placeholder') classNames="form-control"}}
|
||||||
<p class="help-block">{{t 'authPage.azuread.configure.tenantId.help'}}</p>
|
<p class="help-block">{{t 'authPage.azuread.configure.tenantId.help'}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col {{modeClass}}">
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col span-6">
|
||||||
<div class="inline-form">
|
<div class="inline-form">
|
||||||
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.clientId.label'}}{{field-required}}</label>
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.applicationId.label'}}{{field-required}}</label>
|
||||||
{{input type="text" value=azureADConfig.clientId placeholder=(t 'authPage.azuread.configure.clientId.placeholder') classNames="form-control"}}
|
{{input type="text" value=azureADConfig.applicationId placeholder=(t 'authPage.azuread.configure.applicationId.placeholder') classNames="form-control"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#unless (eq mode 'global')}}
|
<div class="col span-6">
|
||||||
<div class="col span-3">
|
|
||||||
<div class="inline-form">
|
|
||||||
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.clientSecret.label'}}{{field-required}}</label>
|
|
||||||
{{input type="password" value=azureADConfig.clientSecret placeholder=(t 'authPage.azuread.configure.clientSecret.placeholder') classNames="form-control"}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/unless}}
|
|
||||||
<div class="col {{modeClass}}">
|
|
||||||
<div class="inline-form">
|
<div class="inline-form">
|
||||||
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.domain.label'}}{{field-required}}</label>
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.applicationSecret.label'}}{{field-required}}</label>
|
||||||
{{input type="text" value=azureADConfig.domain placeholder=(t 'authPage.azuread.configure.domain.placeholder') classNames="form-control"}}
|
{{input type="password" value=azureADConfig.applicationSecret classNames="form-control"}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col span-6">
|
||||||
|
<div class="inline-form">
|
||||||
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.serverURL.label'}}{{field-required}}</label>
|
||||||
|
{{input type="url" value=azureADConfig.serverURL classNames="form-control"}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col span-6">
|
||||||
|
<div class="inline-form">
|
||||||
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.azureADEndpoint.label'}}{{field-required}}</label>
|
||||||
|
{{input type="url" value=azureADConfig.azureADEndpoint classNames="form-control"}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col span-6">
|
||||||
|
<div class="inline-form">
|
||||||
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.azureADGraphEndpoint.label'}}{{field-required}}</label>
|
||||||
|
{{input type="url" value=azureADConfig.azureADGraphEndpoint classNames="form-control"}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col span-6">
|
||||||
|
<div class="inline-form">
|
||||||
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.azureADTokenEndpoint.label'}}{{field-required}}</label>
|
||||||
|
{{input type="url" value=azureADConfig.azureADTokenEndpoint classNames="form-control"}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col span-6">
|
||||||
|
<div class="inline-form">
|
||||||
|
<label class="acc-label pb-5">{{t 'authPage.azuread.configure.azureADAuthEndpoint.label'}}{{field-required}}</label>
|
||||||
|
{{input type="url" value=azureADConfig.azureADAuthEndpoint classNames="form-control"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@ export default Controller.extend({
|
||||||
drivers: computed(function() {
|
drivers: computed(function() {
|
||||||
return [
|
return [
|
||||||
{route: 'security.authentication.activedirectory', label: 'Active Directory', css: 'activedirectory', available: this.hasRecord('activedirectoryconfig') },
|
{route: 'security.authentication.activedirectory', label: 'Active Directory', css: 'activedirectory', available: this.hasRecord('activedirectoryconfig') },
|
||||||
{route: 'security.authentication.azuread', label: 'Azure AD', css: 'azuread', available: this.hasRecord('azureadconfig') },
|
// TODO: WJW mocking purpose
|
||||||
|
// {route: 'security.authentication.azuread', label: 'Azure AD', css: 'azuread', available: this.hasRecord('azureadconfig') },
|
||||||
|
{route: 'security.authentication.azuread', label: 'Azure AD', css: 'azuread', available: true },
|
||||||
{route: 'security.authentication.github', label: 'GitHub', css: 'github', available: this.hasRecord('githubconfig') },
|
{route: 'security.authentication.github', label: 'GitHub', css: 'github', available: this.hasRecord('githubconfig') },
|
||||||
{route: 'security.authentication.ping', label: 'Ping', css: 'ping', available: true },
|
{route: 'security.authentication.ping', label: 'Ping', css: 'ping', available: true },
|
||||||
{route: 'security.authentication.freeipa', label: 'FreeIPA', css: 'freeipa', available: true },
|
{route: 'security.authentication.freeipa', label: 'FreeIPA', css: 'freeipa', available: true },
|
||||||
|
|
|
||||||
|
|
@ -521,21 +521,21 @@ authPage:
|
||||||
configure:
|
configure:
|
||||||
header: 'Configure Azure AD Account'
|
header: 'Configure Azure AD Account'
|
||||||
help: Enter the Tenant ID, Client ID, and Admin user details to connect to your Azure AD auth account.
|
help: Enter the Tenant ID, Client ID, and Admin user details to connect to your Azure AD auth account.
|
||||||
adminAccountUsername:
|
applicationId:
|
||||||
label: Admin Account Username
|
label: Application ID
|
||||||
placeholder: e.g. rancher-admin
|
|
||||||
help: A user that can read information about other users
|
|
||||||
adminAccountPassword:
|
|
||||||
label: Admin Account Password
|
|
||||||
clientId:
|
|
||||||
label: Client ID
|
|
||||||
placeholder: A long UUID string
|
placeholder: A long UUID string
|
||||||
clientSecret:
|
applicationSecret:
|
||||||
label: Client Secret
|
label: Application Secret
|
||||||
placeholder: Your Client Secret
|
serverURL:
|
||||||
domain:
|
label: AD Server Url
|
||||||
label: Domain
|
azureADEndpoint:
|
||||||
placeholder: e.g. youcompany.onmicrosoft.com
|
label: Azure AD Endpoint
|
||||||
|
azureADGraphEndpoint:
|
||||||
|
label: Azure AD Graph Endpoint
|
||||||
|
azureADTokenEndpoint:
|
||||||
|
label: Azure AD Token Endpoint
|
||||||
|
azureADAuthEndpoint:
|
||||||
|
label: Azure AD Auth Endpoint
|
||||||
tenantId:
|
tenantId:
|
||||||
label: Tenant ID
|
label: Tenant ID
|
||||||
placeholder: A long UUID string
|
placeholder: A long UUID string
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue