Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Commit 179c31d

Browse files
authored
chore: Move auth plugins into compass connect, remove x509 username COMPASS-4600 (#263)
1 parent 21f0494 commit 179c31d

25 files changed

+765
-374
lines changed

electron/renderer/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import ReactDOM from 'react-dom';
33
import app from 'hadron-app';
44
import AppRegistry from 'hadron-app-registry';
55
import { AppContainer } from 'react-hot-loader';
6-
import { activate as activateKerberos } from '@mongodb-js/compass-auth-kerberos';
7-
import { activate as activateLdap } from '@mongodb-js/compass-auth-ldap';
8-
import { activate as activateX509 } from '@mongodb-js/compass-auth-x509';
96
import { activate as activateCompassStatus } from '@mongodb-js/compass-status';
107

118
import CompassConnectPlugin, { activate } from '../../src';
@@ -23,9 +20,6 @@ global.hadronApp.appRegistry = appRegistry;
2320

2421
// Activate our plugin with the Hadron App Registry
2522
activate(appRegistry);
26-
activateKerberos(appRegistry);
27-
activateLdap(appRegistry);
28-
activateX509(appRegistry);
2923
activateCompassStatus(appRegistry);
3024
appRegistry.onActivated();
3125

package-lock.json

Lines changed: 5 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,9 @@
4747
"react": "^16.8.0",
4848
"react-dom": "^16.8.0",
4949
"react-bootstrap": "^0.32.1",
50-
"react-fontawesome": "^1.6.1",
51-
"react-ios-switch": "^0.1.19"
50+
"react-fontawesome": "^1.6.1"
5251
},
5352
"devDependencies": {
54-
"@mongodb-js/compass-auth-kerberos": "^4.0.2",
55-
"@mongodb-js/compass-auth-ldap": "^4.0.0",
56-
"@mongodb-js/compass-auth-x509": "^4.1.0",
5753
"@mongodb-js/compass-status": "^4.0.0",
5854
"autoprefixer": "^9.4.6",
5955
"babel-cli": "^6.26.0",
@@ -123,7 +119,6 @@
123119
"react-dom": "^16.8.0",
124120
"react-fontawesome": "^1.6.1",
125121
"react-hot-loader": "^4.1.0",
126-
"react-ios-switch": "^0.1.19",
127122
"reflux": "^6.4.1",
128123
"reflux-state-mixin": "^0.7.0",
129124
"rimraf": "^3.0.0",
@@ -145,6 +140,7 @@
145140
"dependencies": {
146141
"@leafygreen-ui/button": "^10.0.1",
147142
"@leafygreen-ui/typography": "^7.3.2",
148-
"lodash": "^4.17.15"
143+
"lodash": "^4.17.15",
144+
"react-ios-switch": "^0.1.19"
149145
}
150146
}

src/actions/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const Actions = Reflux.createActions({
99
onAuthStrategyChanged: { sync: true },
1010
onCancelConnectionAttemptClicked: { sync: true },
1111
onChangeViewClicked: { sync: true },
12+
onCnameToggle: { sync: true },
1213
onConnectionFormChanged: { sync: true },
1314
onConnectClicked: { sync: true },
1415
onCreateFavoriteClicked: { sync: true },
@@ -26,6 +27,10 @@ const Actions = Reflux.createActions({
2627
onChangesDiscarded: { sync: true },
2728
onHideURIClicked: { sync: true },
2829
onHostnameChanged: { sync: true },
30+
onKerberosPrincipalChanged: { sync: true },
31+
onKerberosServiceNameChanged: { sync: true },
32+
onLDAPPasswordChanged: { sync: true },
33+
onLDAPUsernameChanged: { sync: true },
2934
onPasswordChanged: { sync: true },
3035
onPortChanged: { sync: true },
3136
onReadPreferenceChanged: { sync: true },

src/components/connect.less

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -733,81 +733,6 @@ label {
733733
border: 1px solid rgba(0, 0, 0, 0.24);
734734
}
735735

736-
// Global styles for compass-auth-kerberos, compass-auth-ldap,
737-
// and compass-auth-x509 plugins
738-
:global {
739-
.form-item {
740-
margin: 15px auto 15px;
741-
width: 500px;
742-
overflow: auto;
743-
display: flex;
744-
justify-content: flex-end;
745-
746-
&-has-error {
747-
.form-control {
748-
border: 1px solid #843534;
749-
750-
&:focus {
751-
border: 1px solid #843534;
752-
}
753-
}
754-
755-
label {
756-
color: red;
757-
758-
i {
759-
margin-right: 5px;
760-
}
761-
}
762-
763-
.form-item-file-button {
764-
border: 1px solid #843534;
765-
}
766-
}
767-
768-
label {
769-
width: 70%;
770-
text-align: right;
771-
padding: 5px 15px 0 0;
772-
}
773-
774-
&-switch-wrapper {
775-
width: 100%;
776-
}
777-
778-
&-file-button {
779-
width: 500px !important;
780-
781-
i {
782-
padding-right: 5px;
783-
}
784-
785-
i.help {
786-
display: inline-block;
787-
font: normal normal normal 14px/1 FontAwesome;
788-
font-size: inherit;
789-
text-rendering: auto;
790-
margin: 0 5px;
791-
cursor: pointer;
792-
color: #bfbfbe;
793-
794-
:hover {
795-
color: #fbb129;
796-
}
797-
}
798-
}
799-
}
800-
801-
.file-input {
802-
width: 0.1px;
803-
height: 0.1px;
804-
opacity: 0;
805-
overflow: hidden;
806-
position: absolute;
807-
z-index: -1;
808-
}
809-
}
810-
811736
.confirm-edit-modal-button {
812737
margin-left: 5px;
813738
}

src/components/form/authentication.jsx

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)