open-vault/ui/app/models/auth-config/azure.js
Matthew Irish 067495ccce
UI - new backends (#4302)
* allow mounting of gcp secrets engine

* add models for azure auth method

* add azure as a mountable auth method

* make dev CSP more like built-in CSP

* id -> ID
2018-04-09 14:44:53 -05:00

39 lines
1.1 KiB
JavaScript

import Ember from 'ember';
import DS from 'ember-data';
import AuthConfig from '../auth-config';
import fieldToAttrs from 'vault/utils/field-to-attrs';
const { attr } = DS;
const { computed } = Ember;
export default AuthConfig.extend({
tenantId: attr('string', {
label: 'Tenant ID',
helpText: 'The tenant ID for the Azure Active Directory organization',
}),
resource: attr('string', {
helpText: 'The configured URL for the application registered in Azure Active Directory',
}),
clientId: attr('string', {
label: 'Client ID',
helpText:
'The client ID for credentials to query the Azure APIs. Currently read permissions to query compute resources are required.',
}),
clientSecret: attr('string', {
helpText: 'The client secret for credentials to query the Azure APIs',
}),
googleCertsEndpoint: attr('string'),
fieldGroups: computed(function() {
const groups = [
{ default: ['tenantId', 'resource'] },
{
'Azure Options': ['clientId', 'clientSecret'],
},
];
return fieldToAttrs(this, groups);
}),
});