Make insecure TLS connections configurable

Этот коммит содержится в:
JoramWilander
2016-02-05 12:40:32 -05:00
родитель 8c505e7b5c
Коммит 9f5f18a93a
9 изменённых файлов: 95 добавлений и 30 удалений

Просмотреть файл

@@ -75,6 +75,7 @@ class ServiceSettings extends React.Component {
config.ServiceSettings.EnableTesting = ReactDOM.findDOMNode(this.refs.EnableTesting).checked;
config.ServiceSettings.EnableDeveloper = ReactDOM.findDOMNode(this.refs.EnableDeveloper).checked;
config.ServiceSettings.EnableSecurityFixAlert = ReactDOM.findDOMNode(this.refs.EnableSecurityFixAlert).checked;
config.ServiceSettings.EnableInsecureOutgoingConnections = ReactDOM.findDOMNode(this.refs.EnableInsecureOutgoingConnections).checked;
config.ServiceSettings.EnableCommands = ReactDOM.findDOMNode(this.refs.EnableCommands).checked;
config.ServiceSettings.EnableOnlyAdminIntegrations = ReactDOM.findDOMNode(this.refs.EnableOnlyAdminIntegrations).checked;
@@ -717,6 +718,53 @@ class ServiceSettings extends React.Component {
</div>
</div>
<div className='form-group'>
<label
className='control-label col-sm-4'
htmlFor='EnableInsecureOutgoingConnections'
>
<FormattedMessage
id='admin.service.insecureTlsTitle'
defaultMessage='Enable Insecure Outgoing Connections: '
/>
</label>
<div className='col-sm-8'>
<label className='radio-inline'>
<input
type='radio'
name='EnableInsecureOutgoingConnections'
value='true'
ref='EnableInsecureOutgoingConnections'
defaultChecked={this.props.config.ServiceSettings.EnableInsecureOutgoingConnections}
onChange={this.handleChange}
/>
<FormattedMessage
id='admin.service.true'
defaultMessage='true'
/>
</label>
<label className='radio-inline'>
<input
type='radio'
name='EnableInsecureOutgoingConnections'
value='false'
defaultChecked={!this.props.config.ServiceSettings.EnableInsecureOutgoingConnections}
onChange={this.handleChange}
/>
<FormattedMessage
id='admin.service.false'
defaultMessage='false'
/>
</label>
<p className='help-text'>
<FormattedMessage
id='admin.service.insecureTlsDesc'
defaultMessage='When true, any outgoing HTTPS requests will accept unverified, self-signed certificates. For example, outgoing webhooks to a server with a self-signed TLS certificate, using any domain, will be allowed. Note that this makes these connections susceptible to man-in-the-middle attacks.'
/>
</p>
</div>
</div>
<div className='form-group'>
<label
className='control-label col-sm-4'
@@ -896,4 +944,4 @@ ServiceSettings.propTypes = {
config: React.PropTypes.object
};
export default injectIntl(ServiceSettings);
export default injectIntl(ServiceSettings);