Skip to content

Commit 7d78515

Browse files
fix: Added cve fixes
1 parent cf333b1 commit 7d78515

14 files changed

Lines changed: 121 additions & 187 deletions

File tree

.github/CODEOWNERS

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +0,0 @@
1-
# Lines starting with '#' are comments.
2-
# Each line is a file pattern followed by one or more owners.
3-
4-
# More details are here: https://help.github.com/articles/about-codeowners/
5-
6-
# The '*' pattern is global owners.
7-
8-
# Order is important. The last matching pattern has the most precedence.
9-
# The folders are ordered as follows:
10-
11-
# In each subsection folders are ordered first by depth, then alphabetically.
12-
# This should make it easy to add new rules without breaking existing ones.
13-
14-
# Global rule:
15-
* @f5devcentral/application-study-tool-owners

.github/workflows/deploy-pages.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Deploy Jekyll with GitHub Pages dependencies preinstalled
33

44
on:
55
push:
6-
branches: [main]
6+
branches:
7+
- main
78

89
# Allows you to run this workflow manually from the Actions tab
910
workflow_dispatch:

.github/workflows/push-image.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ name: Push Image to ghcr.io
22
run-name: ${{ github.actor }} is running this workflow
33
on:
44
push:
5-
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
#tags:
9+
# - 'v[0-9]+.[0-9]+.[0-9]+'
10+
711
jobs:
812
Pull-From_Gitlab:
913
permissions:
@@ -34,7 +38,13 @@ jobs:
3438
- name: Push to Github
3539
run:
3640
|
37-
docker tag registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/otel_custom_collector:${{ env.VERSION }} ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:${{ env.VERSION }}
38-
docker tag registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/otel_custom_collector:${{ env.VERSION }} ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:latest
39-
docker push ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:${{ env.VERSION }}
40-
docker push ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:latest
41+
exit_code=0
42+
docker pull ghcr.io/f5networks/f5-insight-for-bigip/otel_custom_collector:${{ env.VERSION }} > /dev/null 2>&1 || exit_code=$?
43+
if [ $exit_code -eq 0 ]; then
44+
echo "Image already exists in the github registry, skipping push"
45+
exit 0
46+
fi
47+
docker tag registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/otel_custom_collector:${{ env.VERSION }} ghcr.io/f5networks/f5-insight-for-bigip/otel_custom_collector:${{ env.VERSION }}
48+
docker tag registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/otel_custom_collector:${{ env.VERSION }} ghcr.io/f5networks/f5-insight-for-bigip/otel_custom_collector:latest
49+
docker push ghcr.io/f5networks/f5-insight-for-bigip/otel_custom_collector:${{ env.VERSION }}
50+
docker push ghcr.io/f5networks/f5-insight-for-bigip/otel_custom_collector:latest

COLLECTOR_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.9.4
1+
v2.0.1

