+ {{#if (eq @item.Type 'kubernetes')}}
+
+ - {{t 'models.auth-method.Type'}}
+
+
+ {{#each (array "MaxTokenTTL" "TokenLocality" "DisplayName" "Description") as |value|}}
+ {{#if (get @item value)}}
+ - {{t (concat "models.auth-method." value)}}
+ - {{get @item value}}
+ {{/if}}
+ {{/each}}
+ {{#if @item.Config.Host}}
+ - {{t 'models.auth-method.Config.Host'}}
+ -
+
+ {{@item.Config.Host}}
+
+ {{/if}}
+ {{#if @item.Config.CACert}}
+ - {{t 'models.auth-method.Config.CACert'}}
+ -
+
+
+ {{/if}}
+ {{#if @item.Config.ServiceAccountJWT}}
+ - {{t 'models.auth-method.Config.ServiceAccountJWT'}}
+ -
+
+
+ {{@item.Config.ServiceAccountJWT}}
+
+
+ {{/if}}
+
+ {{else}}
+
+
+
+
+ {{#if @item.Config.ClaimMappings}}
+
+ Claim Mappings
+ Use this if the claim you are capturing is singular. When mapped, the values can be any of a number, string, or boolean and will all be stringified when returned.
+
+
+
+ Key |
+ Value |
+
+
+
+ {{#each (entries @item.Config.ClaimMappings) as |entry|}}
+
+ {{get entry 0}} |
+ {{get entry 1}} |
+
+ {{/each}}
+
+
+
+ {{/if}}
+
+
+
+ {{#if @item.Config.ListClaimMappings}}
+
+ List Claim Mappings
+ Use this if the claim you are capturing is list-like (such as groups). When mapped, the values can be any of a number, string, or boolean and will all be stringified when returned.
+
+
+
+ Key |
+ Value |
+
+
+
+ {{#each (entries @item.Config.ListClaimMappings) as |entry|}}
+
+ {{get entry 0}} |
+ {{get entry 1}} |
+
+ {{/each}}
+
+
+
+ {{/if}}
+ {{/if}}
+
\ No newline at end of file
diff --git a/ui/packages/consul-ui/app/router.js b/ui/packages/consul-ui/app/router.js
index fd2564cec..e7534ccea 100644
--- a/ui/packages/consul-ui/app/router.js
+++ b/ui/packages/consul-ui/app/router.js
@@ -192,7 +192,10 @@ export const routes = {
abilities: ['read auth-methods'],
},
show: {
- _options: { path: '/show' },
+ _options: { path: '/:id' },
+ 'auth-method': {
+ _options: { path: '/auth-method' },
+ },
},
},
},
diff --git a/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show.js b/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show.js
new file mode 100644
index 000000000..368ccc2ed
--- /dev/null
+++ b/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show.js
@@ -0,0 +1,27 @@
+import { inject as service } from '@ember/service';
+import SingleRoute from 'consul-ui/routing/single';
+import { hash } from 'rsvp';
+
+export default class ShowRoute extends SingleRoute {
+ @service('repository/auth-method') repo;
+
+ model(params) {
+ return super.model(...arguments).then(model => {
+ return hash({
+ ...model,
+ ...{
+ item: this.repo.findBySlug({
+ id: params.id,
+ dc: this.modelFor('dc').dc.Name,
+ ns: this.modelFor('nspace').nspace.substr(1),
+ }),
+ },
+ });
+ });
+ }
+
+ setupController(controller, model) {
+ super.setupController(...arguments);
+ controller.setProperties(model);
+ }
+}
diff --git a/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show/auth-method.js b/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show/auth-method.js
new file mode 100644
index 000000000..61d0e66bf
--- /dev/null
+++ b/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show/auth-method.js
@@ -0,0 +1,16 @@
+import Route from 'consul-ui/routing/route';
+
+export default class AuthMethodRoute extends Route {
+ model() {
+ const parent = this.routeName
+ .split('.')
+ .slice(0, -1)
+ .join('.');
+ return this.modelFor(parent);
+ }
+
+ setupController(controller, model) {
+ super.setupController(...arguments);
+ controller.setProperties(model);
+ }
+}
diff --git a/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show/index.js b/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show/index.js
new file mode 100644
index 000000000..415d3f66b
--- /dev/null
+++ b/ui/packages/consul-ui/app/routes/dc/acls/auth-methods/show/index.js
@@ -0,0 +1,6 @@
+import Route from 'consul-ui/routing/route';
+import to from 'consul-ui/utils/routing/redirect-to';
+
+export default Route.extend({
+ redirect: to('auth-method'),
+});
diff --git a/ui/packages/consul-ui/app/styles/components.scss b/ui/packages/consul-ui/app/styles/components.scss
index 38e3b62b4..673cbe77f 100644
--- a/ui/packages/consul-ui/app/styles/components.scss
+++ b/ui/packages/consul-ui/app/styles/components.scss
@@ -63,6 +63,7 @@
@import 'consul-ui/components/informed-action';
@import 'consul-ui/components/tab-nav';
@import 'consul-ui/components/search-bar';
+@import 'consul-ui/components/certificate';
@import 'consul-ui/components/consul/tomography/graph';
@import 'consul-ui/components/consul/discovery-chain';
diff --git a/ui/packages/consul-ui/app/styles/components/composite-row.scss b/ui/packages/consul-ui/app/styles/components/composite-row.scss
index 757b3522b..9c2bb59ce 100644
--- a/ui/packages/consul-ui/app/styles/components/composite-row.scss
+++ b/ui/packages/consul-ui/app/styles/components/composite-row.scss
@@ -9,7 +9,8 @@
.consul-node-list > ul > li:not(:first-child),
.consul-token-list > ul > li:not(:first-child),
.consul-policy-list > ul > li:not(:first-child),
-.consul-role-list > ul > li:not(:first-child) {
+.consul-role-list > ul > li:not(:first-child),
+.consul-auth-method-list > ul > li:not(:first-child) {
@extend %with-composite-row-intent;
}
.consul-lock-session-list ul > li:not(:first-child) {
diff --git a/ui/packages/consul-ui/app/styles/components/pill.scss b/ui/packages/consul-ui/app/styles/components/pill.scss
index 236eac8da..707b41c8d 100644
--- a/ui/packages/consul-ui/app/styles/components/pill.scss
+++ b/ui/packages/consul-ui/app/styles/components/pill.scss
@@ -1,6 +1,7 @@
span.policy-service-identity,
span.policy-node-identity,
-.leader {
+.leader,
+.consul-auth-method-type {
@extend %pill-200, %frame-gray-600;
}
span.policy-service-identity::before,
diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs
new file mode 100644
index 000000000..0b5889978
--- /dev/null
+++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs
@@ -0,0 +1,40 @@
+{{#if isAuthorized }}
+ {{page-title item.Name}}
+{{else}}
+ {{page-title 'Access Controls'}}
+{{/if}}
+