Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Intrinsic support for multiple backends and general restyling #47

Merged
merged 40 commits into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0e56dce
Begin role management feature
Feb 1, 2017
e0224f4
First commit dynamic navigation
Feb 1, 2017
c75010c
Refactor secret management
Feb 2, 2017
f1920fb
Support dynamic auth backends
Feb 2, 2017
2954d90
Layout changes
Feb 2, 2017
0c0f829
Various component restructuring and refactoring
Feb 2, 2017
bd97d77
mount github in docker-compose env
Feb 2, 2017
be2e497
fix bug in listing after new object creation
Feb 2, 2017
83fa4b0
mount aws-ec2 in docker-compose env
Feb 2, 2017
af46116
remove bad hack
Feb 2, 2017
d87abae
Role listing and editing
Feb 2, 2017
aef094e
Fix bugs
Feb 2, 2017
bceb84b
Fixes in snackbar messages
Feb 2, 2017
c65bd4e
Complete implementation of various role functions
Feb 3, 2017
cdfcf8e
Fix unexpected behaviour when using referenced objects
Feb 3, 2017
a01c637
First commit policy picker component
Feb 6, 2017
2877dff
Merge branch 'master' into token_management
Feb 6, 2017
0f3ad28
Re enable webpack
Feb 9, 2017
ab0837e
Merge token management
Feb 9, 2017
f2075bb
preview policy picker
Feb 9, 2017
c9554de
Check current token validity using lookup-self
Feb 13, 2017
9e8ee58
Revert "Check current token validity using lookup-self"
Feb 14, 2017
ef206db
Revert "preview policy picker"
Feb 14, 2017
7a07eed
First commit enhanced app header
Feb 16, 2017
828964c
URL addressable policies
Feb 16, 2017
2d7745b
Restyle breadcrumb nav
Feb 16, 2017
de85678
Better error handling
Feb 17, 2017
3409b49
earlier versions of vault return 400 instead of 403
Feb 17, 2017
168adbb
Add babel eslint parser
Feb 17, 2017
4b052da
Redesign welcome screen
Feb 17, 2017
21616a4
set returnto querystring for post-login redirection
Feb 17, 2017
ac71bb6
Integrate wrapping in generic secret backend
Feb 18, 2017
0af5e0b
eslint cleanups
Feb 18, 2017
8f6fde5
ResponseWrapper integration with shared Wrapper component
Feb 18, 2017
f52b176
Consolidate layout for settings and github components
Feb 18, 2017
b119d5d
Integrate policypicker in token backend component
Feb 18, 2017
c108baa
add test unprivileged user
Feb 18, 2017
6b5ec81
small layout fixes
Feb 19, 2017
c4b3fdd
Remove unused nodejs code
Feb 20, 2017
fcf5a5d
Fix tokens component layout
Feb 20, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
Expand All @@ -25,4 +26,4 @@
"react"
],
"extends": ["eslint:recommended", "plugin:react/recommended"]
}
}
25 changes: 23 additions & 2 deletions admin.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
path "*" {
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
{
"path": {
"*": {
"capabilities": [
"create",
"read",
"update",
"delete",
"list",
"sudo"
]
},
"ultrasecret/admincantlistthis/": {
"capabilities": [
"deny"
]
},
"ultrasecret/admincantreadthis": {
"capabilities": [
"deny"
]
}
}
}
55 changes: 29 additions & 26 deletions app/App.jsx
Original file line number Diff line number Diff line change
@@ -1,61 +1,64 @@
import React, { PropTypes } from 'react'
import React from 'react'
import ReactDOM from 'react-dom';
import Login from './components/Login/Login.jsx';
import { Router, Route, Link, browserHistory } from 'react-router'
import { Router, Route, browserHistory } from 'react-router'
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import App from './components/App/App.jsx';
import Secrets from './components/Secrets/Secrets.jsx';
import Health from './components/Health/Health.jsx';
import Policies from './components/Policies/Home.jsx';
import SecretsGeneric from './components/Secrets/Generic/Generic.jsx';
import PolicyManager from './components/Policies/Manage.jsx';
import Settings from './components/Settings/Settings.jsx';
import ResponseWrapper from './components/ResponseWrapper/ResponseWrapper.jsx';
import TokenManage from './components/Tokens/Manage.jsx'
import TokenAuthBackend from './components/Authentication/Token/Token.jsx';
import AwsEc2AuthBackend from './components/Authentication/AwsEc2/AwsEc2.jsx';
import GithubAuthBackend from './components/Authentication/Github/Github.jsx';
import SecretUnwrapper from './components/shared/Wrapping/Unwrapper';

injectTapEventPlugin();

(function () {

if ( typeof window.CustomEvent === "function" ) return false;
if (typeof window.CustomEvent === "function") return false;

function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
function CustomEvent(event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
}

CustomEvent.prototype = window.Event.prototype;
CustomEvent.prototype = window.Event.prototype;

window.CustomEvent = CustomEvent;
window.CustomEvent = CustomEvent;
})();

const checkAccessToken = (nextState, replace, callback) => {
let vaultAuthToken = window.localStorage.getItem('vaultAccessToken');
if (!vaultAuthToken) {
replace(`/login`)
replace(`/login?returnto=${encodeURI(nextState.location.pathname)}`)
}

callback();
}

const muiTheme = getMuiTheme({
fontFamily: 'Source Sans Pro, sans-serif'
fontFamily: 'Source Sans Pro, sans-serif',
});

ReactDOM.render((
<MuiThemeProvider muiTheme={muiTheme}>
<Router history={browserHistory}>
<Route path="/login" component={Login}/>
<Route path="/login" component={Login} />
<Route path="/unwrap" component={SecretUnwrapper} />
<Route path="/" component={App} onEnter={checkAccessToken}>
<Route path="/secrets" component={Secrets}>
<Route path="**" component={Secrets}/>
</Route>
<Route path="/health" component={Health}/>
<Route path="/settings" component={Settings}/>
<Route path="/responsewrapper" component={ResponseWrapper}/>
<Route path="/policies/:policy" component={Policies}/>
<Route path="/tokens" component={TokenManage}/>
<Route path="/secrets/generic/:namespace(/**)" component={SecretsGeneric} />
<Route path="/auth/token/:namespace" component={TokenAuthBackend} />
<Route path="/auth/aws-ec2/:namespace" component={AwsEc2AuthBackend} />
<Route path="/auth/github/:namespace" component={GithubAuthBackend} />
<Route path="/settings" component={Settings} />
<Route path="/responsewrapper" component={ResponseWrapper} />
<Route path="/sys/policies(/**)" component={PolicyManager} />
</Route>
</Router>
</MuiThemeProvider>
Expand Down
Loading