@@ -69,11 +69,58 @@ Major Features
69
69
configuration for connecting to any number of Carbon Black Enterprise Protection or Response servers.
70
70
71
71
72
- Credentials
73
- -----------
72
+ API Credentials
73
+ ---------------
74
74
75
75
The new cbapi as of version 0.9.0 enforces the use of credential files.
76
76
77
+ In order to perform any queries via the API, you will need to get the API token for your Cb user. See the documentation
78
+ on the Developer Network website on how to acquire the API token for
79
+ `Enterprise Response <http://developer.carbonblack.com/reference/enterprise-response/authentication/ >`_ or
80
+ `Enterprise Protection <http://developer.carbonblack.com/reference/enterprise-protection/authentication/ >`_.
81
+
82
+ Once you acquire your API token, place it in one of the default credentials file locations:
83
+
84
+ * ``/etc/carbonblack/credentials.response `` (or ``.protection `` for Cb Enterprise Protection)
85
+ * ``~/.carbonblack/credentials.response ``
86
+ * (current working directory) ``.carbonblack/credentials.response ``
87
+
88
+ Credentials found in a later path will overwrite earlier ones.
89
+
90
+ The credentials are stored in INI format. The name of each credential profile is enclosed in square brackets, followed
91
+ by comma separated key-value pairs providing the necessary credential information::
92
+
93
+ [default]
94
+ url=https://localhost
95
+ token=abcdef0123456789abcdef
96
+ ssl_verify=False
97
+
98
+ [prod]
99
+ url=https://cbserver.prod.corp.com
100
+ token=aaaaaa
101
+ ssl_verify=True
102
+
103
+ [otheruser]
104
+ url=https://localhost
105
+ token=bbbbbb
106
+ ssl_verify=False
107
+
108
+ The possible options for each credential profile are:
109
+
110
+ * **url **: The base URL of the Cb server. This should include the protocol (https) and the hostname, and nothing else.
111
+ * **token **: The API token for the user ID. More than one credential profile can be specified for a given server, with
112
+ different tokens for each.
113
+ * **ssl_verify **: True or False; controls whether the SSL/TLS certificate presented by the server is validated against
114
+ the local trusted CA store.
115
+ * **proxy **: A proxy specification that will be used when connecting to the Cb server. The format is:
116
+ ``http://myusername:mypassword@proxy.company.com:8001/ `` where the hostname of the proxy is ``proxy.company.com ``, port
117
+ 8001, and using username/password ``myusername `` and ``mypassword `` respectively.
118
+ * **ignore_system_proxy **: If you have a system-wide proxy specified, setting this to True will force cbapi to bypass
119
+ the proxy and directly connect to the Cb server.
120
+
121
+ Future versions of cbapi will also provide the ability to "pin" the TLS certificate so as to provide certificate
122
+ verification on self-signed or internal CA signed certificates.
123
+
77
124
Backwards Compatibility
78
125
-----------------------
79
126
@@ -87,9 +134,9 @@ Since the old API was not compatible with Python 3, the legacy package is not im
87
134
legacy scripts cannot run under Python 3.
88
135
89
136
Once cbapi 2.0.0 is released, the old :py:mod: `cbapi.legacy.CbApi ` will be deprecated and removed entirely no earlier than January 2017.
90
- New scripts should use the :py:mod: `cbapi.CbEnterpriseResponseAPI ` (for Carbon Black Enterprise Response) and
91
- :py:mod: ` cbapi.CbEnterpriseProtectionAPI ` (for Carbon Black Enterprise Protection / former Bit9 Parity) API entry points.
92
-
137
+ New scripts should use the :py:mod: `cbapi.response.rest_api. CbEnterpriseResponseAPI `
138
+ (for Carbon Black Enterprise Response) and :py:mod: ` cbapi.protection.rest_api.CbEnterpriseProtectionAPI `
139
+ (for Carbon Black Enterprise Protection / former Bit9 Parity) API entry points.
93
140
94
141
95
142
Contents:
@@ -98,6 +145,8 @@ Contents:
98
145
:maxdepth: 2
99
146
100
147
enterprise-response
148
+ enterprise-protection
149
+ exceptions
101
150
102
151
103
152
0 commit comments