Skip to content

Commit 11e5fb9

Browse files
committed
version rev to 1.3.3
1 parent 092fbb7 commit 11e5fb9

File tree

7 files changed

+101
-32
lines changed

7 files changed

+101
-32
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python bindings for Carbon Black REST API
22

3-
**Current version: 1.3.2**
3+
**Current version: 1.3.3**
44

55
[![Build Status](https://travis-ci.org/carbonblack/cbapi-python.svg?branch=master)](https://travis-ci.org/carbonblack/cbapi-python)
66

@@ -29,8 +29,8 @@ Backwards compatibility with old scripts is maintained through the `cbapi.legacy
2929
`cbapi.CbApi` directly will continue to work. Once cbapi 2.0.0 is released, the old `CbApi` will be deprecated and
3030
removed entirely no earlier than January 2017.
3131

32-
New scripts should use the `cbapi.CbEnterpriseResponseAPI` (for Carbon Black "Enterprise Response") and
33-
`cbapi.CbEnterpriseProtectionAPI` (for Carbon Black "Enterprise Protection" / former Bit9) API entry points.
32+
New scripts should use the `cbapi.CbResponseAPI` (for Cb Response) and
33+
`cbapi.CbProtectionAPI` (for Cb Protection / former Bit9) API entry points.
3434

3535
## Getting Started
3636

bin/cbapi

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env python
2+
3+
import argparse
4+
import contextlib
5+
6+
from cbapi.six import iteritems
7+
import sys
8+
from cbapi.utils import check_python_tls_compatibility
9+
10+
11+
def check_tls(opts):
12+
print("Newest TLS version supported by this platform is: {0}.".format(check_python_tls_compatibility()))
13+
14+
15+
command_map = {
16+
"check-tls": {
17+
"extra_args": {},
18+
"help": "Return the latest version of TLS supported by this version of Python and OpenSSL. "
19+
"Cb Response versions 6.1+ now require TLSv1.2 support.",
20+
"method": check_tls
21+
}
22+
}
23+
24+
25+
def main(args):
26+
parser = argparse.ArgumentParser()
27+
commands = parser.add_subparsers(dest="command_name", help="CbAPI subcommand")
28+
29+
for cmd_name, cmd_config in iteritems(command_map):
30+
cmd_parser = commands.add_parser(cmd_name, help=cmd_config.get("help", None))
31+
for cmd_arg_name, cmd_arg_config in iteritems(cmd_config.get("extra_args", {})):
32+
cmd_parser.add_argument(cmd_arg_name, **cmd_arg_config)
33+
34+
opts = parser.parse_args(args)
35+
command = command_map.get(opts.command_name)
36+
if not command:
37+
parser.print_usage()
38+
return
39+
40+
command_method = command.get("method", None)
41+
if command_method:
42+
return command_method(opts)
43+
else:
44+
parser.print_usage()
45+
46+
47+
if __name__ == '__main__':
48+
sys.exit(main(sys.argv[1:]))

bin/cbapi-response

-10
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,11 @@ def configure(opts):
9393
print("Successfully wrote credentials to {0}.".format(credential_file))
9494

9595

96-
def check_tls(opts):
97-
print("Newest TLS version supported by this install is: {0}.".format(check_python_tls_compatibility()))
98-
99-
10096
command_map = {
10197
"configure": {
10298
"extra_args": {},
10399
"help": "Configure CbAPI",
104100
"method": configure
105-
},
106-
"check-tls": {
107-
"extra_args": {},
108-
"help": "Return the latest version of TLS supported by this version of Python and OpenSSL. "
109-
"Cb Response versions 6.1+ now require TLSv1.2 support.",
110-
"method": check_tls
111101
}
112102
}
113103

docs/changelog.rst

+47
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,53 @@
11
CbAPI Changelog
22
===============
33

4+
CbAPI 1.3.3 - Released September 1, 2017
5+
----------------------------------------
6+
7+
This release includes security improvements and bugfixes.
8+
9+
Security changes:
10+
11+
* CbAPI enforces the use of HTTPS when connecting to on-premise Cb Response servers.
12+
* CbAPI can optionally require TLSv1.2 when connecting to Carbon Black servers.
13+
14+
* Note that some versions of Python and OpenSSL, notably the version of OpenSSL packaged with Mac OS X, do not support
15+
TLSv1.2. This will cause CbAPI to fail to connect to Cb Response 6.1+ servers which require TLSv1.2 cipher suites.
16+
* A new command, ``cbapi check-tls``, will report the TLS version supported by your platform.
17+
* To enforce the use of TLSv1.2 when connecting to a server, add ``ssl_force_tls_1_2=True`` to that server's
18+
credential profile.
19+
20+
* Add the ability to "pin" a specific server certificate to a credential profile.
21+
22+
* You can now force TLS certificate verification on self-signed, on-premise installations of Cb Response or Protection
23+
through the ``ssl_cert_file`` option in the credential profile.
24+
* To "pin" a server certificate, save the PEM-formatted server certificate to a file, and put the full path to that
25+
PEM file in the ``ssl_cert_file`` option of that server's credential profile.
26+
* When using this option with on-premise Cb Response servers, you may also have to set
27+
``ssl_verify_hostname=False`` as the hostname in the certificate generated at install time is ``localhost`` and
28+
will not match the server's hostname or IP address. This option will still validate that the server's certificate
29+
is valid and matches the copy in the ``ssl_cert_file`` option.
30+
31+
Changes for Cb Protection:
32+
33+
* The API now sets the appropriate "GET" query fields when changing fields such as the ``debugFlags`` on the Computer
34+
object.
35+
* The ``.template`` attribute on the Computer model object has been renamed ``.templateComputer``.
36+
* Remove AppCatalog and AppTemplate model objects.
37+
38+
Changes for Cb Response:
39+
40+
* Added ``.webui_link`` property to Cb Response Query objects.
41+
42+
Bug Fixes:
43+
44+
* Error handling is improved on Python 3. Live Response auto-reconnect functionality is now fixed on Python 3 as
45+
a result.
46+
* Workaround implemented for Cb Response 6.1 where segment_ids are truncated on Alerts. The ``.process`` attribute on
47+
an Alert now ignores the ``segment_id`` and links to the first Process segment.
48+
* Fixed issue with ``Binary.signed`` and ``CbModLoadEvent.is_signed``.
49+
50+
451
CbAPI 1.3.2 - Released August 10, 2017
552
--------------------------------------
653

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
# The short X.Y version.
6262
version = u'1.3'
6363
# The full version, including alpha/beta/rc tags.
64-
release = u'1.3.2'
64+
release = u'1.3.3'
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
setup(
3030
name='cbapi',
31-
version='1.3.2',
31+
version='1.3.3',
3232
url='https://github.com/carbonblack/cbapi-python',
3333
license='MIT',
3434
author='Carbon Black',
@@ -47,5 +47,5 @@
4747
'Programming Language :: Python',
4848
'Topic :: Software Development :: Libraries :: Python Modules'
4949
],
50-
scripts=['bin/cbapi-response', 'bin/cbapi-protection', 'bin/cbapi-defense']
50+
scripts=['bin/cbapi-response', 'bin/cbapi-protection', 'bin/cbapi-defense', 'bin/cbapi']
5151
)

src/cbapi/protection/models.py

-16
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ class EnforcementLevel:
2020
LevelNone = 80
2121

2222

23-
class AppCatalog(NewBaseModel):
24-
urlobject = "/api/bit9platform/v1/appCatalog"
25-
26-
@classmethod
27-
def _minimum_server_version(cls):
28-
return LooseVersion("8.0")
29-
30-
3123
class ApprovalRequest(MutableModel):
3224
urlobject = "/api/bit9platform/v1/approvalRequest"
3325

@@ -64,14 +56,6 @@ def computer(self):
6456
return self._join(Computer, "computerId")
6557

6658

67-
class AppTemplate(MutableBaseModel):
68-
urlobject = "/api/bit9platform/v1/appTemplate"
69-
70-
@classmethod
71-
def _minimum_server_version(cls):
72-
return LooseVersion("8.0")
73-
74-
7559
class Certificate(MutableModel):
7660
urlobject = "/api/bit9platform/v1/certificate"
7761

0 commit comments

Comments
 (0)