Matthew Irish 754fd0b7c8
UI - add JWT auth, remove alias metadata (#4986)
* remove the ability to edit metadata on entity aliases
* add JWT auth method in the UI
2018-07-24 17:35:31 -05:00

41 lines
1.2 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({
oidcDiscoveryUrl: attr('string', {
label: 'OIDC discovery URL',
helpText:
'The OIDC discovery URL, without any .well-known component (base path). Cannot be used with jwt_validation_pubkeys',
}),
oidcDiscoveryCaPem: attr('string', {
label: 'OIDC discovery CA PEM',
editType: 'file',
helpText:
'The CA certificate or chain of certificates, in PEM format, to use to validate connections to the OIDC Discovery URL. If not set, system certificates are used',
}),
jwtValidationPubkeys: attr({
label: 'JWT validation public keys',
editType: 'stringArray',
}),
boundIssuer: attr('string', {
helpText: 'The value against which to match the iss claim in a JWT',
}),
fieldGroups: computed(function() {
const groups = [
{
default: ['oidcDiscoveryUrl'],
},
{
'JWT Options': ['oidcDiscoveryCaPem', 'jwtValidationPubkeys', 'boundIssuer'],
},
];
return fieldToAttrs(this, groups);
}),
});