Skip to content

Commit 1e52539

Browse files
author
Waley Chen
committed
Merge pull request #225 from 10gen/INT-849-ssl-field-touchup
INT-849 label renames, order of fields, principal regex
2 parents b7dfebe + f0e46a6 commit 1e52539

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

src/connect/authentication.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ var KERBEROS = {
5151
// enabled: app.isFeatureEnabled('Connect with Kerberos'),
5252
enabled: true,
5353
fields: [
54-
new InputView({
55-
template: inputTemplate,
56-
name: 'kerberos_service_name',
57-
label: 'Kerberos Service Name',
58-
placeholder: 'mongodb',
59-
required: false
60-
}),
6154
new InputView({
6255
template: inputTemplate,
6356
name: 'kerberos_principal',
64-
label: 'Kerberos Principal',
57+
label: 'Principal',
6558
placeholder: '',
66-
required: true
59+
required: true,
60+
tests: [
61+
function(value) {
62+
if (!value.match(/\S+@\S+/)) {
63+
return 'Principal must contain a realm, e.g. user@REALM';
64+
}
65+
}
66+
]
6767
}),
6868
new InputView({
6969
template: inputTemplate,
@@ -72,6 +72,13 @@ var KERBEROS = {
7272
label: 'Password',
7373
placeholder: '',
7474
required: false
75+
}),
76+
new InputView({
77+
template: inputTemplate,
78+
name: 'kerberos_service_name',
79+
label: 'Service Name',
80+
placeholder: 'mongodb',
81+
required: false
7582
})
7683
]
7784
};

src/connect/ssl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ var ALL = {
6363
}),
6464
new FileReaderView({
6565
name: 'ssl_private_key',
66-
label: 'Client Certificate Key',
66+
label: 'Client Private Key',
6767
required: true
6868
}),
6969
new FileReaderView({
@@ -74,7 +74,7 @@ var ALL = {
7474
new InputView({
7575
template: inputTemplate,
7676
name: 'ssl_private_key_password',
77-
label: 'Client Key Password',
77+
label: 'Private Key Password',
7878
required: false
7979
})
8080
]

0 commit comments

Comments
 (0)