From 4d4ace908c4b67de3dfb492ed29cd4b91c09d472 Mon Sep 17 00:00:00 2001 From: madalynrose Date: Wed, 7 Nov 2018 14:34:33 -0500 Subject: [PATCH] Add new token_type filed to auth method mount-config (#5723) --- ui/app/models/auth-method.js | 6 +++--- ui/app/models/mount-config.js | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ui/app/models/auth-method.js b/ui/app/models/auth-method.js index 9d12f4f8f..86bdd4f24 100644 --- a/ui/app/models/auth-method.js +++ b/ui/app/models/auth-method.js @@ -50,7 +50,7 @@ export default DS.Model.extend({ tuneAttrs: computed(function() { return expandAttributeMeta(this, [ 'description', - 'config.{listingVisibility,defaultLeaseTtl,maxLeaseTtl,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}', + 'config.{listingVisibility,defaultLeaseTtl,maxLeaseTtl,tokenType,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}', ]); }), @@ -69,7 +69,7 @@ export default DS.Model.extend({ 'accessor', 'local', 'sealWrap', - 'config.{listingVisibility,defaultLeaseTtl,maxLeaseTtl,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}', + 'config.{listingVisibility,defaultLeaseTtl,maxLeaseTtl,tokenType,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}', ]; }), @@ -82,7 +82,7 @@ export default DS.Model.extend({ 'config.listingVisibility', 'local', 'sealWrap', - 'config.{defaultLeaseTtl,maxLeaseTtl,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}', + 'config.{defaultLeaseTtl,maxLeaseTtl,tokenType,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}', ], }, ]; diff --git a/ui/app/models/mount-config.js b/ui/app/models/mount-config.js index 95c939d29..65f11c2d4 100644 --- a/ui/app/models/mount-config.js +++ b/ui/app/models/mount-config.js @@ -31,4 +31,11 @@ export default Fragment.extend({ helpText: 'Headers to whitelist and pass from the request to the backend', editType: 'stringArray', }), + tokenType: attr('string', { + label: 'Token Type', + helpText: + "The type of token that should be generated via this role. Can be `service`, `batch`, or `default` to use the mount's default (which unless changed will be `service` tokens).", + possibleValues: ['default', 'batch', 'service'], + defaultFormValue: 'default', + }), });