2018-04-03 14:16:57 +00:00
|
|
|
import Ember from 'ember';
|
|
|
|
|
|
|
|
const TABS_FOR_SETTINGS = {
|
|
|
|
aws: [
|
|
|
|
{
|
|
|
|
label: 'Client',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'client'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Identity Whitelist Tidy',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'identity-whitelist'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Role Tag Blacklist Tidy',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'roletag-blacklist'],
|
|
|
|
},
|
|
|
|
],
|
2018-04-09 19:44:53 +00:00
|
|
|
azure: [
|
|
|
|
{
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'configuration'],
|
|
|
|
},
|
|
|
|
],
|
2018-04-03 14:16:57 +00:00
|
|
|
github: [
|
|
|
|
{
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'configuration'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
gcp: [
|
|
|
|
{
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'configuration'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
kubernetes: [
|
|
|
|
{
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'configuration'],
|
|
|
|
},
|
|
|
|
],
|
2018-06-15 17:53:21 +00:00
|
|
|
ldap: [
|
|
|
|
{
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'configuration'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
okta: [
|
|
|
|
{
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'configuration'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
radius: [
|
|
|
|
{
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'configuration'],
|
|
|
|
},
|
|
|
|
],
|
2018-04-03 14:16:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const TABS_FOR_SHOW = {};
|
|
|
|
|
|
|
|
export function tabsForAuthSection([methodType, sectionType = 'authSettings']) {
|
|
|
|
let tabs;
|
|
|
|
|
|
|
|
if (sectionType === 'authSettings') {
|
|
|
|
tabs = (TABS_FOR_SETTINGS[methodType] || []).slice();
|
|
|
|
tabs.push({
|
|
|
|
label: 'Method Options',
|
|
|
|
routeParams: ['vault.cluster.settings.auth.configure.section', 'options'],
|
|
|
|
});
|
|
|
|
return tabs;
|
|
|
|
}
|
|
|
|
|
|
|
|
tabs = (TABS_FOR_SHOW[methodType] || []).slice();
|
|
|
|
tabs.push({
|
|
|
|
label: 'Configuration',
|
|
|
|
routeParams: ['vault.cluster.access.method.section', 'configuration'],
|
|
|
|
});
|
|
|
|
|
|
|
|
return tabs;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Ember.Helper.helper(tabsForAuthSection);
|