2017-05-28 19:49:41 -07:00
|
|
|
|
[/
|
2017-07-28 19:32:33 -07:00
|
|
|
|
Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
|
|
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
2017-07-28 19:32:33 -07:00
|
|
|
|
|
|
|
|
|
|
Official repository: https://github.com/boostorg/beast
|
2017-05-28 19:49:41 -07:00
|
|
|
|
]
|
|
|
|
|
|
|
2017-07-09 20:09:30 -07:00
|
|
|
|
[section Introduction]
|
2017-12-15 09:00:44 -08:00
|
|
|
|
[block'''<?dbhtml stop-chunking?>''']
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-12 05:01:24 -07:00
|
|
|
|
Beast is a C++ header-only library serving as a foundation for writing
|
|
|
|
|
|
interoperable networking libraries by providing [*low-level HTTP/1,
|
|
|
|
|
|
WebSocket, and networking protocol] vocabulary types and algorithms
|
|
|
|
|
|
using the consistent asynchronous model of __Asio__.
|
2017-06-04 17:25:55 -07:00
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
|
This library is designed for:
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-11 09:59:13 -07:00
|
|
|
|
* [*Symmetry:] Algorithms are role-agnostic; build clients, servers, or both.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
|
* [*Ease of Use:] __Asio__ users will immediately understand Beast.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
|
* [*Flexibility:] Users make the important decisions such as buffer or
|
2017-05-28 19:49:41 -07:00
|
|
|
|
thread management.
|
|
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
|
* [*Performance:] Build applications handling thousands of connections or more.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-11 09:59:13 -07:00
|
|
|
|
* [*Basis for Further Abstraction.] Components are well-suited for building upon.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-10-26 16:05:50 -07:00
|
|
|
|
This library is not a client or server, but it can be used to build those
|
|
|
|
|
|
things. Many examples are provided, including clients and servers, which may
|
|
|
|
|
|
be used as a starting point for writing your own program.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
|
[heading Motivation]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-12 05:01:24 -07:00
|
|
|
|
Beast empowers users to create their own libraries, clients, and servers
|
|
|
|
|
|
using HTTP/1 and WebSocket. Code will be easier and faster to implement,
|
|
|
|
|
|
understand, and maintain, because Beast takes care of the low-level
|
|
|
|
|
|
protocol details.
|
2017-06-07 16:30:49 -07:00
|
|
|
|
The HTTP and WebSocket protocols drive most of the World Wide Web.
|
|
|
|
|
|
Every web browser implements these protocols to load webpages and
|
|
|
|
|
|
to enable client side programs (often written in JavaScript) to
|
|
|
|
|
|
communicate interactively. C++ benefits greatly from having a
|
|
|
|
|
|
standardized implementation of these protocols.
|
|
|
|
|
|
|
2017-12-15 09:00:44 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[section Requirements]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-12 19:16:39 -07:00
|
|
|
|
[important
|
|
|
|
|
|
This library is for programmers familiar with __Asio__. Users who
|
|
|
|
|
|
wish to use asynchronous interfaces should already know how to
|
|
|
|
|
|
create concurrent network programs using callbacks or coroutines.
|
|
|
|
|
|
]
|
2017-06-12 05:01:24 -07:00
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
|
Beast requires:
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
|
* [*C++11:] Robust support for most language features.
|
2017-06-12 05:01:24 -07:00
|
|
|
|
* [*Boost:] Beast only works with Boost, not stand-alone Asio
|
2017-06-07 16:30:49 -07:00
|
|
|
|
* [*OpenSSL:] Optional, for using TLS/Secure sockets.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-12 05:01:24 -07:00
|
|
|
|
Supported compilers: msvc-14+, gcc 4.8+, clang 3.6+
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-07-24 13:24:15 -07:00
|
|
|
|
Sources are [*header-only].
|
|
|
|
|
|
To link a program using Beast successfully, add the
|
2017-10-26 16:05:50 -07:00
|
|
|
|
[@boost:/libs/system/index.html Boost.System]
|
2017-07-24 13:24:15 -07:00
|
|
|
|
library to your build scripts. If you use coroutines you'll also need the
|
2017-10-26 16:05:50 -07:00
|
|
|
|
[@boost:/libs/coroutine/index.html Boost.Coroutine]
|
2017-06-07 16:30:49 -07:00
|
|
|
|
library. Please visit the
|
2017-10-26 16:05:50 -07:00
|
|
|
|
[@boost:/more/getting_started.html Boost documentation]
|
2017-06-07 16:30:49 -07:00
|
|
|
|
for instructions on how to do this for your particular build system.
|
|
|
|
|
|
|
2017-12-15 09:00:44 -08:00
|
|
|
|
[endsect]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[section Reporting Bugs]
|
|
|
|
|
|
|
|
|
|
|
|
To report bugs or get help using Beast, GitHub issues are preferred.
|
|
|
|
|
|
Please visit
|
|
|
|
|
|
[@https://github.com/boostorg/beast/issues https://github.com/boostorg/beast/issues]
|
|
|
|
|
|
to ask a question, report a defect, or request a feature. If you
|
|
|
|
|
|
prefer to keep your issue or question confidential please email the author at
|
|
|
|
|
|
[@mailto:vinnie.falco%40gmail.com vinnie.falco@gmail.com].
|
|
|
|
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-28 19:49:41 -07:00
|
|
|
|
[heading Credits]
|
|
|
|
|
|
|
|
|
|
|
|
Boost.Asio is the inspiration behind which all of the interfaces and
|
|
|
|
|
|
implementation strategies are built. Some parts of the documentation are
|
|
|
|
|
|
written to closely resemble the wording and presentation of Boost.Asio
|
2017-06-07 16:30:49 -07:00
|
|
|
|
documentation. Credit goes to
|
|
|
|
|
|
[@https://github.com/chriskohlhoff Christopher Kohlhoff]
|
2017-12-15 09:00:44 -08:00
|
|
|
|
for his wonderful Asio library and the ideas in
|
|
|
|
|
|
[@http://cplusplus.github.io/networking-ts/draft.pdf [*C++ Extensions for Networking]]
|
|
|
|
|
|
which power Beast.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-06-04 17:25:55 -07:00
|
|
|
|
Beast would not be possible without the support of
|
|
|
|
|
|
[@https://www.ripple.com Ripple]
|
|
|
|
|
|
during the library's early development, or the ideas, time and patience
|
2017-05-28 19:49:41 -07:00
|
|
|
|
contributed by
|
2017-06-04 17:25:55 -07:00
|
|
|
|
[@https://github.com/JoelKatz David Schwartz],
|
|
|
|
|
|
[@https://github.com/ximinez Edward Hennis],
|
2017-05-28 19:49:41 -07:00
|
|
|
|
[@https://github.com/howardhinnant Howard Hinnant],
|
2017-06-04 17:25:55 -07:00
|
|
|
|
[@https://github.com/miguelportilla Miguel Portilla],
|
|
|
|
|
|
[@https://github.com/nbougalis Nik Bougalis],
|
2017-08-01 20:33:50 -07:00
|
|
|
|
[@https://github.com/seelabs Scott Determan] and
|
|
|
|
|
|
[@https://github.com/scottschurr Scott Schurr].
|
2017-06-04 17:25:55 -07:00
|
|
|
|
Many thanks to
|
|
|
|
|
|
[@https://github.com/K-ballo Agustín Bergé],
|
2017-06-03 18:40:28 -07:00
|
|
|
|
[@http://www.boost.org/users/people/glen_fernandes.html Glen Fernandes],
|
2017-05-28 19:49:41 -07:00
|
|
|
|
and
|
2017-06-07 16:30:49 -07:00
|
|
|
|
[@https://github.com/pdimov Peter Dimov]
|
2017-06-04 17:25:55 -07:00
|
|
|
|
for tirelessly answering questions on
|
|
|
|
|
|
[@https://cpplang.slack.com/ Cpplang-Slack].
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
2017-12-15 09:00:44 -08:00
|
|
|
|
Thanks to
|
|
|
|
|
|
[@https://github.com/djarek Damian Jarek]
|
|
|
|
|
|
for his generous participation and source code contributions.
|
|
|
|
|
|
|
2017-05-28 19:49:41 -07:00
|
|
|
|
[endsect]
|
2017-10-26 11:08:24 -07:00
|
|
|
|
|
2017-12-15 09:00:44 -08:00
|
|
|
|
|
|
|
|
|
|
|
2017-10-26 11:08:24 -07:00
|
|
|
|
[section Reports]
|
|
|
|
|
|
[block'''<?dbhtml stop-chunking?>''']
|
|
|
|
|
|
|
2017-12-01 12:11:41 -08:00
|
|
|
|
[section Security Review (Bishop Fox)]
|
|
|
|
|
|
|
|
|
|
|
|
Since 2005, [@https://www.bishopfox.com/ Bishop Fox] has provided
|
|
|
|
|
|
security consulting services to the Fortune 1000, high-tech startups,
|
|
|
|
|
|
and financial institutions worldwide.
|
|
|
|
|
|
Beast engaged Bishop Fox to assess the security of the Boost C++ Beast HTTP/S
|
|
|
|
|
|
networking library. The following report details the findings identified during
|
|
|
|
|
|
the course of the engagement, which started on September 11, 2017.
|
|
|
|
|
|
|
|
|
|
|
|
The assessment team conducted a hybrid application assessment of the Beast
|
|
|
|
|
|
library. Bishop Fox’s hybrid application assessment methodology leverages
|
|
|
|
|
|
the real-world attack techniques of application penetration testing in
|
|
|
|
|
|
combination with targeted source code review to thoroughly identify
|
|
|
|
|
|
application security vulnerabilities. These fullknowledge assessments
|
|
|
|
|
|
begin with automated scans of the deployed application and source code.
|
|
|
|
|
|
Next, analyses of the scan results are combined with manual review to
|
|
|
|
|
|
thoroughly identify potential application security vulnerabilities. In
|
|
|
|
|
|
addition, the team performs a review of the application architecture and
|
|
|
|
|
|
business logic to locate any design-level issues. Finally, the team performs
|
|
|
|
|
|
manual exploitation and review of these issues to validate the findings.
|
|
|
|
|
|
|
|
|
|
|
|
[@https://vinniefalco.github.io/BeastAssets/Beast%20-%20Hybrid%20Application%20Assessment%202017%20-%20Assessment%20Report%20-%2020171114.pdf [*Beast - Hybrid Application Assessment 2017]]
|
|
|
|
|
|
|
2018-01-24 13:40:17 -08:00
|
|
|
|
[block'''
|
|
|
|
|
|
<mediaobject>
|
|
|
|
|
|
<videoobject>
|
|
|
|
|
|
<videodata fileref="https://www.youtube.com/embed/4TtyYbGDAj0?rel=0"
|
|
|
|
|
|
align="center" contentwidth="560" contentdepth="315"/>
|
|
|
|
|
|
</videoobject>
|
|
|
|
|
|
</mediaobject>
|
|
|
|
|
|
''']
|
|
|
|
|
|
|
2017-12-01 12:11:41 -08:00
|
|
|
|
[endsect]
|
|
|
|
|
|
|
|
|
|
|
|
[section WebSocket (Autobahn|Testsuite)]
|
2017-10-26 11:08:24 -07:00
|
|
|
|
|
2017-10-26 16:05:50 -07:00
|
|
|
|
The
|
|
|
|
|
|
[@https://github.com/crossbario/autobahn-testsuite Autobahn WebSockets Testsuite]
|
|
|
|
|
|
provides a fully automated test suite to
|
2017-10-26 11:08:24 -07:00
|
|
|
|
verify client and server implementations of The WebSocket Protocol
|
|
|
|
|
|
for specification conformance and implementation robustness.
|
|
|
|
|
|
The test suite will check an implementation by doing basic
|
|
|
|
|
|
WebSocket conversations, extensive protocol compliance
|
|
|
|
|
|
verification and performance and limits testing.
|
|
|
|
|
|
Autobahn|Testsuite is used across the industry and
|
|
|
|
|
|
contains over 500 test cases.
|
|
|
|
|
|
|
2017-12-01 12:11:41 -08:00
|
|
|
|
[@https://vinniefalco.github.io/BeastAssets/reports/autobahn/index.html [*Autobahn|Testsuite WebSocket Results]]
|
2017-10-26 11:08:24 -07:00
|
|
|
|
|
|
|
|
|
|
[warning
|
2017-10-26 16:05:50 -07:00
|
|
|
|
Version 0.7.6 of Autobahn|Testsuite contains a
|
2017-10-26 11:08:24 -07:00
|
|
|
|
[@https://github.com/crossbario/autobahn-testsuite/issues/77 known defect]
|
2017-10-26 16:05:50 -07:00
|
|
|
|
which causes false positive failures in Beast for the following test cases:
|
2017-10-26 11:08:24 -07:00
|
|
|
|
{ 12.4.5, 12.4.6, 12.4.8, 12.4.9, 12.4.10, 12.4.11, 12.4.13,
|
|
|
|
|
|
12.4.14, 12.4.15, 12.4.16, 12.4.17, 12.4.18 }
|
2017-10-26 16:05:50 -07:00
|
|
|
|
When this issue is resolved in the test suite, the reports will be updated.
|
2017-10-26 11:08:24 -07:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
|
|
|
|
|
|
|
|
[endsect]
|