Skip to content

Commit

Permalink
Add Landing Page Information
Browse files Browse the repository at this point in the history
  • Loading branch information
n8hacks authored and mmguero committed Jan 2, 2024
1 parent d045cb2 commit dfaf9a4
Show file tree
Hide file tree
Showing 21 changed files with 347 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Dockerfiles/nginx.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ COPY --from=jwilder/nginx-proxy:alpine /etc/nginx/network_internal.conf /etc/ngi
COPY --from=jwilder/nginx-proxy:alpine /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/
COPY --from=docbuild /site/_site /usr/share/nginx/html/readme

RUN mkdir -p /usr/share/nginx/html/landingpage
COPY nginx/landingpage /usr/share/nginx/html/landingpage
COPY --chmod=755 shared/bin/docker-uid-gid-setup.sh /usr/local/bin/
ADD nginx/scripts /usr/local/bin/
ADD nginx/*.conf /etc/nginx/
Expand Down
1 change: 1 addition & 0 deletions docker-compose-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ services:
- ./nginx/htpasswd:/etc/nginx/auth/htpasswd:ro
- ./nginx/certs:/etc/nginx/certs:ro
- ./nginx/certs/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
- ./nginx/landingpage:/usr/share/nginx:ro
healthcheck:
test: ["CMD", "curl", "--insecure", "--silent", "https://localhost:443"]
interval: 30s
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ services:
- ./nginx/htpasswd:/etc/nginx/auth/htpasswd:ro
- ./nginx/certs:/etc/nginx/certs:ro
- ./nginx/certs/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
- ./nginx/landingpage:/usr/share/nginx/:ro
healthcheck:
test: ["CMD", "curl", "--insecure", "--silent", "https://localhost:443"]
interval: 30s
Expand Down
7 changes: 7 additions & 0 deletions nginx/landingpage/assets/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions nginx/landingpage/assets/imgs/CISA.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nginx/landingpage/assets/imgs/Malcolm_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nginx/landingpage/assets/imgs/api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 146 additions & 0 deletions nginx/landingpage/assets/imgs/cyberchef.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions nginx/landingpage/assets/imgs/github-mark-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nginx/landingpage/assets/imgs/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nginx/landingpage/assets/imgs/lock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nginx/landingpage/assets/imgs/markdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions nginx/landingpage/assets/imgs/netbox_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nginx/landingpage/assets/imgs/opensearch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions nginx/landingpage/assets/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

136 changes: 136 additions & 0 deletions nginx/landingpage/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Malcolm</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<script src="assets/js/bootstrap.bundle.min.js"></script>
<style>
.imgcenter {
width: 50%;
}
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
.card {
/* position: relative; */
width: 50%;
}
.image {
opacity: 1;
display: block;
width: 100%;
height: auto;
transition: .5s ease;
backface-visibility: hidden;
}

.middle {
transition: .5s ease;
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
text-align: center;
}

.card:hover .image {
opacity: 0.3;
}

.card:hover .middle {
opacity: 1;
}
</style>
</head>

<body class="bg-dark">
<br />
<div>
<img class="imgcenter center" src="assets/imgs/Malcolm_banner_white.png" alt="%SITE_NAME%">
</div>

<br />

<!-- Internal Links -->
<div class="container">
<h3 style="color:white">Internal Links</h3>
<div class="card-group">
<div class="card bg-dark">
<img src="assets/imgs/Arkime_Logo_FullGradientWhite_Square.png" alt="Arkime" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/sessions/" class="btn btn-primary" target="_blank">Arkime</a>
</div>
</div>
<div class="card bg-dark">
<img src="assets/imgs/icon.png" alt="Upload" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/upload/" class="btn btn-primary" target="_blank">Upload</a>
</div>
</div>
<div class="card bg-dark">
<img src="assets/imgs/markdown.png" alt="ReadMe" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/readme/" class="btn btn-primary" target="_blank">ReadMe</a>
</div>
</div>
<div class="card bg-dark">
<img src="assets/imgs/opensearch.png" alt="Opensearch" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/dashboards/" class="btn btn-primary" target="_blank">Opensearch</a>
</div>
</div>
</div>
<div class="card-group">
<div class="card bg-dark">
<img src="assets/imgs/netbox_icon.svg" alt="NetBox" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/netbox/" class="btn btn-primary" target="_blank">Netbox</a>
</div>
</div>
<div class="card bg-dark">
<img src="assets/imgs/lock.png" alt="Auth" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/auth/" class="btn btn-primary" target="_blank">Admin Access</a>
</div>
</div>
<div class="card bg-dark">
<img src="assets/imgs/cyberchef.svg" alt="Auth" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/cyberchef/" class="btn btn-primary" target="_blank">CyberChef</a>
</div>
</div>
<div class="card bg-dark">
<img src="assets/imgs/api.png" alt="API" class="image" style="width:100%">
<div class="middle">
<a href="https://localhost/mapi/" class="btn btn-primary" target="_blank">API</a>
</div>
</div>
</div>
</div>
<br />

<div class="container">
<h3 style="color:white">External Links</h3>
<div class="card-group">
<div class="card bg-dark">
<img src="assets/imgs/github-mark-white.svg" alt="Auth" class="image" style="width:100%">
<div class="middle">
<a href="https://github.com/cisagov/Malcolm" class="btn btn-primary" target="_blank">GitHub</a>
</div>
</div>
<div class="card bg-dark">
</div>
<div class="card bg-dark">
</div>
<div class="card bg-dark">
</div>
</div>
</div>
</body>
</html>
9 changes: 8 additions & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ http {
}

# Arkime
location / {
location /sessions {
include /etc/nginx/nginx_auth_rt.conf;
proxy_pass https://arkime;
proxy_ssl_verify off;
Expand All @@ -291,6 +291,13 @@ http {
proxy_set_header http_auth_http_user $authenticated_user;
proxy_set_header Authorization "";
}

# Landing Page
location / {
include /etc/nginx/nginx_auth_rt.conf;
root /usr/share/nginx/landing;
try_files $uri $uri/index.html;
}
}

# OpenSearch API
Expand Down
15 changes: 14 additions & 1 deletion nginx/nginx_readonly.conf
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ http {
deny all;
}

location / {
location /sessions {
limit_except GET POST { deny all; }
proxy_pass https://arkime;
proxy_ssl_verify off;
Expand All @@ -210,6 +210,19 @@ http {
proxy_set_header http_auth_http_user $authenticated_user;
proxy_set_header Authorization "";
}

# Landing Page
location / {
include /etc/nginx/nginx_auth_rt.conf;
root /usr/share/nginx/html/;
try_files $uri $uri/index.html;
proxy_pass https://landing;
proxy_ssl_verify off;
proxy_redirect off;
proxy_set_header Host arkime.malcolm.local;
proxy_set_header http_auth_http_user $authenticated_user;
proxy_set_header Authorization "";
}
}

}
3 changes: 2 additions & 1 deletion scripts/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ def printURLs():

print("\nMalcolm services can be accessed via the following URLs:")
print("------------------------------------------------------------------------------")
print(f" - Arkime: https://{myIp}/")
print(f" - Landing Page: https://{myIp}/")
print(f" - Arkime: https://{myIp}/sessions/")
print(f" - OpenSearch Dashboards: https://{myIp}/dashboards/")
print(f" - PCAP upload (web): https://{myIp}/upload/")
if orchMode is not OrchestrationFramework.KUBERNETES:
Expand Down

0 comments on commit dfaf9a4

Please sign in to comment.