CONTRIBUTING.md

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +0,0 @@
1-
# Contributing Guide
2-
3-
Thank you for your interest in contributing to the Application Study Tool!
4-
Please read this guide for general guidelines to follow, which borrows heavily
5-
from those used by the Opentelemetry Collector.
6-
7-
## How to contribute
8-
9-
### Before you start
10-
11-
Comment on the issue that you want to work on so we can assign it to you and
12-
clarify anything related to it.
13-
14-
If you would like to work on something that is not listed as an issue,
15-
please create an issue and describe your proposal. It is best to do this
16-
in advance so that maintainers can decide if the proposal is a good fit for
17-
this repository. This will help avoid situations when you spend significant time
18-
on something that maintainers may decide this repo is not the right place for.
19-
20-
Follow the instructions below to create your PR.
21-
22-
### Fork
23-
24-
In the interest of keeping this repository clean and manageable, you should
25-
work from a fork. To create a fork, click the 'Fork' button at the top of the
26-
repository, then clone the fork locally using `git clone
27-
git@github.com:USERNAME/application-study-tool.git`.
28-
29-
You should also add this repository as an "upstream" repo to your local copy,
30-
in order to keep it up to date. You can add this as a remote like so:
31-
32-
`git remote add upstream https://github.com/f5devcentral/application-study-tool.git`
33-
34-
Verify that the upstream exists:
35-
36-
`git remote -v`
37-
38-
To update your fork, fetch the upstream repo's branches and commits, then merge
39-
your `development` with upstream's `development`:
40-
41-
```
42-
git fetch upstream
43-
git checkout development
44-
git merge upstream/development
45-
```
46-
47-
Remember to always work in a branch of your local copy, as you might otherwise
48-
have to contend with conflicts in `development`.
49-
50-
51-
## Required Tools
52-
53-
Working with the project sources requires the following tools:
54-
55-
1. [git](https://git-scm.com/)
56-
4. [docker](https://www.docker.com/)
57-
58-
## Repository Setup
59-
60-
Fork the repo and checkout by:
61-
62-
```
63-
$ git clone git@github.com:f5devcentral/application-study-tool.git
64-
```
65-
66-
Add your fork as an origin:
67-
68-
```shell
69-
$ cd application-study-tool
70-
$ git remote add fork git@github.com:YOUR_GITHUB_USERNAME/application-study-tool.git
71-
```
72-
73-
## Creating a PR
74-
75-
Checkout a new branch, make modifications, build locally, and push the branch to your fork
76-
to open a new PR:
77-
78-
```shell
79-
$ git checkout development
80-
$ git checkout -b feature
81-
# edit
82-
$ git commit
83-
$ git push fork feature
84-
```
85-
86-
### Commit Messages
87-
88-
Use descriptive commit messages. Here are [some recommendations](https://cbea.ms/git-commit/)
89-
on how to write good commit messages.
90-
When creating PRs GitHub will automatically copy commit messages into the PR description,
91-
so it is a useful habit to write good commit messages before the PR is created.
92-
Also, unless you actually want to tell a story with multiple commits make sure to squash
93-
into a single commit before creating the PR.
94-
95-
When maintainers merge PRs with multiple commits, they will be squashed and GitHub will
96-
concatenate all commit messages right before you hit the "Confirm squash and merge"
97-
button. Maintainers must make sure to edit this concatenated message to make it right before merging.
98-
In some cases, if the commit messages are lacking the easiest approach to have at
99-
least something useful is copy/pasting the PR description into the commit message box
100-
before merging (but see the above paragraph about writing good commit messages in the first place).

README.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ configuration, troubleshooting (REST changes) info, etc.
77

88
> See the [F5 Application Study Tool Labs](https://clouddocs.f5.com/training/community/ast/html/) for an educational guided lab experience.
99
10-
The Application Study Tool is intended to provide enhanced insights into (classic) BIG-IP products, leveraging best in class
10+
The F5 Application Study Tool is intended to provide enhanced insights into (classic) BIG-IP products, leveraging best in class
1111
open source telemetry tools. The full installation includes:
1212

1313
* Custom Instance of OpenTelemetry Collector with enhanced BIG-IP data receivers (data fetched via iControlRest) [Full List of Metrics Collected](pages/components/otel_collector/receiver_metrics.md).
@@ -173,6 +173,8 @@ Create a file called .env.device-secrets, and add your BIP passwords like so:
173173
BIGIP_PASSWORD_1=foo-bar123!
174174
BIGIP_PASSWORD_2=bar-foo123!
175175
```
176+
> **Note:** Ensure that the permissions on the (_.env.device-secrets_) file are restricted to allow read access only to the user running the Docker containers.
177+
> This ensures that credential information remains protected from unauthorized access.
176178
177179
The variable name (the part on the left of the equal sign) must match the configured
178180
value for the devices that use this password in config/ast_defaults.yaml or device specific
@@ -348,7 +350,7 @@ cp .env-example .env
348350
```
349351

350352
### Run Application Study Tool
351-
Once the above configurations have been made, the tool can be started with:
353+
After the above configurations have been made, start the tool with:
352354

353355
```shell
354356
# `docker compose up -d` to start in background mode
@@ -357,7 +359,7 @@ docker compose up
357359

358360
#### View The Dashboards
359361
The default Grafana user/pass is `admin/admin`, and can be accessed at
360-
`http://<hostname>:3000`.
362+
`http://<hostname>:3000`. If HTTPS is configured, use `https://<hostname>:3001`.
361363

362364

363365
## Updating AST Versions
@@ -371,7 +373,7 @@ special instructions / breaking changes.
371373
git stash
372374
git fetch --tags
373375
git pull origin main
374-
git checkout tags/RELEASE_VERSION #(e.g. tags/v0.9.4)
376+
git checkout tags/RELEASE_VERSION #(e.g. tags/v2.0.1)
375377
git stash pop
376378
# <merge any conflicts with your local changes>
377379
# <re-run config scripts>
@@ -380,30 +382,10 @@ docker compose down
380382
docker compose up
381383
```
382384

383-
## Support
384-
385-
For support, please open a GitHub issue. Note, the code in this repository is community supported and is not supported by F5 Networks. For a complete list of supported projects please reference [SUPPORT.md](SUPPORT.md).
386-
387-
## Community Code of Conduct
388-
389-
Please refer to the [F5 DevCentral Community Code of Conduct](code_of_conduct.md).
390-
391385
## License
392386

393387
[Apache License 2.0](LICENSE)
394388

395389
## Copyright
396390

397-
Copyright 2014-2024 F5 Networks Inc.
398-
399-
### F5 Networks Contributor License Agreement
400-
401-
Before you start contributing to any project sponsored by F5 Networks, Inc. (F5) on GitHub, you will need to sign a Contributor License Agreement (CLA).
402-
403-
If you are signing as an individual, we recommend that you talk to your employer (if applicable) before signing the CLA since some employment agreements may have restrictions on your contributions to other projects.
404-
Otherwise by submitting a CLA you represent that you are legally entitled to grant the licenses recited therein.
405-
406-
If your employer has rights to intellectual property that you create, such as your contributions, you represent that you have received permission to make contributions on behalf of that employer, that your employer has waived such rights for your contributions, or that your employer has executed a separate CLA with F5.
407-
408-
If you are signing on behalf of a company, you represent that you are legally entitled to grant the license recited therein.
409-
You represent further that each employee of the entity that submits contributions is authorized to submit such contributions on behalf of the entity pursuant to the CLA.
391+
Copyright 2014-2024 F5 Networks Inc.

docker-compose.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ volumes:
66

77
services:
88
prometheus:
9-
image: prom/prometheus:v2.54.1
9+
# prom/prometheus:v2.53.5
10+
image: prom/prometheus@sha256:7a34573f0b9c952286b33d537f233cd5b708e12263733aa646e50c33f598f16c
1011
container_name: prometheus
1112
restart: unless-stopped
1213
stop_grace_period: 5m
@@ -21,13 +22,14 @@ services:
2122
- '--web.enable-lifecycle'
2223
- '--enable-feature=otlp-write-receiver'
2324
- '--storage.tsdb.retention.time=1y'
24-
ports:
25-
- 9090:9090
25+
expose:
26+
- 9090
2627
networks:
2728
- 7lc_network
2829

2930
otel-collector:
30-
image: ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:v0.9.4
31+
# ghcr.io/f5networks/f5-insight-for-bigip/otel_custom_collector:v2.0.1
32+
image: ghcr.io/f5networks/f5-insight-for-bigip/otel_custom_collector@sha256:0155a441a39a3b6ea42799a4f2172e0ad5b30758970b560c3bc7f7c87903262a
3133
restart: unless-stopped
3234
volumes:
3335
- ./services/otel_collector:/etc/otel-collector-config
@@ -40,7 +42,8 @@ services:
4042
- 7lc_network
4143

4244
grafana:
43-
image: grafana/grafana:11.2.0
45+
# grafana/grafana:v11.6.3
46+
image: grafana/grafana@sha256:6128afd8174f01e39a78341cb457588f723bbb9c3b25c4d43c4b775881767069
4447
container_name: grafana
4548
restart: unless-stopped
4649
ports:

https_setup.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
### Enabling HTTPS for Grafana
2+
3+
This section outlines the steps required to enable HTTPS for Grafana when deployed using Docker Compose.
4+
5+
#### 1. Generate SSL Certificate and Key
6+
7+
To enable HTTPS, you need a certificate `(cert.pem)` and a private key `(key.pem)`. For local development, you can generate self-signed certificates using OpenSSL with the following commands:
8+
9+
```sh
10+
mkdir -p ./services/grafana/ssl
11+
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
12+
-keyout ./services/grafana/ssl/key.pem -out ./services/grafana/ssl/cert.pem \
13+
-subj "/CN=localhost"
14+
```
15+
16+
> **Note:** In production environments, always use certificates from a trusted Certificate Authority (CA).
17+
> It is recommended to rotate these certificates regularly before they expire to minimize the risk of security breaches.
18+
19+
> **Reference:** For more detailed guidance on configuring HTTPS, refer to the [official Grafana documentation](https://grafana.com/docs/grafana/latest/setup-grafana/set-up-https/).
20+
21+
#### 2. Modify the Docker Compose Configuration
22+
23+
Update your `docker-compose.yaml` file with the necessary configurations to enable HTTPS for Grafana. Below is an example snippet for the Grafana service:
24+
25+
```yaml
26+
grafana:
27+
image: grafana/grafana:11.6.3
28+
container_name: grafana
29+
restart: unless-stopped
30+
ports:
31+
- 3000:3000
32+
- 3001:3001 # HTTPS port
33+
volumes:
34+
- grafana:/var/lib/grafana
35+
- ./services/grafana/provisioning/:/etc/grafana/provisioning
36+
- ./services/grafana/ssl/cert.pem:/etc/grafana/cert.pem:ro
37+
- ./services/grafana/ssl/key.pem:/etc/grafana/key.pem:ro
38+
env_file: ".env"
39+
environment:
40+
- GF_SERVER_PROTOCOL=https
41+
- GF_SERVER_CERT_FILE=/etc/grafana/cert.pem
42+
- GF_SERVER_CERT_KEY=/etc/grafana/key.pem
43+
- GF_SERVER_HTTP_PORT=3001
44+
```
45+
46+
By following these steps, you will successfully enable HTTPS for your Grafana deployment. Ensure you test your configuration in both development and production environments to verify functionality and security compliance.

pages/Gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
3232
# do not have a Java counterpart.
3333
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
3434

35-
gem 'nokogiri'
36-
gem 'rack', '~> 2.2.4'
35+
gem 'nokogiri', '>= 1.18.8'
36+
gem 'rack', '~> 2.2.14'
3737
gem 'rspec'
3838

39+
gem 'google-protobuf', '>= 4.28.2'
40+
gem 'webrick', '>= 1.8.2'
41+
gem 'rexml', '>= 3.3.9'
42+
3943
gem "html-proofer", "~> 5.0", :group => :development

0 commit comments

Comments
 (0)