elastic / elastic/apm-agent-python
apm agent fails in a FIPS enabled host
- Ngôn ngữ chính
- Python
- Star
- 431
- Fork
- 239
- Merge trung bình
- 5 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 7
Mô tả
``We are running a webapp on Azure, which uses Elastic APM (elastic-apm==6.23.0). Since 08/29/2024, without changing anything our app is failing to run, with:
```
crypto/fips/fips.c:154: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
Aborted (core dumped)
```
We noticed the Azure webapp environment (linux) now has the following kernel parameter:
```
# sysctl crypto.fips_enabled
crypto.fips_enabled = 1
```
**To Reproduce**
```
# python
Python 3.12.2 (main, Feb 22 2024, 11:15:41) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import elasticapm
>>> apm=elasticapm.Client()
>>> elasticapm.instrument()
crypto/fips/fips.c:154: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
Aborted (core dumped)
#
```
**Environment (please complete the following information)**
- OS: Linux hostname 5.15.164.1-1.cm2 #1 SMP Sun Aug 18 19:16:21 UTC 2024 x86_64 GNU/Linux
- Python version: 3.12
- APM Server version: unrelevant, it fail before even connecting (no need to have an APM server to test it)
- Agent version: 6.23.0
**Additional context**
```
(antenv) root@aiops-dev_0ac897ce81:/tmp/8dccb366a943910# python
Python 3.12.2 (main, Feb 22 2024, 11:15:41) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import elasticapm
>>> apm=elasticapm.Client()
>>> elasticapm.instrument()
crypto/fips/fips.c:154: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
Aborted (core dumped)
(antenv) root@aiops-dev_0ac897ce81:/tmp/8dccb366a943910#
Linux aiops-dev_0ac897ce81 5.15.164.1-1.cm2 #1 SMP Sun Aug 18 19:16:21 UTC 2024 x86_64 GNU/Linux
(antenv) root@aiops-dev_0ac897ce81:/tmp/8dccb366a943910# sysctl crypto.fips_enabled
crypto.fips_enabled = 1
elastic-apm==6.23.0
(antenv) root@aiops-dev_0ac897ce81:/tmp/8dccb366a943910# python -V
Python 3.12.2
```
See attached file for detail about installed packages in the OS and version, as well as a detailled dump of the system calls.
[issue.txt](https://github.com/user-attachments/files/16836808/issue.txt)
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện lỗi trên Python 3.12/Linux với crypto.fips_enabled=1 bằng các entry point được báo cáo import elasticapm, Client() và instrument(). Payload không nêu tên tệp mã nguồn hay test nào, vì vậy trước tiên hãy xác định đường dẫn khởi tạo được các lời gọi này đi tới và thiết lập một regression test cho trường hợp FIPS-enabled. Được xem là hoàn tất khi instrumentation không còn bị dừng với lỗi OpenSSL self-test failure đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- azure, linux, python
- Lĩnh vực
- backend, security
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100