conjur-asset-ui 1.4.2 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +8 -3
- data/CHANGELOG.md +10 -0
- data/Makefile +19 -0
- data/README.md +0 -3
- data/Rakefile +22 -17
- data/TODO.md +0 -23
- data/app/.csscomb.json +304 -0
- data/app/.eslintignore +3 -0
- data/app/.eslintrc +265 -0
- data/app/config/preprocessor.js +19 -0
- data/app/config/webpack.js +124 -0
- data/app/gulpfile.js +96 -0
- data/app/package.json +86 -0
- data/app/src/actions.js +550 -0
- data/app/src/app.js +83 -0
- data/app/src/clients/audit.js +34 -0
- data/app/src/clients/auth.js +24 -0
- data/app/src/clients/generic.js +52 -0
- data/app/src/clients/graph.js +7 -0
- data/app/src/clients/layer_members.js +18 -0
- data/app/src/clients/list.js +31 -0
- data/app/src/clients/members.js +20 -0
- data/app/src/clients/request.js +531 -0
- data/app/src/clients/search.js +5 -0
- data/app/src/components/app/__tests__/app-test.js +22 -0
- data/app/src/components/app/app.js +36 -0
- data/app/src/components/app/wrapper.js +17 -0
- data/app/src/components/audit/__tests__/table_header-test.js +22 -0
- data/app/src/components/audit/box.js +9 -0
- data/app/src/components/audit/constants.js +5 -0
- data/app/src/components/audit/entry.js +105 -0
- data/app/src/components/audit/fields_mixin.js +11 -0
- data/app/src/components/audit/humanize_event.js +213 -0
- data/app/src/components/audit/table.js +64 -0
- data/app/src/components/audit/table_header.js +37 -0
- data/app/src/components/audit/timestamp.js +28 -0
- data/app/src/components/auth/login.js +177 -0
- data/app/src/components/auth/login.less +71 -0
- data/app/src/components/auth/logout.js +42 -0
- data/app/src/components/auth/logout.less +21 -0
- data/app/src/components/chart/chart.js +540 -0
- data/app/src/components/chart/chart_helper_mixin.js +78 -0
- data/app/src/components/custom/list.js +3 -0
- data/app/src/components/custom/view.js +81 -0
- data/app/src/components/dashboard/activity.js +144 -0
- data/app/src/components/dashboard/dashboard.js +46 -0
- data/app/src/components/flash/flash.js +98 -0
- data/app/src/components/flash/flash.less +3 -0
- data/app/src/components/generic/__tests__/time-test.js +42 -0
- data/app/src/components/generic/annotations.js +39 -0
- data/app/src/components/generic/breadcrumbs.js +57 -0
- data/app/src/components/generic/foldable_audit_section.js +204 -0
- data/app/src/components/generic/list.js +141 -0
- data/app/src/components/generic/list_factory.js +41 -0
- data/app/src/components/generic/resource_link.js +64 -0
- data/app/src/components/generic/role_link.js +66 -0
- data/app/src/components/generic/tab_mixin.js +146 -0
- data/app/src/components/generic/time.js +32 -0
- data/app/src/components/graph/__tests__/collapse-test.js +133 -0
- data/app/src/components/graph/__tests__/edges-from-vertices-test.js +48 -0
- data/app/src/components/graph/__tests__/new-vertex-set-test.js +16 -0
- data/app/src/components/graph/__tests__/next-id-test.js +27 -0
- data/app/src/components/graph/__tests__/role-kind-from-id-test.js +24 -0
- data/app/src/components/graph/__tests__/vertices-from-edges-test.js +72 -0
- data/app/src/components/graph/graph.js +449 -0
- data/app/src/components/graph/graph.less +39 -0
- data/app/src/components/graph/helpers.js +368 -0
- data/app/src/components/group/list.js +3 -0
- data/app/src/components/group/view.js +153 -0
- data/app/src/components/host/activity.js +111 -0
- data/app/src/components/host/details.js +28 -0
- data/app/src/components/host/executors.js +77 -0
- data/app/src/components/host/host_link.js +18 -0
- data/app/src/components/host/list.js +3 -0
- data/app/src/components/host/updaters.js +77 -0
- data/app/src/components/host/view.js +145 -0
- data/app/src/components/layer/list.js +3 -0
- data/app/src/components/layer/view.js +197 -0
- data/app/src/components/navbar/__tests__/navbar-test.js +21 -0
- data/app/src/components/navbar/nav_search_form.js +40 -0
- data/app/src/components/navbar/navbar.js +96 -0
- data/app/src/components/notfound/notfound.js +35 -0
- data/app/src/components/notfound/notfound.less +21 -0
- data/app/src/components/owned_resources/owned_resources.js +84 -0
- data/app/src/components/owned_resources/owned_resources_box.js +101 -0
- data/app/src/components/permissions/permissions.js +138 -0
- data/app/src/components/permissions/permissions_table.js +101 -0
- data/app/src/components/policy/list.js +3 -0
- data/app/src/components/policy/view.js +107 -0
- data/app/src/components/refresh/refresh.js +29 -0
- data/app/src/components/refresh/refresh.less +15 -0
- data/app/src/components/search/group.js +43 -0
- data/app/src/components/search/group_heading.js +50 -0
- data/app/src/components/search/group_title.js +37 -0
- data/app/src/components/search/result_item.js +55 -0
- data/app/src/components/search/search.js +118 -0
- data/app/src/components/user/activity.js +112 -0
- data/app/src/components/user/details.js +30 -0
- data/app/src/components/user/list.js +3 -0
- data/app/src/components/user/pubkeys.js +118 -0
- data/app/src/components/user/pubkeys.less +56 -0
- data/app/src/components/user/view.js +143 -0
- data/app/src/components/variable/activity.js +101 -0
- data/app/src/components/variable/details.js +46 -0
- data/app/src/components/variable/fetchers.js +77 -0
- data/app/src/components/variable/list.js +3 -0
- data/app/src/components/variable/updaters.js +77 -0
- data/app/src/components/variable/view.js +115 -0
- data/app/src/constants.js +36 -0
- data/{public → app/src}/images/conjur-logo.svg +0 -0
- data/{public → app/src}/images/icon-client-pc.svg +0 -0
- data/{public → app/src}/images/icon-environment.png +0 -0
- data/{public → app/src}/images/icon-person.svg +0 -0
- data/{public → app/src}/images/icon-policy.png +0 -0
- data/{public → app/src}/images/icon-resource.png +0 -0
- data/{public → app/src}/images/icon-service-dots.svg +0 -0
- data/{public → app/src}/images/icon-variable.png +0 -0
- data/app/src/pages/index.html +27 -0
- data/app/src/routes.js +64 -0
- data/app/src/stores/app_store.js +35 -0
- data/app/src/stores/audit_store.js +143 -0
- data/app/src/stores/graph_store.js +51 -0
- data/app/src/stores/group_store.js +104 -0
- data/app/src/stores/host_store.js +111 -0
- data/app/src/stores/layer_store.js +115 -0
- data/app/src/stores/policy_store.js +88 -0
- data/app/src/stores/resources_store.js +115 -0
- data/app/src/stores/route_store.js +21 -0
- data/app/src/stores/search_store.js +77 -0
- data/app/src/stores/user_store.js +109 -0
- data/app/src/stores/variable_store.js +93 -0
- data/app/src/styles/bootstrap.less +54 -0
- data/{public/css → app/src/styles}/styles.less +26 -82
- data/app/src/utils.js +38 -0
- data/app/src/vendor/pace.js +2 -0
- data/conjur-asset-ui.gemspec +3 -4
- data/docker/assets-build/Dockerfile +12 -0
- data/docker/conjur-ui/Dockerfile +33 -0
- data/docker/conjur-ui/README.md +38 -0
- data/docker/conjur-ui/mime.types +90 -0
- data/docker/conjur-ui/nginx.conf +110 -0
- data/docker/conjur-ui/start.py +72 -0
- data/docker/conjur-ui/start.sh +18 -0
- data/docker/conjur-ui/test.env +8 -0
- data/lib/conjur-asset-ui-version.rb +1 -1
- data/lib/conjur/command/ui.rb +10 -2
- data/lib/conjur/webserver/home.rb +3 -3
- data/lib/conjur/webserver/login.rb +1 -1
- data/lib/conjur/webserver/server.rb +16 -4
- data/public/js/views/roleGraph.js +91 -0
- metadata +167 -105
- data/.jshintrc +0 -41
- data/bower.json +0 -98
- data/gulpfile.js +0 -139
- data/package.json +0 -47
- data/preprocessor.js +0 -7
- data/public/_client_libs.html +0 -9
- data/public/index.html.erb +0 -63
- data/public/js/init.js +0 -196
- data/public/js/lib/pace.js +0 -2
- data/public/js/lib/sorted-set.no-require.js +0 -1145
- data/public/js/lib/sorted-set.no-require.js.txt +0 -6
- data/public/js/models/groupRecord.js +0 -72
- data/public/js/models/hostRecord.js +0 -60
- data/public/js/models/layerRecord.js +0 -79
- data/public/js/models/namespace.js +0 -12
- data/public/js/models/policyList.js +0 -16
- data/public/js/models/policyRecord.js +0 -54
- data/public/js/models/record.js +0 -117
- data/public/js/models/resourceList.js +0 -87
- data/public/js/models/userList.js +0 -25
- data/public/js/models/userRecord.js +0 -75
- data/public/js/models/variableList.js +0 -27
- data/public/js/models/variableRecord.js +0 -77
- data/public/js/routers.js +0 -242
- data/public/js/views/annotations.js +0 -47
- data/public/js/views/audit.js +0 -369
- data/public/js/views/breadcrumbs.js +0 -62
- data/public/js/views/chart.js +0 -617
- data/public/js/views/dashboard.js +0 -146
- data/public/js/views/generic.js +0 -122
- data/public/js/views/group.js +0 -109
- data/public/js/views/groups.js +0 -26
- data/public/js/views/host.js +0 -200
- data/public/js/views/hosts.js +0 -26
- data/public/js/views/layer.js +0 -146
- data/public/js/views/layers.js +0 -26
- data/public/js/views/mixins/search.js +0 -22
- data/public/js/views/mixins/tabs.js +0 -154
- data/public/js/views/namespaces.js +0 -40
- data/public/js/views/navSearch.js +0 -36
- data/public/js/views/owned.js +0 -184
- data/public/js/views/permissions.js +0 -254
- data/public/js/views/policies.js +0 -26
- data/public/js/views/policy.js +0 -70
- data/public/js/views/resource.js +0 -59
- data/public/js/views/role.js +0 -63
- data/public/js/views/searchResults.js +0 -212
- data/public/js/views/sections.js +0 -226
- data/public/js/views/time.js +0 -39
- data/public/js/views/user.js +0 -297
- data/public/js/views/users.js +0 -26
- data/public/js/views/variable.js +0 -310
- data/public/js/views/variables.js +0 -26
- data/spec/javascripts/helpers/.gitkeep +0 -0
- data/spec/javascripts/support/jasmine.yml +0 -112
- data/spec/javascripts/support/jasmine_helper.rb +0 -22
- data/spec/javascripts/support/run.html.erb +0 -23
- data/spec/javascripts/views/AuditSpec.js +0 -22
- data/spec/javascripts/views/AuditSpec.ls +0 -18
@@ -0,0 +1,54 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Bootstrap CSS + Custom styles and overrides
|
3
|
+
// =============================================================================
|
4
|
+
|
5
|
+
// Core variables and mixins
|
6
|
+
@import "~bootstrap/less/variables.less";
|
7
|
+
@import "~bootstrap/less/mixins.less";
|
8
|
+
|
9
|
+
// Reset and dependencies
|
10
|
+
@import "~bootstrap/less/normalize.less";
|
11
|
+
@import "~bootstrap/less/print.less";
|
12
|
+
@import "~bootstrap/less/glyphicons.less";
|
13
|
+
|
14
|
+
// Core CSS
|
15
|
+
@import "~bootstrap/less/scaffolding.less";
|
16
|
+
@import "~bootstrap/less/type.less";
|
17
|
+
@import "~bootstrap/less/code.less";
|
18
|
+
@import "~bootstrap/less/grid.less";
|
19
|
+
@import "~bootstrap/less/tables.less";
|
20
|
+
@import "~bootstrap/less/forms.less";
|
21
|
+
@import "~bootstrap/less/buttons.less";
|
22
|
+
|
23
|
+
// Components
|
24
|
+
@import "~bootstrap/less/component-animations.less";
|
25
|
+
@import "~bootstrap/less/dropdowns.less";
|
26
|
+
@import "~bootstrap/less/button-groups.less";
|
27
|
+
@import "~bootstrap/less/input-groups.less";
|
28
|
+
@import "~bootstrap/less/navs.less";
|
29
|
+
@import "~bootstrap/less/navbar.less";
|
30
|
+
@import "~bootstrap/less/breadcrumbs.less";
|
31
|
+
@import "~bootstrap/less/pagination.less";
|
32
|
+
@import "~bootstrap/less/pager.less";
|
33
|
+
@import "~bootstrap/less/labels.less";
|
34
|
+
@import "~bootstrap/less/badges.less";
|
35
|
+
@import "~bootstrap/less/jumbotron.less";
|
36
|
+
@import "~bootstrap/less/thumbnails.less";
|
37
|
+
@import "~bootstrap/less/alerts.less";
|
38
|
+
@import "~bootstrap/less/progress-bars.less";
|
39
|
+
@import "~bootstrap/less/media.less";
|
40
|
+
@import "~bootstrap/less/list-group.less";
|
41
|
+
@import "~bootstrap/less/panels.less";
|
42
|
+
@import "~bootstrap/less/responsive-embed.less";
|
43
|
+
@import "~bootstrap/less/wells.less";
|
44
|
+
@import "~bootstrap/less/close.less";
|
45
|
+
|
46
|
+
// Components w/ JavaScript
|
47
|
+
@import "~bootstrap/less/modals.less";
|
48
|
+
@import "~bootstrap/less/tooltip.less";
|
49
|
+
@import "~bootstrap/less/popovers.less";
|
50
|
+
@import "~bootstrap/less/carousel.less";
|
51
|
+
|
52
|
+
// Utility classes
|
53
|
+
@import "~bootstrap/less/utilities.less";
|
54
|
+
@import "~bootstrap/less/responsive-utilities.less";
|
@@ -26,11 +26,16 @@ h6,
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
|
30
|
+
.navbar-brand {
|
31
|
+
background-image: url('/images/conjur-logo.svg');
|
32
|
+
background-size: cover;
|
33
|
+
background-repeat: no-repeat;
|
34
|
+
width: 137px;
|
35
|
+
margin-left: -9px !important;
|
36
|
+
text-indent: 100%;
|
37
|
+
white-space: nowrap;
|
38
|
+
overflow: hidden;
|
34
39
|
}
|
35
40
|
|
36
41
|
#bottom {
|
@@ -382,32 +387,29 @@ section.permissions {
|
|
382
387
|
// Styleguide 3.
|
383
388
|
@pace-color: @highlight-color;
|
384
389
|
|
385
|
-
.pace
|
386
|
-
|
390
|
+
.pace {
|
391
|
+
-webkit-pointer-events: none;
|
392
|
+
pointer-events: none;
|
393
|
+
-webkit-user-select: none;
|
394
|
+
-moz-user-select: none;
|
395
|
+
user-select: none;
|
387
396
|
}
|
388
397
|
|
389
|
-
.pace {
|
390
|
-
|
391
|
-
|
392
|
-
-webkit-user-select: none;
|
393
|
-
-moz-user-select: none;
|
394
|
-
user-select: none;
|
398
|
+
.pace-inactive {
|
399
|
+
display: none;
|
400
|
+
}
|
395
401
|
|
396
|
-
|
402
|
+
.pace .pace-progress {
|
397
403
|
background: @pace-color;
|
398
404
|
position: fixed;
|
399
405
|
z-index: 2000;
|
400
406
|
top: 0;
|
401
|
-
|
407
|
+
right: 100%;
|
408
|
+
width: 100%;
|
402
409
|
height: 2px;
|
410
|
+
}
|
403
411
|
|
404
|
-
|
405
|
-
-moz-transition: width 1s;
|
406
|
-
-o-transition: width 1s;
|
407
|
-
transition: width 1s;
|
408
|
-
}
|
409
|
-
|
410
|
-
.pace-progress-inner {
|
412
|
+
.pace .pace-progress-inner {
|
411
413
|
display: block;
|
412
414
|
position: absolute;
|
413
415
|
right: 0px;
|
@@ -420,9 +422,9 @@ section.permissions {
|
|
420
422
|
-ms-transform: rotate(3deg) translate(0px, -4px);
|
421
423
|
-o-transform: rotate(3deg) translate(0px, -4px);
|
422
424
|
transform: rotate(3deg) translate(0px, -4px);
|
423
|
-
|
425
|
+
}
|
424
426
|
|
425
|
-
|
427
|
+
.pace .pace-activity {
|
426
428
|
background-image: url('/images/icon-service-dots.svg');
|
427
429
|
background-size: contain;
|
428
430
|
background-repeat: no-repeat;
|
@@ -439,7 +441,6 @@ section.permissions {
|
|
439
441
|
-ms-animation: pace-pulse 1s alternate infinite none cubic-bezier(1, 0, 0.73, 1);
|
440
442
|
-o-animation: pace-pulse 1s alternate infinite none cubic-bezier(1, 0, 0.73, 1);
|
441
443
|
animation: pace-pulse 1s alternate infinite none cubic-bezier(1, 0, 0.73, 1);
|
442
|
-
}
|
443
444
|
}
|
444
445
|
|
445
446
|
@-webkit-keyframes pace-pulse {
|
@@ -550,63 +551,6 @@ section.permissions {
|
|
550
551
|
height: 300px;
|
551
552
|
}
|
552
553
|
|
553
|
-
/* ---------------------------------- */
|
554
|
-
/* -Pubkeys-------------------------- */
|
555
|
-
|
556
|
-
.b-pubkeys {
|
557
|
-
|
558
|
-
}
|
559
|
-
|
560
|
-
.b-pubkeys__help {
|
561
|
-
|
562
|
-
}
|
563
|
-
|
564
|
-
.b-pubkeys__list {
|
565
|
-
padding-top: 10px;
|
566
|
-
}
|
567
|
-
|
568
|
-
.b-pubkeys__item {
|
569
|
-
|
570
|
-
}
|
571
|
-
|
572
|
-
.b-pubkeys__item--headline {
|
573
|
-
margin-bottom: 1px;
|
574
|
-
box-shadow: 0 2px 1px -2px gray;
|
575
|
-
}
|
576
|
-
|
577
|
-
.b-pubkey {
|
578
|
-
margin-right: 55px;
|
579
|
-
height: 20px;
|
580
|
-
}
|
581
|
-
|
582
|
-
.b-pubkey__logo {
|
583
|
-
display: inline-block;
|
584
|
-
width: 70px;
|
585
|
-
}
|
586
|
-
|
587
|
-
.b-pubkey__list {
|
588
|
-
display: inline-block;
|
589
|
-
}
|
590
|
-
|
591
|
-
.b-pubkey__name {
|
592
|
-
|
593
|
-
}
|
594
|
-
|
595
|
-
.b-pubkey__fingerprint {
|
596
|
-
|
597
|
-
}
|
598
|
-
|
599
|
-
.b-pubkey__info {
|
600
|
-
|
601
|
-
}
|
602
|
-
|
603
|
-
.b-pubkey__actions {
|
604
|
-
display: inline-block;
|
605
|
-
}
|
606
|
-
|
607
|
-
.b-chart-demo {
|
608
|
-
height: 300px;
|
609
|
-
}
|
610
554
|
|
611
555
|
/* ------------------------------------------------ */
|
612
556
|
/* Chart */
|
data/app/src/utils.js
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
export function pluralize(kind) {
|
2
|
+
if (kind[kind.length-1] === 'y') {
|
3
|
+
return kind.slice(0, kind.length-1) + 'ies';
|
4
|
+
} else if (kind[kind.length - 1] !== 's') {
|
5
|
+
return kind + 's';
|
6
|
+
} else {
|
7
|
+
return kind;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
// http://www.quirksmode.org/js/cookies.html
|
12
|
+
export function readCookie(name) {
|
13
|
+
const nameEQ = name + '=',
|
14
|
+
ca = document.cookie.split(';');
|
15
|
+
|
16
|
+
for (let i = 0; i < ca.length; i++) {
|
17
|
+
let c = ca[i];
|
18
|
+
|
19
|
+
while (c.charAt(0) === ' ') {
|
20
|
+
c = c.substring(1, c.length);
|
21
|
+
}
|
22
|
+
|
23
|
+
if (c.indexOf(nameEQ) === 0) {
|
24
|
+
return window.decodeURIComponent(
|
25
|
+
c.substring(nameEQ.length, c.length));
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
return null;
|
30
|
+
}
|
31
|
+
|
32
|
+
export function getTabname(header, set) {
|
33
|
+
if (!set || !set.length) {
|
34
|
+
return `${header} (0)`;
|
35
|
+
}
|
36
|
+
|
37
|
+
return `${header} (${set.length})`;
|
38
|
+
}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! pace 1.0.0 */
|
2
|
+
(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X=[].slice,Y={}.hasOwnProperty,Z=function(a,b){function c(){this.constructor=a}for(var d in b)Y.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},$=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(u={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},C=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new Date},E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==E&&(E=function(a){return setTimeout(a,50)},t=function(a){return clearTimeout(a)}),G=function(a){var b,c;return b=C(),(c=function(){var d;return d=C()-b,d>=33?(b=C(),a(d,function(){return E(c)})):setTimeout(c,33-d)})()},F=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?X.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},v=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?X.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)Y.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?v(b[a],e):b[a]=e);return b},q=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},x=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];c<this.bindings[a].length;)e.push(this.bindings[a][c].handler===b?this.bindings[a].splice(c,1):c++);return e}},a.prototype.trigger=function(){var a,b,c,d,e,f,g,h,i;if(c=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],null!=(g=this.bindings)?g[c]:void 0){for(e=0,i=[];e<this.bindings[c].length;)h=this.bindings[c][e],d=h.handler,b=h.ctx,f=h.once,d.apply(null!=b?b:this,a),i.push(f?this.bindings[c].splice(e,1):e++);return i}},a}(),j=window.Pace||{},window.Pace=j,v(j,g.prototype),D=j.options=v({},u,window.paceOptions,x()),U=["ajax","document","eventLag","elements"],Q=0,S=U.length;S>Q;Q++)K=U[Q],D[K]===!0&&(D[K]=u[K]);i=function(a){function b(){return V=b.__super__.constructor.apply(this,arguments)}return Z(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(D.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b,c,d,e,f,g;if(null==document.querySelector(D.target))return!1;for(a=this.getElement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkitTransform","msTransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setAttribute("data-progress",""+c)),this.lastRenderedProgress=this.progress},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),P=window.XMLHttpRequest,O=window.XDomainRequest,N=window.WebSocket,w=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],f.push(null==a[d]&&"function"!=typeof e?a[d]=e:void 0)}catch(g){c=g}return f},A=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("ignore"),c=b.apply(null,a),A.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("track"),c=b.apply(null,a),A.shift(),c},J=function(a){var b;if(null==a&&(a="GET"),"track"===A[0])return"force";if(!A.length&&D.ajax){if("socket"===a&&D.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),$.call(D.ajax.trackMethods,b)>=0)return!0}return!1},k=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return J(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new P(b),a(c),c};try{w(window.XMLHttpRequest,P)}catch(d){}if(null!=O){window.XDomainRequest=function(){var b;return b=new O,a(b),b};try{w(window.XDomainRequest,O)}catch(d){}}if(null!=N&&D.ajax.trackWebSockets){window.WebSocket=function(a,b){var d;return d=null!=b?new N(a,b):new N(a),J("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.WebSocket,N)}catch(d){}}}return Z(b,a),b}(h),R=null,y=function(){return null==R&&(R=new k),R},I=function(a){var b,c,d,e;for(e=D.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,I(g)?void 0:j.running||D.restartOnRequestAfter===!1&&"force"!==J(f)?void 0:(d=arguments,c=D.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(K=i[c],K instanceof a){K.watch.apply(K,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,I(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100},!1);else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),n=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100},!1)}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},D.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=C(),b=setInterval(function(){var g;return g=C()-c-50,c=C(),e.push(g),e.length>D.eventLag.sampleCount&&e.shift(),a=q(e),++d>=D.eventLag.minSamples&&a<D.eventLag.lagThreshold?(f.progress=100,clearInterval(b)):f.progress=100*(3/(a+3))},50)}return a}(),m=function(){function a(a){this.source=a,this.last=this.sinceLastUpdate=0,this.rate=D.initialRate,this.catchup=0,this.progress=this.lastProgress=0,null!=this.source&&(this.progress=F(this.source,"progress"))}return a.prototype.tick=function(a,b){var c;return null==b&&(b=F(this.source,"progress")),b>=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/D.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,D.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+D.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),L=null,H=null,r=null,M=null,p=null,s=null,j.running=!1,z=function(){return D.restartOnPushState?j.restart():void 0},null!=window.history.pushState&&(T=window.history.pushState,window.history.pushState=function(){return z(),T.apply(window.history,arguments)}),null!=window.history.replaceState&&(W=window.history.replaceState,window.history.replaceState=function(){return z(),W.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventLag:f},(B=function(){var a,c,d,e,f,g,h,i;for(j.sources=L=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],D[a]!==!1&&L.push(new l[a](D[a]));for(i=null!=(h=D.extraSources)?h:[],d=0,f=i.length;f>d;d++)K=i[d],L.push(new K(D));return j.bar=r=new b,H=[],M=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),B()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=C(),s=!1,p=G(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=L.length;u>q;i=++q)for(K=L[i],o=null!=H[i]?H[i]:H[i]=[],h=null!=(w=K.elements)?w:[K],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(M.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),setTimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},Math.max(D.ghostTime,Math.max(D.minTime-(C()-a),0)))):c()})},j.start=function(a){v(D,a),j.running=!0;try{r.render()}catch(b){i=b}return document.querySelector(".pace")?(j.trigger("start"),j.go()):setTimeout(j.start,50)},"function"==typeof define&&define.amd?define(function(){return j}):"object"==typeof exports?module.exports=j:D.startOnPageLoad&&j.start()}).call(this);
|
data/conjur-asset-ui.gemspec
CHANGED
@@ -13,25 +13,24 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.files = `git ls-files`.split($/) + `find
|
16
|
+
spec.files = `git ls-files`.split($/) + `find app/build`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "puma"
|
22
|
-
spec.add_dependency "conjur-api", ">= 4.10
|
22
|
+
spec.add_dependency "conjur-api", ">= 4.10"
|
23
23
|
spec.add_dependency "launchy"
|
24
24
|
spec.add_dependency "rack"
|
25
25
|
|
26
26
|
# we're monkey patching hackily, so fix the version
|
27
27
|
spec.add_dependency "rack-streaming-proxy", "= 2.0.1"
|
28
28
|
|
29
|
-
spec.add_development_dependency "conjur-cli"
|
29
|
+
spec.add_development_dependency "conjur-cli", ">=4.20"
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.3"
|
31
31
|
spec.add_development_dependency "rake"
|
32
32
|
spec.add_development_dependency "rspec"
|
33
33
|
spec.add_development_dependency "simplecov"
|
34
34
|
spec.add_development_dependency "spork"
|
35
35
|
spec.add_development_dependency "ci_reporter"
|
36
|
-
spec.add_development_dependency "jasmine"
|
37
36
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
FROM ubuntu:14.10
|
2
|
+
MAINTAINER Conjur Inc
|
3
|
+
|
4
|
+
EXPOSE 80 443
|
5
|
+
|
6
|
+
CMD /start.py
|
7
|
+
|
8
|
+
RUN apt-get update && \
|
9
|
+
apt-get --force-yes dist-upgrade -y && \
|
10
|
+
apt-get --force-yes autoremove -y
|
11
|
+
|
12
|
+
RUN apt-get install -y software-properties-common && \
|
13
|
+
add-apt-repository -y ppa:nginx/stable && \
|
14
|
+
apt-get update && \
|
15
|
+
apt-get install -y nginx-extras python-jinja2
|
16
|
+
|
17
|
+
RUN mkdir /tmp/nginx && touch /etc/nginx/cookies.conf
|
18
|
+
|
19
|
+
# forward request and error logs to docker log collector
|
20
|
+
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
|
21
|
+
ln -sf /dev/stderr /var/log/nginx/error.log
|
22
|
+
|
23
|
+
ADD start.py /start.py
|
24
|
+
|
25
|
+
RUN chmod a+x /start.py
|
26
|
+
RUN rm /etc/nginx/nginx.conf
|
27
|
+
|
28
|
+
# custom config
|
29
|
+
ADD nginx.conf /nginx.conf
|
30
|
+
ADD mime.types /etc/nginx/mime.types
|
31
|
+
|
32
|
+
# UI assets themself
|
33
|
+
ADD assets /usr/share/nginx/html
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Build:
|
2
|
+
|
3
|
+
copy assets to ./assets directory
|
4
|
+
|
5
|
+
docker build -t conjurinc/conjur-ui .
|
6
|
+
|
7
|
+
# Run
|
8
|
+
|
9
|
+
docker run -d -p 80:80 -e CONJUR_APPLIANCE_URL=https://ec2-54-211-139-100.compute-1.amazonaws.com conjurinc/conjur-ui
|
10
|
+
|
11
|
+
## Parameters
|
12
|
+
|
13
|
+
Parameters are passed as env variables to the container
|
14
|
+
|
15
|
+
### Mandatory
|
16
|
+
|
17
|
+
CONJUR_APPLIANCE_URL -- should consist of protocol(http/https) and hostname of Conjur appliance. No URI part.
|
18
|
+
|
19
|
+
### Optional
|
20
|
+
|
21
|
+
#### Login form pre-fill
|
22
|
+
CONJUR_USERNAME -- username to prefill login form
|
23
|
+
CONJUR_PASSWORD -- password to prefill login form
|
24
|
+
|
25
|
+
#### SSL certificate validation during connection to Conjur appliance
|
26
|
+
CONJUR_APPLIANCE_CA -- string containing CA certificate of the appliance to which container is expected to connect to; triggers SSL certificate validation between container and appliance
|
27
|
+
|
28
|
+
#### HTTPS for inbound connections
|
29
|
+
|
30
|
+
By default, container exposes it's interfaces via plain HTTP. This is convenient for local usage (e.g. when it's run on workstation), but is not very secure.
|
31
|
+
|
32
|
+
Following options force container to serve inbound connections over HTTPS
|
33
|
+
|
34
|
+
* SERVER_SSL_KEY -- string containing RSA private key
|
35
|
+
* SERVER_SSL_CRT -- string containing SSL certificate
|
36
|
+
* SERVER_HOSTNAME -- name of the server which clients use to connect (localhost by default)
|
37
|
+
* DH_PARAM_PEM -- string containing dh_param.pem (will be autogenerated on container launch otherwise, with length of 4096, and it takes significant time)
|
38
|
+
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
types {
|
3
|
+
text/html html htm shtml;
|
4
|
+
text/css css;
|
5
|
+
text/xml xml;
|
6
|
+
image/gif gif;
|
7
|
+
image/jpeg jpeg jpg;
|
8
|
+
application/javascript js;
|
9
|
+
application/atom+xml atom;
|
10
|
+
application/rss+xml rss;
|
11
|
+
application/json map;
|
12
|
+
|
13
|
+
text/mathml mml;
|
14
|
+
text/plain txt;
|
15
|
+
text/vnd.sun.j2me.app-descriptor jad;
|
16
|
+
text/vnd.wap.wml wml;
|
17
|
+
text/x-component htc;
|
18
|
+
|
19
|
+
image/png png;
|
20
|
+
image/tiff tif tiff;
|
21
|
+
image/vnd.wap.wbmp wbmp;
|
22
|
+
image/x-icon ico;
|
23
|
+
image/x-jng jng;
|
24
|
+
image/x-ms-bmp bmp;
|
25
|
+
image/svg+xml svg svgz;
|
26
|
+
image/webp webp;
|
27
|
+
|
28
|
+
application/font-woff woff;
|
29
|
+
application/java-archive jar war ear;
|
30
|
+
application/json json;
|
31
|
+
application/mac-binhex40 hqx;
|
32
|
+
application/msword doc;
|
33
|
+
application/pdf pdf;
|
34
|
+
application/postscript ps eps ai;
|
35
|
+
application/rtf rtf;
|
36
|
+
application/vnd.apple.mpegurl m3u8;
|
37
|
+
application/vnd.ms-excel xls;
|
38
|
+
application/vnd.ms-fontobject eot;
|
39
|
+
application/vnd.ms-powerpoint ppt;
|
40
|
+
application/vnd.wap.wmlc wmlc;
|
41
|
+
application/vnd.google-earth.kml+xml kml;
|
42
|
+
application/vnd.google-earth.kmz kmz;
|
43
|
+
application/x-7z-compressed 7z;
|
44
|
+
application/x-cocoa cco;
|
45
|
+
application/x-java-archive-diff jardiff;
|
46
|
+
application/x-java-jnlp-file jnlp;
|
47
|
+
application/x-makeself run;
|
48
|
+
application/x-perl pl pm;
|
49
|
+
application/x-pilot prc pdb;
|
50
|
+
application/x-rar-compressed rar;
|
51
|
+
application/x-redhat-package-manager rpm;
|
52
|
+
application/x-sea sea;
|
53
|
+
application/x-shockwave-flash swf;
|
54
|
+
application/x-stuffit sit;
|
55
|
+
application/x-tcl tcl tk;
|
56
|
+
application/x-x509-ca-cert der pem crt;
|
57
|
+
application/x-xpinstall xpi;
|
58
|
+
application/xhtml+xml xhtml;
|
59
|
+
application/xspf+xml xspf;
|
60
|
+
application/zip zip;
|
61
|
+
|
62
|
+
application/octet-stream bin exe dll;
|
63
|
+
application/octet-stream deb;
|
64
|
+
application/octet-stream dmg;
|
65
|
+
application/octet-stream iso img;
|
66
|
+
application/octet-stream msi msp msm;
|
67
|
+
|
68
|
+
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
|
69
|
+
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
|
70
|
+
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
|
71
|
+
|
72
|
+
audio/midi mid midi kar;
|
73
|
+
audio/mpeg mp3;
|
74
|
+
audio/ogg ogg;
|
75
|
+
audio/x-m4a m4a;
|
76
|
+
audio/x-realaudio ra;
|
77
|
+
|
78
|
+
video/3gpp 3gpp 3gp;
|
79
|
+
video/mp2t ts;
|
80
|
+
video/mp4 mp4;
|
81
|
+
video/mpeg mpeg mpg;
|
82
|
+
video/quicktime mov;
|
83
|
+
video/webm webm;
|
84
|
+
video/x-flv flv;
|
85
|
+
video/x-m4v m4v;
|
86
|
+
video/x-mng mng;
|
87
|
+
video/x-ms-asf asx asf;
|
88
|
+
video/x-ms-wmv wmv;
|
89
|
+
video/x-msvideo avi;
|
90
|
+
}
|