open-vault/ui/app/helpers/supported-auth-backends.js

75 lines
2 KiB
JavaScript
Raw Normal View History

import { helper as buildHelper } from '@ember/component/helper';
2018-04-03 14:16:57 +00:00
const SUPPORTED_AUTH_BACKENDS = [
{
type: 'token',
typeDisplay: 'Token',
2018-04-03 14:16:57 +00:00
description: 'Token authentication.',
tokenPath: 'id',
displayNamePath: 'display_name',
formAttributes: ['token'],
2018-04-03 14:16:57 +00:00
},
{
type: 'userpass',
typeDisplay: 'Username',
2018-04-03 14:16:57 +00:00
description: 'A simple username and password backend.',
tokenPath: 'client_token',
displayNamePath: 'metadata.username',
formAttributes: ['username', 'password'],
2018-04-03 14:16:57 +00:00
},
{
type: 'ldap',
typeDisplay: 'LDAP',
2018-04-03 14:16:57 +00:00
description: 'LDAP authentication.',
tokenPath: 'client_token',
displayNamePath: 'metadata.username',
formAttributes: ['username', 'password'],
2018-04-03 14:16:57 +00:00
},
{
type: 'okta',
typeDisplay: 'Okta',
2018-04-03 14:16:57 +00:00
description: 'Authenticate with your Okta username and password.',
tokenPath: 'client_token',
displayNamePath: 'metadata.username',
formAttributes: ['username', 'password'],
2018-04-03 14:16:57 +00:00
},
UI - jwt auth (#6188) * fix default rendering of svg and allow plugins access to mount tune form * add auth-jwt component * add callback route, and allow it to be navigated to on load * add jwt as a supported auth method * use auth-jwt component and implement intial oidc flow * allow wrapping un-authed requests * pass redirect_url and properly redirect with the wrapped token * popup for login * center popup window and move to localStorage events for cross window communication because of IE11 * access window via a getter on the auth-form component * show OIDC provider name on the button * fetch default role on render of the auth-jwt component * simplify auth-form template * style callback page * refetch auth_url when path changes for auth-jwt component * fix glimmer error on alias metadata, and add back popup-metadata component * fix link in metadata page * add logo-edition component and remove use of partial for logo svg * render oidc callback template on the loading page if we're going there * add docs icon and change timeout on the auth form * move OIDC auth specific things to auth-jwt component * start to add branded buttons for OIDC providers * add google button * finish branded buttons * update glyph for error messages * update tests for auth screen not showing tabs, add adapter tests and new auth jwt tests * start auth-jwt tests * simplify auth-jwt * remove negative top margin on AlertInline * only preventDefault if there's an event * fill out tests * sort out some naming * feedback on templates and styles * clear error when starting OIDC auth and call for new auth_url * also allow 'oidc' as the auth method type * handle namespaces with OIDC auth * review feedback * use new getters in popup-metadata
2019-02-14 15:39:19 +00:00
{
type: 'jwt',
typeDisplay: 'JWT',
UI - jwt auth (#6188) * fix default rendering of svg and allow plugins access to mount tune form * add auth-jwt component * add callback route, and allow it to be navigated to on load * add jwt as a supported auth method * use auth-jwt component and implement intial oidc flow * allow wrapping un-authed requests * pass redirect_url and properly redirect with the wrapped token * popup for login * center popup window and move to localStorage events for cross window communication because of IE11 * access window via a getter on the auth-form component * show OIDC provider name on the button * fetch default role on render of the auth-jwt component * simplify auth-form template * style callback page * refetch auth_url when path changes for auth-jwt component * fix glimmer error on alias metadata, and add back popup-metadata component * fix link in metadata page * add logo-edition component and remove use of partial for logo svg * render oidc callback template on the loading page if we're going there * add docs icon and change timeout on the auth form * move OIDC auth specific things to auth-jwt component * start to add branded buttons for OIDC providers * add google button * finish branded buttons * update glyph for error messages * update tests for auth screen not showing tabs, add adapter tests and new auth jwt tests * start auth-jwt tests * simplify auth-jwt * remove negative top margin on AlertInline * only preventDefault if there's an event * fill out tests * sort out some naming * feedback on templates and styles * clear error when starting OIDC auth and call for new auth_url * also allow 'oidc' as the auth method type * handle namespaces with OIDC auth * review feedback * use new getters in popup-metadata
2019-02-14 15:39:19 +00:00
description: 'Authenticate using JWT or OIDC provider.',
tokenPath: 'client_token',
displayNamePath: 'display_name',
formAttributes: ['role', 'jwt'],
},
{
type: 'oidc',
typeDisplay: 'OIDC',
description: 'Authenticate using JWT or OIDC provider.',
tokenPath: 'client_token',
displayNamePath: 'display_name',
formAttributes: ['role', 'jwt'],
},
{
type: 'radius',
typeDisplay: 'RADIUS',
description: 'Authenticate with your RADIUS username and password.',
tokenPath: 'client_token',
displayNamePath: 'metadata.username',
formAttributes: ['username', 'password'],
},
2018-04-03 14:16:57 +00:00
{
type: 'github',
typeDisplay: 'GitHub',
2018-04-03 14:16:57 +00:00
description: 'GitHub authentication.',
tokenPath: 'client_token',
displayNamePath: ['metadata.org', 'metadata.username'],
formAttributes: ['token'],
2018-04-03 14:16:57 +00:00
},
];
export function supportedAuthBackends() {
return SUPPORTED_AUTH_BACKENDS;
}
export default buildHelper(supportedAuthBackends);